The Agent Stack #008 — Monday Build
NVIDIA just dropped something builders should care about. Their NeMo Retriever introduces “agentic retrieval” - moving beyond simple semantic similarity to actually reason about what information you need.
Building Beyond Basic RAG
Traditional RAG is broken. You throw documents at a vector database, hope semantic similarity finds the right chunks, and pray your LLM can piece together coherent answers. NVIDIA’s approach flips this.
NeMo Retriever uses an agent that reasons about your query first. It plans which documents to search, what questions to ask, and how to combine results. Think of it as having a research assistant that actually understands your task.
Here’s the architecture difference:
Old RAG: Query → Vector Search → Chunk Retrieval → Generate Agentic RAG: Query → Planning Agent → Multi-step Retrieval → Synthesis → Generate
The planning agent breaks complex queries into sub-questions. For “What’s our Q4 revenue impact from the new pricing model?”, it might search financial reports, pricing docs, and customer feedback separately, then synthesise findings.
Implementation Walkthrough
You can build this pattern today without waiting for NeMo’s full release. Here’s a simplified version using existing tools:
class AgenticRetriever:
def __init__(self, vector_store, llm):
self.vector_store = vector_store
self.llm = llm
def plan_retrieval(self, query):
planning_prompt = f"""
Break this query into specific search tasks:
"{query}"
Return JSON with sub-queries and document types needed.
"""
plan = self.llm.complete(planning_prompt)
return json.loads(plan)
def execute_plan(self, plan):
results = []
for task in plan['tasks']:
docs = self.vector_store.search(
task['query'],
filters={'doc_type': task['doc_type']}
)
results.append({'task': task, 'docs': docs})
return results
The key insight: let the agent decide what to search for, not just match embeddings.
Quick Hits
• Multi-modal retrieval: NeMo handles text, code, and structured data in one pipeline - crucial for technical documentation
• Iterative refinement: The agent can search again if initial results don’t answer the query completely
• Cost efficiency: Planning reduces unnecessary LLM calls by 40-60% compared to naive RAG implementations
One Thing to Try
Build a planning layer for your existing RAG system this week. Before hitting your vector database, ask your LLM: “What specific information would help answer this query?” Use that to filter results by document type, date range, or source. You’ll see immediate improvements in answer quality.
The wrapper era is ending. Time to build agents that actually think.