A context engineer is assessing a Databricks agent that coordinates a multi-week pharmaceutical supply chain compliance workflow across dozens of distribution centers. The agent uses a flat task decomposition strategy, dividing the entire workflow into a single-level list of atomic tasks that are dispatched and tracked independently. The workflow contains clusters of tightly coupled sub-tasks, such as per-facility inspection records that must all complete before a regional compliance certificate can be issued, and the agent repeatedly fails to coordinate these cluster-level completions correctly. Logs show that the agent loses track of intermediate group states, issues compliance certificates prematurely on incomplete facility data, and cannot recover gracefully when individual facility inspection tasks fail.
Which two changes should the context engineer make to resolve the observed failure?
Choose two
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 a multi-agent pipeline on Databricks where a coordinating agent breaks down a document analysis task and dispatches subtasks to three specialized sub-agents. After deployment, the sub-agents produce outputs that are internally consistent but contradict one another and do not reflect earlier inferences made at the pipeline level. The sub-agents have access to the same retrieval index, the embedding model is verified as current, and individual sub-agent outputs are accurate when tested in isolation with full context supplied manually.
What is a reasonable root cause of the downstream failures?
A data analyst is creating a Genie space for a hospital operations team that needs to analyze emergency department wait times, patient discharge rates, and nurse-to-patient ratios. The engineer has added the relevant tables, written general instructions describing the hospital operations domain, and configured sample questions. Stakeholders require any metric involving nurse-to-patient ratios to use the official staffing calculation defined by the compliance team, but Genie should still answer free-form questions about discharge rates and wait times using ad hoc SQL when no trusted asset covers the question.
Which approach should the engineer use to meet both requirements?
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 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 is building a multi-agent Databricks workflow where an orchestrating agent coordinates five sub-agents, each performing document analysis, entity extraction, and summarization tasks. The orchestrator receives the complete raw output from each sub-agent, including intermediate reasoning chains, extracted entity lists, and status messages, and appends all of it to its running context window before issuing follow-up instructions. After scaling to production document volumes, the orchestrator’s context window consistently saturates before all sub-agent results are processed, causing truncation errors and a loss of task coherence.
Which two changes to sub-agent output design would reduce the orchestrator’s context load while preserving the information it needs to continue coordinating tasks?
Choose two
A context engineer is developing a Databricks legal research agent for an international financial services organization. The agent uses a DELTA_SYNC Databricks AI Search index containing regulatory compliance documents for the United States, United Kingdom, and European Union.
Each document chunk includes the following metadata:
jurisdiction: The regulatory jurisdiction to which the document applies.
document_status: Whether the document is active, superseded, or archived.
effective_date: The date on which the regulatory provision became effective.
document_id: The unique identifier of the source document.
The agent uses semantic similarity search with num_results=10 to retrieve regulatory evidence.
During MLflow evaluation, the engineer discovers that questions about current UK financial reporting obligations frequently retrieve superseded UK regulations and highly relevant US regulatory documents. The resulting answers are technically plausible but cite requirements that do not apply to the user ' s jurisdiction or requested reporting period.
The embedding model produces accurate semantic similarity scores, and increasing num_results does not improve regulatory correctness.
The engineer must preserve semantic retrieval while ensuring that only regulations applicable to the requested jurisdiction and reporting date are considered.
Which retrieval configuration should the context engineer implement?
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?
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