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

Diagram

Input Data

Agent: AutoRagAgent

Output Result

Fields

NameTypeDescription
configAutoRagConfigConfiguration
sourcesVec<String>Document sources
indexedboolIndexed

Methods

new

rust
fn new(config: AutoRagConfig) -> Self

Create a new AutoRAG agent

Parameters:

NameType
configAutoRagConfig

add_source

rust
fn add_source(&mut self, source: impl Into<String>) -> ()

Add a document source

Parameters:

NameType
sourceimpl Into&lt;String&gt;

add_sources

rust
fn add_sources(&mut self, sources: impl IntoIterator<Item = impl Into<String>>) -> ()

Add multiple sources

Parameters:

NameType
sourcesimpl IntoIterator&lt;Item

index

rust
fn index(&mut self) -> Result<(), String>

Index documents

query

rust
fn query(&self, query: &str) -> Result<Vec<String>, String>

Query the RAG system

Parameters:

NameType
query&str

is_indexed

rust
fn is_indexed(&self) -> bool

Check if indexed

sources

rust
fn sources(&self) -> &[String]

Get sources

Source

View on GitHub

praisonai/src/parity/specialized.rs at line 436


Related Documentation