Available on crate feature
rag only.Expand description
Retrieval-Augmented Generation (RAG) pipeline.
Modular RAG system with trait-based components:
RagPipeline- Orchestrates ingest and query workflowsRagTool- Agentic retrieval viaTooltraitInMemoryVectorStore- Zero-dependency vector store- Chunking strategies: fixed-size, recursive, markdown-aware
- Feature-gated backends: Gemini, OpenAI, Qdrant, LanceDB, pgvector
Available with feature: rag
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.
Structs§
- Chunk
- A segment of a
Documentwith its vector embedding. - Document
- A source document containing text content and metadata.
- Fixed
Size Chunker - Splits text into fixed-size chunks by character count with configurable overlap.
- InMemory
Vector Store - An in-memory vector store using cosine similarity for search.
- Markdown
Chunker - Splits text by markdown headers, keeping each section as a chunk.
- NoOp
Reranker - A no-op reranker that returns results unchanged.
- RagConfig
- Configuration parameters for the RAG pipeline.
- RagConfig
Builder - Builder for constructing a validated
RagConfig. - RagPipeline
- The RAG pipeline orchestrator.
- RagPipeline
Builder - Builder for constructing a
RagPipeline. - RagTool
- A retrieval tool that wraps a
RagPipelinefor agentic use. - Recursive
Chunker - Splits text hierarchically: paragraphs → sentences → words.
- Search
Result - A retrieved
Chunkpaired with a relevance score.
Enums§
- RagError
- Errors that can occur in RAG operations.
Traits§
- Chunker
- A strategy for splitting documents into chunks.
- Embedding
Provider - A provider that generates vector embeddings from text input.
- Reranker
- A reranker that re-scores and reorders search results.
- Vector
Store - A storage backend for vector embeddings with similarity search.
Type Aliases§
- Result
- A convenience result type for RAG operations.