Last Chance Black Friday Deal: Take 75% Off! Use coupon code below to secure your exam bundles! - Ends in 0d 00h 00m 00s - Coupon code: my75ex

Home > Databricks > Context Engineer > Context-Engineer-Associate

Context-Engineer-Associate Databricks Certified Context Engineer Associate Question and Answers

Question # 4

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.

Example 1, because the same tools are exercised across Examples 2 and 5, making its specific decision path redundant.

B.

Example 6, because supplier_lead_time is already invoked in Example 2, and a standalone lead-time lookup does not add new tools to the demonstrated call space.

C.

Example 3, because another example in the set covers the same user role and tool path, but the output of the other example is richer.

D.

Example 5, because its forecasting logic duplicates the threshold-check pattern already established in Example 1, and its user role (store associate) appears elsewhere in the set.

Full Access
Question # 5

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.

Add instructions to the system prompt requiring the agent to ask the user for confirmation before invoking submit_regulatory_report, and instruct the agent never to invoke delete_compliance_record.

B.

Increase the model ' s reasoning effort so the agent evaluates the consequences of each MCP invocation before deciding whether user approval is necessary.

C.

Configure the MCP Service with appropriate Unity Catalog permissions and tool restrictions, and attach an input-phase service policy that requires approval for submit_regulatory_report while allowing authorized read-only calls.

D.

Remove all tools capable of modifying external systems from the MCP server and require compliance officers to submit regulatory reports through an independent manual process.

Full Access
Question # 6

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.

A hybrid retrieval combining Databricks AI Search similarity scoring and a structured post-filter, because combining both mechanisms improves recall when querying a bounded time window in Lakebase.

B.

Structured query retrieval against the Lakebase OLTP Postgres table using exact filters on user_id and session_timestamp, over a bounded time range with no need for similarity ranking.

C.

Databricks AI Search against the memory embeddings index with a date range metadata filter, because Databricks AI Search with pre-filtering is the recommended approach for scoping time-bounded memory retrieval in agent frameworks.

D.

Structured query retrieval against the Lakebase OLTP Postgres table using exact filters on user_id, session_id, and preference_category, because scoping the lookup to all three attributes produces the most precise memory retrieval for a single user.

Full Access
Question # 7

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.

The structure metadata Delta table loaded entirely into the prompt as a hierarchy, combined with the Databricks AI Search index, so the model can resolve table and footnote references from the full metadata.

B.

The PDF binary store in Unity Catalog Volumes and the structure metadata Delta table, using document identifiers to locate source files and extract table content through a preprocessing step at query time.

C.

The Databricks AI Search index over plain-text chunks alone, relying on semantic similarity to surface table and footnote content without consulting the structure metadata Delta table.

D.

The Databricks AI Search index over plain-text chunks to retrieve relevant passages, then a scoped lookup into the structure metadata Delta table for table summaries and figure context on the matched pages.

Full Access
Question # 8

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.

Reduce retrieved chunks from 8 to 3 and apply a reranker to select the highest-relevance chunks, preserving pertinent financial content while cutting injected tokens by over 60%.

B.

Switch the retrieval strategy from cosine similarity to MMR to increase diversity across retrieved chunks, reducing redundancy between chunks without modifying chunk size or removing boilerplate.

C.

Reduce each chunk from 550 tokens to 150-200 tokens by splitting at semantic boundaries and stripping repeated regulatory boilerplate and duplicate headers before indexing.

D.

Re-index the earnings reports using a finer-grained embedding model to improve retrieval precision, surfacing more relevant passages without altering chunk boundaries or stripping metadata.

E.

Expand the conversation history window from 250 tokens to 900 tokens to improve multi-turn coherence across analyst sessions and offset token pressure from the retrieved chunks.

Full Access
Question # 9

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.

Use structure-aware chunking that splits documents at section boundaries, then further subdivides sections exceeding 400 tokens to stay within the embedding model’s context window.

B.

