A context engineer manages a personalized travel planning agent deployed on Databricks. The agent uses Databricks Agent Memory backed by Lakebase to retain durable user preferences across independent conversations.
Memory entries are organized using actor_id, session_id, and path.
During an earlier conversation, User42 stated that they preferred economy-class flights. The application persisted this preference in the memory store using:
actor_id: User42
path: /preferences/flight-class.md
content: Prefers economy-class flights.
session_id: Unset
Three months later, User42 explicitly changes their preference to business-class flights for future travel. The agent must retain the updated preference across all subsequent sessions without creating competing entries that could cause contradictory recommendations.
The application must also ensure that User42 ' s preference does not affect memories belonging to other users.
Which memory-management operation should the context engineer configure?
A context engineer is debugging a long-running data pipeline orchestration agent that runs multi-step workflows using registered Databricks tools such as run_job, query_catalog, and validate_schema. After compaction occurs at turn 40, the agent starts re-invoking tools it successfully called earlier in the session and ignores results that downstream steps depend on. Inspection of the compacted context shows that the summarization prompt was instructed to retain only the final state of each pipeline stage. The current compaction prompt reads: “Summarize the current pipeline state in a few sentences and include only what is necessary.”
Which revision to the compaction prompt addresses the coherence failure while keeping token cost low?
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 context engineer is preparing to deploy a per-tenant Databricks agent for a SaaS retail analytics platform. Each platform customer is provisioned with their own Unity Catalog catalog, retail_ & lt;customer & gt;, and within each tenant catalog, data is organized by business domain rather than by origin.
The sales schema contains the customer’s POS transaction and returns tables, which the customer’s source systems write to throughout the day, alongside the daily_sales_by_store, hourly_revenue_by_category, and top_skus_weekly summary tables that a nightly Lakeflow Jobs pipeline produces by reading those POS tables. The inventory schema contains stock-level and inbound-shipment tables written continuously by ingestion, alongside demand_forecast_7d and reorder_suggestions tables produced by the SaaS’s ML pipelines. The customer schema contains customer master records and contact tables, all populated by ingestion.
The SaaS deploys one agent per customer through Model Serving, and each agent has its own service principal. Before any agent endpoint is registered, the governance requirements are that an agent for a given customer must be able to retrieve data only from that customer’s catalog and never from another customer’s catalog, and that within its own customer’s catalog, the agent must be able to retrieve only from tables populated directly by the customer’s ingestion pipelines, never from nightly summaries, forecasts, or other tables produced by SaaS pipelines.
Which governance approach should the context engineer implement for each tenant’s agent before registration?
A context engineer is examining MLflow experiment tracking results comparing two system prompt configurations for a Databricks agent designed to assist with contract review. Configuration P uses a role declaration, a full task instruction, and a dedicated edge-case handling section that explains in prose how the agent should respond to ambiguous or overlapping clause types, averaging 205 tokens per call and 81% clause-classification accuracy. Configuration Q retains the role declaration, removes the prose edge-case handling section, shortens the task instruction to a concise directive, and adds three few-shot examples, each showing how the agent should classify a distinct edge-case clause type, averaging 340 tokens per call and 93% clause-classification accuracy. The token budget increases by 135 tokens per call between Configuration P and Configuration Q. Latency rises from 290 ms to 380 ms.
Which conclusion is supported by these experiment tracking results?
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 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 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?
An AI engineer is developing a multimodal agent for a media company’s archive team. The archive contains thousands of titles spanning two decades (full episodes, raw interviews, and unedited B-roll), ingested as monolithic files. Producers use the agent to answer visual content questions about archival footage, such as whether a specific asset contains a usable exterior shot of a landmark. When a producer asks this type of question, the agent’s retrieval tool loads the full asset into context so the model can examine it, even though only a small portion of the asset is relevant. After a few such retrievals, the context window fills. The engineer needs to reduce context pressure through proactive design changes rather than relying on compaction.
Which proactive context management strategy should the engineer use to address this problem?
A context engineer is evaluating a Databricks customer support agent that handles complex multi-turn conversations involving subscription changes, billing adjustments, and service cancellation requests.
The agent uses Lakebase-backed session storage to maintain conversation history. MLflow 3 tracing is enabled, and each inference trace includes a session identifier.
During testing, the engineer observes the following behavior:
Turn 1: The customer requests cancellation of an existing subscription.
Turn 2: The agent correctly identifies the subscription and explains the cancellation procedure.
Turn 4: The customer specifies that cancellation must occur at the end of the current billing cycle.
Turn 6: The agent retrieves the relevant cancellation policy and correctly answers a billing question.
Turn 8: The agent generates a final confirmation stating that the subscription will be canceled immediately, overlooking the customer ' s earlier instruction to cancel at the end of the billing cycle.
Individual response evaluations show high correctness and relevance scores. However, the operations team suspects that the agent is failing to preserve important information across conversational turns.
The engineer needs an evaluation mechanism that detects failures involving information introduced earlier in a conversation, rather than scoring each response independently.
Which MLflow evaluation approach should the context engineer implement?
A context engineer is building an AI application that tracks every prompt sent to a large language model, the retrieved context chunks passed to it, and the final generated response. The application must capture token usage, latency metrics, and user feedback scores associated with each inference run. The engineer needs a unified system that versions prompt templates alongside model artifacts, links evaluation results to specific runs, and provides a query interface so downstream dashboards can compare performance across experiment iterations, all without building a custom logging backend.
Which Databricks product should the context engineer use to meet these requirements?
A context engineer is troubleshooting a Databricks agent responsible for a multi-month clinical trial data processing pipeline. The agent uses a fixed sequential chaining strategy, running each processing stage in a predetermined order regardless of which stages have already completed successfully. When upstream data sources are delayed or partially available, the agent restarts the entire chain from the beginning, discarding all previously completed stage outputs. Logs show that stages with no dependency on the delayed source are being blocked unnecessarily, and total pipeline runtime has grown to an unacceptable length because of repeated full restarts on partial failures.
Which two changes should the context engineer make to resolve the observed failure pattern?
Choose two
A context engineer is developing a Databricks agent that autonomously manages a multi-day incident response workflow. The agent processes a continuous stream of structured log entries, tool call results, and short status updates. Recent messages tend to guide decisions, while earlier messages are often superseded by newer updates during the workflow. The engineer is considering whether to implement a hard-coded sliding-window trimming heuristic that drops messages older than a fixed turn count, or to invest in a semantic compaction approach that summarizes and condenses prior context before dropping it.
Which characteristic of this agent’s information relevance pattern justifies using the hard-coded sliding-window trimming heuristic instead of a semantic compaction approach?
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 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?