Module 3: Context Retriever¶
Vector search finds documents. But questions like "Walk me through Oracle's latest quarter" need live data that changes constantly. Context Retriever connects your agent directly to that data.
| Vector Search | Context Retriever | |
|---|---|---|
| Data | Static documents | Live financial data |
| Query | "What are NVIDIA's revenue trends?" | "Walk me through Oracle's latest quarter" |
| How | Searches by meaning | Queries companies, filings, metrics directly |
You define your entities. Context Retriever generates the tools. Your agent calls them at runtime.
Cloud setup¶
1. Create Service¶
-
In the Redis Cloud console, find Context Retriever in the left sidebar and click Create custom service.
-
Fill in the general settings:
- Service name:
finance - Database: select your workshop database
- Service name:
-
Click Entities, then Add Entity:
- Entity name:
AnalystProfile - Key Template:
finance_researcher_analyst_profile:{analyst_id}
- Entity name:
This tells Context Retriever how your records are stored in Redis.
-
Click Fields, then Auto-Detect Fields.


-
Click Create.
2. Get your credentials¶
Now that your surface exists, you need two things from the Console:
-
Surface ID — copy the Surface ID at the end of the URL bar:
app.redislabs.com/#/context-retriever/<surface-id> -
Click back to Context Retriever Surfaces

-
Admin Key — Click the Admin Keys tab and create a new key.

Add both to your .env:
3. Complete the surface and load data¶
You defined one entity. The app needs all 7 (AnalystProfile, Company, ResearchDocument, ResearchChunk, FinancialMetricPoint, PriceBar, CoverageEvent).
Run these scripts to automatically add the remaining entities for you.
Explore the Tools & Entities¶
Go back to your Context Retriever service in the Redis Cloud console and scroll down.
You defined the entities and Redis created the pathways for the agent to retrieve data in line with your business logic via MCP tools.
7 entities, each mapped to your Redis keys with full field definitions, types, and relationships:

Expand any entity. Context Retriever understands every field and how entities relate to each other.
Auto generated MCP tools

Your agent now has filter_company_by_sector, search_research_chunk_by_text, and more, all backed by sub millisecond Redis queries.
Try it¶
Restart with make dev, then open localhost:3040.
The mode toggle now shows Real-time Context and the top-right button says Redis Iris.
- Click Redis Iris to open the activity panel
- Ask: "Walk me through Oracle's latest quarter using both the filing and the structured metrics." — watch the agent chain multiple MCP tools to pull company data, financial metrics, and research documents
- Try: "What is my semiconductor coverage and analysis preferences?"
- Switch back to Simple RAG and ask the same question. Notice the difference