Apply paragraph-level chunking across all contracts, splitting each section into individual paragraphs, to maximize retrieval granularity for targeted clause queries.

C.

Split each contract into fixed-size chunks of 512 tokens with 50-token overlaps, ignoring document structure, keeping chunks within the embedding model’s context window.

D.

Embed each contract section as a single chunk without further subdivision, preserving full section context even when sections exceed the embedding model’s context window.

Full Access
Question # 10

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.

Split the agent along the document-source axis (PubMed, ClinicalTrials.gov, internal memos, FDA reviews) and merge per-source outputs in the orchestrator.

B.

Keep the single-agent boundary and lower the within-agent compaction trigger threshold so compaction fires before the memo is drafted.

C.

Split the agent into sub-agents that scope exploration separately from synthesis, with summaries (not raw evidence) crossing the boundary into the synthesis step.

D.

Split the agent into a chain of single-step sub-agents (parse, retrieve, summarize, cluster, verify, cite, draft) connected by sequential handoffs.

Full Access
Question # 11

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.

The product catalog vector index was built from a periodic snapshot, so it may contain stale product metadata.

B.

The tool descriptions and routing guidance are too ambiguous to distinguish live inventory availability questions from static product catalog search.

C.

The inventory tool’s description does not explicitly mention “stock,” “in stock,” or “availability,” even though it correctly queries real-time inventory when called.

D.

The agent prompt does not require source-of-truth checks before generating a final answer, so the agent treats any plausible retrieved context as sufficient.

Full Access
Question # 12

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.

Add a token-count cap to the compaction prompt to shorten the summary and lower downstream inference cost and latency, then check afterward whether the key events were retained.

B.

Add a recency rule that keeps the most recent turns in full and compresses the earlier turns, since the latest exchanges usually carry the most relevant context.

C.

Broaden the compaction prompt’s retention rules to capture all events, resolutions, and escalation signals, accepting a longer summary for now and tightening verbosity in a later iteration.

D.

Add retention rules and pruning rules in the same iteration so recall and precision are tuned together rather than over separate passes.

Full Access
Question # 13

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.

Encapsulate the canonical revenue calculation in a parameterized Unity Catalog SQL function and register it in the space as a trusted asset.

B.

Add a complete example SQL query that performs the full revenue calculation to the space so Genie can learn the pattern.

C.

Expand the text instructions with step-by-step pseudocode for the revenue calculation, giving Genie a more explicit procedure to follow when generating SQL.

D.

Define a SQL expression for revenue in the space’s knowledge store so Genie has a reusable definition of the metric.

Full Access
Question # 14

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.

A parameterized example SQL query with a typed (Date or String) fiscal-period parameter, so Genie can reuse the SQL pattern with the user-supplied value each time the QUESTION NO: is asked.

B.

A Unity Catalog SQL function that defines open_pipeline as a reusable measure, with Genie composing the surrounding per-period and per-region SQL around the function call each turn.

C.

A general instructions text block that describes the desired SELECT, JOIN, WHERE, and GROUP BY structure so Genie can regenerate the SQL on every turn from that description.

D.

Multiple static example SQL queries (one for each commonly asked fiscal period: FY26 Q1, FY26 Q2, last quarter), so Genie matches each user QUESTION NO: to its corresponding vetted example.

Full Access
Question # 15

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.

Compress the three capability instruction blocks using summarization and retain them in the system prompt, reducing token count while keeping all instructions globally available for every session.

B.

Enable server-side prompt caching for the full system prompt so the token cost of the three capability blocks is amortized after the initial session, reducing effective per-session billing over time.

C.

Package each rarely-invoked capability as an Agent Skill so its instruction block is loaded dynamically only when a user query triggers the matching intent, removing those tokens from the baseline prompt.

D.

Move the three capability instruction blocks into a retrieval-augmented index and inject the top-ranked block into the user message turn at query time, keeping the system prompt shorter across sessions.

Full Access