RAGConfig
Defined in the RAG module.Rust AI Agent SDK Configuration for RAG pipeline.
Fields
| Name | Type | Description |
|---|---|---|
top_k | usize | Maximum number of chunks to retrieve |
score_threshold | f32 | Minimum relevance score threshold |
max_context_tokens | usize | Maximum context tokens |
strategy | RetrievalStrategy | Retrieval strategy |
citations_mode | CitationsMode | Citations mode |
rerank | bool | Enable reranking |
compress | bool | Enable context compression |
chunk_overlap | usize | Chunk overlap for splitting |
chunk_size | usize | Chunk size for splitting |
Methods
new
top_k
| Name | Type |
|---|---|
k | usize |
score_threshold
| Name | Type |
|---|---|
threshold | f32 |
max_context_tokens
| Name | Type |
|---|---|
tokens | usize |
strategy
| Name | Type |
|---|---|
strategy | RetrievalStrategy |
citations_mode
| Name | Type |
|---|---|
mode | CitationsMode |
rerank
| Name | Type |
|---|---|
enable | bool |
compress
| Name | Type |
|---|---|
enable | bool |
Source
View on GitHub
praisonai/src/rag/mod.rs at line 202
