RAG • Rust AI Agent SDK

RAG (Retrieval Augmented Generation) Module

rag

Rust AI Agent SDK

RAG (Retrieval Augmented Generation) Module

This module provides RAG capabilities for agents:

  • RAG – Main RAG pipeline
  • RAGConfig – Configuration for RAG
  • RAGResult – Result with answer and citations
  • Citation – Source citation
  • SmartRetriever – Intelligent document retrieval

Status

RAG::query is not implemented. It returns an error rather than a result: it previously returned a fabricated answer, a fabricated chunk with a 0.95 confidence score and a fabricated citation, which a caller could not distinguish from real retrieval. The surrounding types (chunking, context packing, citation formatting) are real and usable.

Example

ignore
use praisonai::rag::{RAG, RAGConfig};

let rag = RAG::new()
.config(RAGConfig::default())
.build()?;

let result = rag.query("What is the main finding?")?;
println!("{}", result.answer);

Import

rust
use praisonai::rag::*;

Classes

Functions


Related Documentation