Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
RAGResult
Defined in the RAG module.
Rust AI Agent SDK
Result of a RAG query.
Fields
| Name | Type | Description |
|---|
answer | String | Generated answer |
citations | Vec<Citation> | Citations used in the answer |
context | ContextPack | Context chunks used |
tokens_used | usize | Token usage |
processing_time_ms | u64 | Processing time in milliseconds |
Methods
new
fn new(answer: impl Into<String>, context: ContextPack) -> Self
Create a new RAG result
Parameters:
| Name | Type |
|---|
answer | impl Into<String> |
context | ContextPack |
add_citation
fn add_citation(&mut self, citation: Citation) -> ()
Add a citation
Parameters:
citation_count
fn citation_count(&self) -> usize
Get the number of citations
Source
View on GitHub
praisonai/src/rag/mod.rs at line 130