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:

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"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

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.

“being able to bake it down into subqueries so that you can better match those queries to documents that you might want to retrieve and then combine that for the retrieval.”transcript, stated
“multimodal ingestion and an ability to get the hierarchy of the document contents and then retrieval pipeline that includes you know filters, rerankers, hybrid search.”transcript, stated

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.

“when you're reasoning over larger and larger databases, you want to be able to have more recall in those initial retrievalss, but you want more precision for what you're actually putting into the context window”transcript, stated
“having turn limits and limits on the sub agents uh checking and validating their work is super important.”transcript, stated

Models used: Instruction-following reranker · Dynamic agent · Retrieval subagents · Mix Bread · Claude · MCP servers

Scale

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.

“Even that step improves performance so dramatically that you know that's kind of that became the new baseline.”transcript, stated

Unlimited retrieval subagent search and validation

Rejected because: On a large dataset, subagents wanted to take too many turns and repeatedly check their work.

“that agent will want to take that sub agent let's say the unstructured retrieval or structured retrieval sub agent will want to take so many turns to make sure they you know looked under every rock in the data set”transcript, stated
“it turns out the sub agent would want to check its work over and over and over.”transcript, stated

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.

“MCP is this giant JSON thing up front. You stuffing in the descriptions of all the tools and so it's very quickly you get into straight up context rot when you have like 10 tools”transcript, stated

Patterns

query-rewriting (retrieval)

The dynamic agent reformulates an initial query into subqueries to better match documents before combining retrieval results.

“doing query reformulation. So when you receive that initial query, being able to bake it down into subqueries so that you can better match those queries to documents”transcript, stated

retrieval-ranking (retrieval)

Contextual uses an instruction-following reranker to narrow high-recall retrieval to precise context.

“We released the first instruction following reanker in March.”transcript, stated
“that reanker can really help you narrow down that initial retrieval.”transcript, stated

hybrid-search (retrieval)

The cross-domain platform combines filters, rerankers, and hybrid search in the retrieval pipeline.

“retrieval pipeline that includes you know filters, rerankers, hybrid search. All of that combined is a really great starting point”transcript, stated

multi-agent-orchestration (orchestration)

The dynamic agent uses constrained retrieval subagents for structured and unstructured retrieval tasks over large corpora.

“having turn limits and limits on the sub agents uh checking and validating their work is super important.”transcript, stated

tool-use-orchestration (orchestration)

MCP server selection is treated as a context-selection problem because exposing too many tool descriptions creates context rot.

“selecting which MCP servers to use. uh being able to select those servers is already like a context challenge because there's so many of them.”transcript, stated

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.

“agentic rag is just generally better than rag even that initial incremental step of making that uh doing query reformulation.”transcript, stated

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.

“you don't want unlimited, you know, whether you're enforcing that within like the RL reward structure or with explicit instructions in the system prompt.”transcript, stated

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.

“I think it's really helped people prototype faster and show value in an early version to then kind of build out in larger scale.”transcript, stated
“you kind of still want a human to make that selection of what you're going to include in your list of tools. You want to check, you know, the security”transcript, stated

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.

“that is like the biggest complaint I've heard from developers about our reanker.”transcript, stated
“what we're using it for increasingly is for dynamic agents”transcript, stated

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.

“with a data set that large that agent will want to take that sub agent let's say the unstructured retrieval or structured retrieval sub agent will want to take so many turns”transcript, stated

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.

“MCP has been a huge driver of context engineering”transcript, stated
“I'm moving more toward API calls and something a little bit more uh once I've kind of maybe been able to prototype with an MCP server and figure out how I'm going to use this.”transcript, stated

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

“I think they got 23 points. We got I think about 25 and the winner had about 29.”transcript, stated
“actually had state-of-the-art or I guess uh the highest uh humanbased evals for that customer compared to you know coding platforms.”transcript, stated

Outcomes

The strongest quantified scale is the retail-universe benchmark with just under 100,000 retail documents plus logs, tables, and giant CSVs.

“we used our dynamic agent to answer really challenging queries in this and generate structured output”transcript, stated
“it requires a bit of customization but I think context engineering you know”transcript, stated