Context Engineering Platform for Multi-Domain RAG and Agentic Systems
contextual · Tech · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Multi-domain RAG and agentic retrieval platform
Contextual needed a context-engineering platform that could support RAG and agentic systems across domains such as retail, code generation, legal, and support. The hard problems were retrieval precision over large corpora, agentic query reformulation, constrained subagent behavior, MCP/tool selection, and scaling from prototypes to reliable systems.
Constraints:
- Large datasets make unlimited subagent searching and repeated self-checking impractical.
- Reranking must balance recall from broad retrieval with precision in what enters the context window.
- MCP exposes tool definitions as large JSON descriptions and can create context rot when too many tools are included.
- The platform must work across domains while still requiring customization.
- Agentic search needs termination/turn limits so it does not run forever.
Architecture
Contextual's platform combines multimodal ingestion, hierarchical document processing, filters, rerankers, hybrid search, dynamic agents, constrained retrieval subagents, and MCP/tool selection. In the retail-universe benchmark, the dynamic agent answered structured-output queries over nearly 100,000 retail documents while using turn limits and validation constraints.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR user-query["User query"] --> dynamic-agent["Dynamic agent"] dynamic-agent --> retrieval-subagents["Retrieval subagents"] retrieval-subagents --> document-corpus["Document corpus"] document-corpus --> retrieval-pipeline["Retrieval pipeline"] retrieval-pipeline --> reranker["Reranker"] reranker --> dynamic-agent dynamic-agent --> mcp-server-selector["MCP server selector"] dynamic-agent --> structured-output["Structured output"]
Components
| Component | Role | Interacts with |
|---|---|---|
User query |
Question or task submitted against a large, domain-specific document collection. | Dynamic agent |
Dynamic agent |
Agent that decomposes queries, coordinates retrieval subagents, and generates structured answers. | User query, Retrieval subagents, Retrieval pipeline, MCP server selector, Structured output |
Retrieval subagents |
Constrained structured/unstructured retrieval workers with limits on turns and validation. | Dynamic agent, Document corpus, Retrieval pipeline |
Document corpus |
Large multimodal/domain corpus such as retail PDFs, logs, tables, and CSVs. | Retrieval subagents, Retrieval pipeline |
Retrieval pipeline |
Filters, rerankers, hybrid search, and hierarchy-aware document retrieval. | Dynamic agent, Retrieval subagents, Document corpus |
Reranker |
Instruction-following reranking model used to narrow broad retrieval into precise context. | Retrieval pipeline, Dynamic agent |
MCP server selector |
Prototype/context-management layer for selecting which MCP servers/tools to expose. | Dynamic agent |
Structured output |
Final answer format generated by the dynamic agent for challenging queries. | Dynamic agent |
Data flow
Documents are ingested with hierarchy and retrieval indexes. A dynamic agent decomposes a user query into subqueries, invokes structured/unstructured retrieval subagents, reranks and filters candidate context, and returns structured output. Tool/MCP selection is treated as its own context challenge rather than blindly injecting every tool.
Why this architecture
The architecture combines broad recall with narrow context precision. Agentic RAG improves retrieval by decomposing queries, while rerankers narrow what enters context; constrained subagents and turn limits prevent large-corpus searches from exhausting time and tokens.
Models used: Instruction-following reranker · Dynamic agent · Retrieval subagents · Mix Bread · Claude · MCP servers
Scale
- The retail-universe challenge had just under 100,000 documents.“they had about uh just under a 100,000 documents so PDFs all in the retail space.”transcript, stated
- The retail dataset included logs, tables, and giant CSV files.“retail universe and they had log files uh tables giant CSVs files and we used our dynamic agent to answer really challenging queries”transcript, stated
- The human benchmark was about 23 points, Contextual reported about 25, and the winner about 29.“I think they got 23 points. We got I think about 25 and the winner had about 29.”transcript, stated
- The platform is intended for domains including e-commerce, code, legal, retail, and support.“our goal has been to create a platform that's really end to end and easy to get up and running for any domain and any use case.”transcript, stated“is it very different than like legal and retail and support all these other domains?”transcript, implied
Alternatives considered (roads not taken)
Normal/static RAG without agentic query reformulation
Rejected because: The speaker says decomposing the initial query into subqueries improves performance enough to become the new baseline.
Unlimited retrieval subagent search and validation
Rejected because: On a large dataset, subagents wanted to take too many turns and repeatedly check their work.
Inject all MCP server/tool descriptions up front
Rejected because: MCP's large JSON descriptions can trigger context rot when many fat tools are included.
Patterns
query-rewriting (retrieval)
The dynamic agent reformulates an initial query into subqueries to better match documents before combining retrieval results.
retrieval-ranking (retrieval)
Contextual uses an instruction-following reranker to narrow high-recall retrieval to precise context.
hybrid-search (retrieval)
The cross-domain platform combines filters, rerankers, and hybrid search in the retrieval pipeline.
multi-agent-orchestration (orchestration)
The dynamic agent uses constrained retrieval subagents for structured and unstructured retrieval tasks over large corpora.
tool-use-orchestration (orchestration)
MCP server selection is treated as a context-selection problem because exposing too many tool descriptions creates context rot.
Tradeoffs
Retrieval architecture
Chose agentic RAG with query reformulation over normal RAG alone.
Rationale: Breaking a query into subqueries improves document matching enough to be treated as the new baseline.
Large-corpus agent behavior
Chose turn limits and constrained subagents over letting retrieval agents inspect everything and repeatedly self-check.
Rationale: The dataset was too large for unlimited searching, and repeated subagent validation wasted turns.
MCP use
Chose MCP for prototyping and selected tool use over blindly including every MCP server in the tool list.
Rationale: MCP speeds prototyping, but server selection and security review still need control before scale.
Gotchas (what bit them)
Reranking has a latency-quality tradeoff.
Root cause: Instruction-following rerankers may require larger models, which can strain developer latency budgets.
Resolution: Use reranking where precision into the context window matters, especially for dynamic agents and large databases.
Retrieval subagents over-search large corpora.
Root cause: Given a nearly 100k-document dataset, subagents wanted to inspect too much and validate repeatedly.
Resolution: Add turn limits and explicit constraints on subagent checking/validation.
MCP helps prototype but can create context rot at scale.
Root cause: Tool descriptions are large JSON payloads and selecting among many servers is itself a context problem.
Resolution: Prototype with MCP, then move toward APIs or a more controlled tool interface as use becomes clearer.
Evaluation
The discussed evidence includes reranker developer feedback, a retail-universe context-engineering challenge with human and team scores, and customer human-based evaluations for device test-code generation.
Metrics: retail-universe score: human about 23, Contextual about 25, winner about 29 · just under 100,000 documents · human-based evals for a device code-generation customer · reranker latency complaints
Outcomes
- Contextual's dynamic agent reportedly scored above the human baseline in the retail-universe challenge but below the winning team.
- The platform approach transferred to device test-code generation with strong human-based evaluations.
- The interview frames constrained subagents and context selection as central practices for scaling agentic RAG.
The strongest quantified scale is the retail-universe benchmark with just under 100,000 retail documents plus logs, tables, and giant CSVs.