A context engineer is developing a Databricks agent for a retail inventory management system. The system prompt and tool descriptions consume 1,800 tokens of a 4,096-token context window, and the engineer reserves 1,000 tokens for the user turn and model response. The remaining tokens are used for few-shot examples, each costing approximately 250 tokens, so the engineer includes exactly five examples.
The agent uses three tools: inventory_lookup, reorder_check, and supplier_lead_time.
Six candidate examples are available:
Example 1: A warehouse manager asks whether a depleted SKU needs reordering; the agent calls inventory_lookup, confirms depletion, calls reorder_check, and returns a binary reorder decision.
Example 2: A procurement officer asks when a low-stock item can be replenished; the agent calls reorder_check, calls supplier_lead_time, and returns a replenishment recommendation.
Example 3: A store associate asks for the current stock count of a single product; the agent calls inventory_lookup and returns a scalar quantity.
Example 4: A store associate asks for the current stock count of a single product; the agent calls inventory_lookup and returns a structured status object containing the quantity and a restocking flag.
Example 5: A store associate asks whether a forecasted shortfall requires immediate action; the agent calls inventory_lookup, compares against minimums, calls reorder_check, and returns a binary reorder decision.
Example 6: A logistics coordinator asks how long a specific supplier takes to fulfill an order; the agent calls supplier_lead_time and returns a scalar lead-time value.
Which example should the engineer omit to preserve the token budget while maximizing behavioral coverage?
A context engineer is building a regulatory compliance agent on Databricks that connects to an external compliance management platform through an MCP Service registered in Unity Catalog.
The MCP server exposes the following tools:
search_compliance_records: Retrieves existing compliance records without modifying them.
get_submission_status: Checks the status of previously submitted reports.
submit_regulatory_report: Sends a finalized regulatory report to an external authority.
delete_compliance_record: Permanently deletes an existing compliance record.
The agent serves compliance officers who are authorized to retrieve records and submit reports. However, organizational policy requires explicit human approval before every regulatory report submission.
The agent must continue executing read-only tools without interruption. It must also prevent unauthorized destructive operations and maintain an auditable record of tool invocations.
The engineering team has confirmed that the MCP tools function correctly. The remaining requirement is to enforce the approval and authorization rules at the platform governance layer rather than relying exclusively on instructions inside the agent ' s system prompt.
Which approach should the context engineer implement?
A context engineer is building a memory-augmented agent that stores user session memories in Lakebase as an OLTP Postgres table. Each memory record contains columns such as user_id, session_timestamp, preference_category, and confirmed_preference_value. At runtime, the agent must retrieve all confirmed preferences for a specific user that were recorded within the last 30 days. A Databricks AI Search index is created over conversation summary embeddings as part of a delta table synced from the Lakebase, providing an additional data source.
Which retrieval mechanism should the context engineer configure for this type of query?
A context engineer is developing an agent to support legal teams reviewing multi-part pharmaceutical trial protocols. Each protocol document includes a narrative background section, nested dosage tables with footnote qualifiers, cross-referenced section identifiers, and figure captions describing study design diagrams. The agent must answer precise questions such as which protocol section governs a specific dosage threshold and what footnote conditions apply to that threshold.
Available data sources include:
A PDF binary store in Unity Catalog Volumes.
A Delta table of plain-text chunks extracted from the protocols, each tagged with page number and document identifier, indexed in a Databricks AI Search index.
A Delta table of protocol structure metadata at the page level, containing table summaries, figure captions, and section hierarchy, accessible through Unity Catalog functions.
Which context elements should the context engineer include to answer structural and footnote-level questions accurately?
A context engineer is developing a Databricks agent for a financial research platform that answers analyst queries using a vector search index over earnings reports. The agent uses a 180-token system prompt, a 250-token conversation history window, and a RAG pipeline that retrieves 8 document chunks at runtime. Each chunk contains 550 tokens, contributing 4,400 tokens of retrieved context. The model’s context window is 8,192 tokens, leaving just 3,362 tokens for the analyst query and model response. Profiling shows that the retrieved chunks consistently contain repetitive regulatory boilerplate and duplicated table headers that are rarely cited in the model’s final answers.
Which two changes should the context engineer make to reduce the token footprint of retrieved context without discarding relevant financial content?
Choose two
A context engineer is building a retrieval-augmented generation agent on Databricks to answer questions about a large collection of legal contracts. Each contract is a structured PDF averaging 40 pages, with clearly defined sections such as “Definitions,†“Obligations,†and “Termination Clauses.†The embedding model in use has a 512-token context window. User queries are highly targeted, such as “What are the termination conditions in the indemnification clause?â€, and require precise, clause-level retrieval rather than broad document summaries.
Which chunking strategy should the context engineer use?
A context engineer is evaluating a target-landscape research agent at a pharmaceutical R & D organization. Discovery scientists ask the agent to prepare a structured landscape memo about a proposed drug target: what has been studied, who else is in the space, at what clinical phase, and with what regulatory history.
The agent runs as a single agent on Agent Bricks Custom Agents. It retrieves from a Databricks AI Search index built over PubMed, ClinicalTrials.gov, internal program memos, and FDA review documents, and produces the memo in one pass within a single context window.
Narrow queries (one target, one indication) produce accurate memos. Broader landscape queries return with competitor programs missing that the agent had named earlier in its own reasoning, quoted evidence attached to the wrong study, and cross-document fields partially filled. The MLflow trace shows window utilization rising toward the cap before drafting begins. One agent runs throughout.
What change should the AI engineer make to the agent architecture’s boundaries?
A context engineer is building a retail agent with Agent Bricks Custom Agents. The agent has two registered tools: a SQL query tool that queries a live inventory database, and a vector search tool that searches a static product catalog vector index for product descriptions, specifications, and categories. Both tools are configured correctly, function properly, and return valid results when called.
At runtime, when users ask questions such as “Is this item in stock?â€, the agent consistently calls the product catalog tool and provides a plausible availability answer without checking the live inventory database. The product catalog tool is not intended to answer live stock availability questions.
Which context engineering issue explains this behavior?
A context engineer is tuning a compaction prompt for a Databricks agent that summarizes customer support ticket histories before sending them to a downstream LLM. The trace being compacted spans 40 turns, and the compacted output must fit within the downstream LLM’s context window. During initial evaluation against a benchmark of escalated support cases, the engineer observes that the compaction output consistently omits several prior resolutions and key escalation events, even though it fits well within the downstream LLM’s context window.
What tuning step should the engineer take next?
A context engineer is investigating why a Genie space serving the sales operations team gives inconsistent answers to revenue questions. When business users ask the same QUESTION NO: across different sessions, for example, “What was Q3 EMEA revenue?â€, Genie returns different figures. The space is configured over a Unity Catalog managed table of transaction-level data.
On reviewing the space, the engineer finds:
The underlying table has comprehensive table and column comments.
The space’s text instructions describe how revenue should be computed, including currency conversion against a daily FX-rate table, accrual-timing rules, and intercompany-elimination logic.
The space includes several sample questions covering quarterly and regional revenue patterns.
In the query history, Genie composes a new SQL statement for the revenue calculation in each session, and the FX-conversion and elimination steps differ from run to run.
Which change will most reliably stabilize the space’s answers to this team’s revenue questions?
A context engineer manages a Genie space for a finance team. Users repeatedly ask the same shape of QUESTION NO: with different fiscal periods: “What is the total open pipeline by region for FY26 Q1?â€, “...for FY26 Q2?†“...for the last quarter?â€. The SQL pattern Genie generates is identical across these questions (same JOIN, GROUP BY, and aggregation, with only the fiscal-period filter changing), and the team requires that responses to these recurring questions be labeled Trusted in the chat UI. The engineer must register an asset that reuses the same vetted SQL pattern with the user-supplied fiscal period.
Which curation choice should the engineer make?
A context engineer is evaluating a Databricks agent built for a healthcare scheduling platform. The agent’s system prompt is 5,100 tokens and includes detailed instructions for three rarely invoked capabilities, each triggered in fewer than 2% of sessions:
Insurance eligibility verification, which requires calls to a third-party payer API with variable response times
Appointment rescheduling fee calculations, with complex branching logic across dozens of plan types and provider tiers
Medical record release consent workflows, with multi-step conditional logic and regulatory references
The agent’s primary function is answering patient appointment availability queries, which account for 95% of traffic. The team must reduce per-session context cost without degrading task success rate on the dominant use case, and the solution must stay within the existing Databricks agent framework without introducing additional hosted components to manage.
Which loading strategy should the context engineer use for the three rarely invoked capabilities?