Expand description
§adk-rag
Retrieval-Augmented Generation for ADK-Rust agents.
This crate provides a modular, trait-based RAG system with pluggable
embedding providers, vector stores, chunking strategies, and rerankers.
A RagPipeline orchestrates the full ingest-and-query workflow,
and a RagTool exposes retrieval as an adk_core::Tool for
agentic use.
§Features
All external backends are feature-gated. The default feature set includes only core traits, the in-memory vector store, and chunking implementations.
| Feature | What it enables |
|---|---|
gemini | GeminiEmbeddingProvider via adk-gemini |
openai | OpenAIEmbeddingProvider via reqwest |
qdrant | QdrantVectorStore via qdrant-client |
lancedb | LanceDBVectorStore via lancedb |
pgvector | PgVectorStore via sqlx |
surrealdb | SurrealVectorStore via surrealdb |
full | All of the above |
Re-exports§
pub use chunking::Chunker;pub use chunking::FixedSizeChunker;pub use chunking::MarkdownChunker;pub use chunking::RecursiveChunker;pub use config::RagConfig;pub use config::RagConfigBuilder;pub use document::Chunk;pub use document::Document;pub use document::SearchResult;pub use embedding::EmbeddingProvider;pub use error::RagError;pub use error::Result;pub use inmemory::InMemoryVectorStore;pub use pipeline::RagPipeline;pub use pipeline::RagPipelineBuilder;pub use reranker::NoOpReranker;pub use reranker::Reranker;pub use tool::RagTool;pub use vectorstore::VectorStore;
Modules§
- chunking
- Document chunking strategies.
- config
- Configuration for the RAG pipeline.
- document
- Data types for documents, chunks, and search results.
- embedding
- Embedding provider trait for generating vector embeddings from text.
- error
- Error types for the
adk-ragcrate. - inmemory
- In-memory vector store using cosine similarity.
- pipeline
- RAG pipeline orchestrator.
- reranker
- Reranker trait for re-scoring search results.
- tool
- Agentic retrieval tool for ADK agents.
- vectorstore
- Vector store trait for storing and searching vector embeddings.