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 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 building a Databricks research agent that produces analyst reports where every claim must cite a verifiable source: a reviewer must be able to trace each citation back to its exact original source text. At each step, the agent calls a retrieval tool that returns several short source snippets, writes a reasoning trace explaining how those snippets support its conclusions, and appends both the snippets and the reasoning to a running context reused by later steps. As the run grows, the accumulated context pushes per-step token cost above the team’s budget, so the context must be compacted to reduce token spend.
Which compaction strategy meets both the citation requirement and the need to reduce tokens?
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 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 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 building a Databricks agent to orchestrate a multi-step data quality remediation workflow across a large enterprise dataset. The agent iterates through validation rules, flags violations, applies corrections, and logs every remediation action. The workflow can span dozens of steps and may be interrupted by cluster preemption or network timeouts. Business stakeholders require every correction applied to the dataset to be traceable and reversible, and the agent must be able to resume mid-workflow without reapplying corrections already committed to prior records.
Which state management approach meets these requirements?
A context engineer is debugging a Databricks agent that supports a multi-turn customer support application. The agent keeps a running summary of all conversation history across every user session in a single vector index and retrieves it on every turn through semantic search. Users report that the agent loses track of facts stated earlier in the same session, while unrelated details from other users’ past sessions appear unexpectedly. Latency has also increased as conversation volume grows.
Which storage configuration correctly resolves the memory type mismatch that is causing this degraded behavior?
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 configuring a Databricks agent for an automotive service center platform. The agent must serve service center staff who submit a vehicle identification number (VIN) and a reported symptom. The agent is expected to return a summary of the vehicle’s operating profile, identify the applicable SOP procedure code for the symptom, and retrieve the narrative step-by-step service instructions for that procedure. The engineer has access to these data sources:
Unity Catalog Delta table named vehicle_profiles with columns vin, engine_type, and operating_spec.
Unity Catalog Delta table named symptom_sop_map with columns symptom_code and sop_procedure_code.
Unity Catalog Delta table named service_history with columns vin, service_date, and technician_id.
Databricks AI Search index built from scanned OEM service manuals containing narrative SOP instructions and safety warnings.
Which combination of context elements correctly supports the agent’s task?
A context engineer is building a personalized shopping assistant agent on Databricks. The agent is deployed for returning users who expect it to remember their stated product preferences and past purchase topics from previous conversations. After several weeks in production, users consistently report that every new session feels like a first interaction, with no recognition of their preferences or history.
What should the engineer configure to properly resolve this limitation?
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?