QuestionQ26

VerifiedContext Compression and Compaction

A context engineer is developing a legal document review agent on Databricks. The agent connects to three MCP servers: one exposing document ingestion and clause extraction tools, one exposing e-signature routing and redlining tools, and one exposing billing, HR lookup, and IT ticketing tools. All 20 registered tool schemas from the three servers are loaded into the model’s context for tool selection on every request. When a user asks for indemnification clause extraction, the agent consumes an excessive number of tokens selecting a tool and makes inconsistent tool selections across repeated identical requests.

What change should the context engineer apply to address these symptoms?

Explanation

An intent-based tool-discovery step can load only the schemas relevant to indemnification clause extraction, rather than all 20 schemas. This reduces context tokens and removes unrelated tools that may compete during selection, improving consistency. Databricks supports discovering MCP tools and limiting which tools are exposed. (docs.databricks.com)

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!