RetrievalResult
Defined in the RAG module.Rust AI Agent SDK Result of a retrieval operation.
Fields
| Name | Type | Description |
|---|---|---|
chunks | Vec<ContextChunk> | Retrieved chunks |
query | String | Query used |
strategy | RetrievalStrategy | Strategy used |
total_searched | usize | Total documents searched |
Methods
new
| Name | Type |
|---|---|
query | impl Into<String> |
strategy | RetrievalStrategy |
add_chunk
| Name | Type |
|---|---|
chunk | ContextChunk |
top_chunks
| Name | Type |
|---|---|
n | usize |
Source
View on GitHub
praisonai/src/rag/mod.rs at line 426
