Retrieval
What is agentic RAG?
Agentic RAG is retrieval an agent can call as a tool, then decide whether to retrieve again, inspect a source, or answer. The corpus, the index, and the evidence live in a durable store, so later turns reuse the same rows instead of restuffing a growing prompt.
Updated · Part of What is RAG?
How it works
- The agent has a retrieval tool, not a single retrieve-then-generate chain.
- Evidence is stored as rows — passages, frames, or transcripts — that later turns can query again.
- The next action can retrieve, inspect a source file, or generate, using persisted artifacts rather than only the last prompt.
What it is not
It is not a chat window that re-embeds a folder on every question, and it is not an agent framework with no store underneath.
agentic RAG: this, and the thing it is confused with
| This | Not this | |
|---|---|---|
| Who retrieves | The agent, as a tool call | A single pipeline step |
| Memory | Rows that survive the turn | The current prompt |
| Evidence | Passages, frames, transcripts | A vector with no source file |
Where Pixeltable fits
Pixeltable is the durable multimodal backend those tools query. @pxt.query wraps similarity search; FastAPIRouter can expose it. Database, orchestration, and serving stay in one Python file. The same file deploys to Pixeltable Cloud (Limited Beta).
import pixeltable as pxtfrom pixeltable.functions.document import document_splitterfrom pixeltable.functions.huggingface import sentence_transformerfrom pixeltable.serving import FastAPIRouterTableModel = pxt.model_base()text_embed = sentence_transformer.using(model_id='all-MiniLM-L6-v2')class Docs(TableModel, name='docs'):document: pxt.Documentclass Chunks(TableModel,name='chunks',base=Docs,iterator=document_splitter(document=Docs.document, separators='sentence'),):__indexes__ = [pxt.EmbeddingIndex(text, string_embed=text_embed),]@pxt.querydef retrieve(question: str, limit: int = 5):sim = Chunks.text.similarity(string=question)return Chunks.order_by(sim, asc=False).limit(limit).select(Chunks.text, sim)api = FastAPIRouter(name='agent-rag')api.add_query_route(path='/retrieve', query=retrieve)
Questions
- How do agents use a durable multimodal backend?
- The backend holds the corpus and the derived pieces as rows. The agent calls a retrieval function, gets passages, frames, or transcripts, and can retrieve again on the next turn. Pixeltable is that store: tables, indexes, and an HTTP route in one file.
- Is agentic RAG a new model?
- No. It is a retrieval loop the agent controls. The model still answers from retrieved evidence. What changes is ownership of the corpus: a durable table instead of a prompt that forgets.
- Do I still need a separate vector database?
- The agent needs an embedding index so similar pieces can be found. That index can live on the table that holds the chunks or frames. A separate vector database is optional; it is not the agent’s memory by itself.