Skip to main content

Overview

The Agent-first retrieval system provides a unified way to configure how agents retrieve and use knowledge. All retrieval behavior is controlled through the knowledge parameter.

Quick Start

Want Gemini, Cohere, or a local Ollama model instead of OpenAI? See Knowledge → Use a non-OpenAI embedder.

Knowledge Configuration

Full Configuration Options

Using Dict Configuration

Agent Methods

agent.chat() - Conversational Interface

The default method for conversation with automatic retrieval.

agent.query() - Structured Answer with Citations

Returns a structured result with answer, citations, and metadata.

agent.retrieve() - Retrieval Only (No LLM)

Returns context without LLM generation. Useful for conditional retrieval workflows.

Multi-Agent with Shared Knowledge

Multiple agents can share the same knowledge base:

Advanced: Reranking

For better retrieval quality with large knowledge bases:

Handling Retrieval Failures

A failed vector-store call returns empty chunks with retrieval_failed=True and an error message on the RetrievalResult — it does not raise. Check the flag before trusting an empty result so a broken store never looks like a genuine no-match. See Detect Retrieval Failures for the full pattern.

Next Steps