Knowledge

Examples for retrieval-augmented generation, knowledge filters, and custom retrievers.

ExampleDescription
Agentic RAGAgentic RAG with PgVector hybrid search: the agent queries a recipe knowledge base on demand.
Agentic RAG With ReasoningDemonstrates agentic RAG with reranking and explicit reasoning tools.
Agentic RAG With RerankingAgentic RAG over LanceDB with hybrid search and a Cohere reranker ordering results.
Custom RetrieverUse knowledge_retriever to provide a custom retrieval function.
Knowledge FiltersFilter knowledge base searches using static filters or agentic filters.
RAG Custom EmbeddingsThis cookbook is an implementation of Agentic RAG using Sentence Transformer Reranker with multilingual data.
References FormatControl how knowledge base references are formatted for the agent.
Traditional RAGTraditional RAG that injects PgVector search results into the prompt instead of using a search tool.