Auto RAG Agent • Rust AI Agent SDK
AutoRagAgent: Auto RAG agent for automatic RAG setup
AutoRagAgent
Defined in the specialized module.
Rust AI Agent SDK
Auto RAG agent for automatic RAG setup
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph LR
input["Input Data"] --> agent["Agent: AutoRagAgent"]
agent --> output["Output Result"]
style agent fill:#8B0000,color:#fff
style input fill:#8B0000,color:#fff
style output fill:#8B0000,color:#fffFields
| Name | Type | Description |
|---|---|---|
config | AutoRagConfig | Configuration |
sources | Vec<String> | Document sources |
indexed | bool | Indexed |
Methods
new
fn new(config: AutoRagConfig) -> SelfCreate a new AutoRAG agent
Parameters:
| Name | Type |
|---|---|
config | AutoRagConfig |
add_source
fn add_source(&mut self, source: impl Into<String>) -> ()Add a document source
Parameters:
| Name | Type |
|---|---|
source | impl Into<String> |
add_sources
fn add_sources(&mut self, sources: impl IntoIterator<Item = impl Into<String>>) -> ()Add multiple sources
Parameters:
| Name | Type |
|---|---|
sources | impl IntoIterator<Item |
index
fn index(&mut self) -> Result<(), String>Index documents
query
fn query(&self, query: &str) -> Result<Vec<String>, String>Query the RAG system
Parameters:
| Name | Type |
|---|---|
query | &str |
is_indexed
fn is_indexed(&self) -> boolCheck if indexed
sources
fn sources(&self) -> &[String]Get sources
Source
View on GitHubpraisonai/src/parity/specialized.rs at line 436