All Databricks exams
Free Databricks Certified Context Engineer Associate practice test: 30 questions with answers
30 original questions for Databricks Certified Context Engineer Associate, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 112 questions
Databricks Certified Context Engineer Associate exam guide: topics, cost and format
All 30 Databricks Certified Context Engineer Associate questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Governance, Evaluation and Operations (10 questions)
Question 1
Which Unity Catalog capability controls who can read the tables that feed an agent's retrieval index?
- APrivileges granted on catalogs, schemas and tables, enforced for every query made against the data
- BThe table's comment field, which lists the names of the people who may read it in the table's description text
- CThe file size of the table's data files, which limits who can open the table in the workspace at all
- DThe chart colour used in the table's dashboard for each team that reads the table's data each week
Show answer and explanationHide answer
Correct answer: AUnity Catalog privileges on catalogs, schemas and tables are enforced for every query. Comments, file sizes and chart colours do not control read access.
Question 2
Which practice supports tracing a wrong agent answer back to the data that informed it?
- ARecording only the final answer, without the retrieved sources or the prompt that was used to produce it
- BDeleting the trace logs once an answer has been reviewed by the business owner, to keep storage costs low
- CLineage and tracing of the retrieval and generation steps, linked to source documents and their versions
- DStoring the traces in a personal notebook on one laptop, which is kept by the team member who built the agent
Show answer and explanationHide answer
Correct answer: CTracing retrieval and generation steps, linked to source versions, lets the team trace a wrong answer to its data. Deleting traces, recording only answers and personal notebooks each remove that ability.
Question 3
Which element belongs in a governed context pipeline?
- AThe office seating plan for the team members who maintain the pipeline, shown on the team's intranet page
- BDocumented data sources, owners, refresh schedules and access policies for each indexed corpus
- CUndocumented manual edits to the index, made by whichever team member is available on the day the change is needed
- DA single shared password for all of the indexes in the workspace, kept on a sticky note near the team's desks
Show answer and explanationHide answer
Correct answer: BDocumented sources, owners, refresh schedules and access policies make a pipeline governed. Seating plans, undocumented edits and shared passwords do not.
Question 4
Which evaluation approach best checks agent answer quality over time?
- AAsking one tester to try three questions once, at the start of the project, and never repeating the check
- BA versioned evaluation set with defined metrics, run on each change to the context or the model
- CChecking only the response length in tokens, which is not related to the quality of the answers the agent gives
- DRelying on user complaints as the only signal, collected monthly in a spreadsheet kept by the support team
Show answer and explanationHide answer
Correct answer: BA versioned evaluation set with defined metrics run on each change tracks quality over time. A one-off test, length checks and complaints alone do not.
Question 5
Which guardrail reduces the risk of an agent disclosing restricted data?
- AOutput filtering and policy checks applied before a response is returned, combined with access controls
- BDisabling the access controls so that the agent can see all of the data and then decide what to show the user
- CAllowing the agent to publish its raw context to a public web page, for transparency about what it has seen
- DStoring restricted data in the prompt so that the model is reminded of its restrictions on every single request
Show answer and explanationHide answer
Correct answer: AOutput filtering and policy checks before response, with access controls, reduce disclosure. Disabling controls, publishing context and placing restricted data in prompts all increase exposure.
Question 6
What should a team do before promoting a changed context pipeline to production?
- ASkipping evaluation because the change only modifies the chunk size of one document in the corpus
- BPromoting the change at once and checking the results only if users report a problem with the answers they receive
- CRunning the evaluation set against the change, comparing the results with the current version, and approving the promotion
- DMaking the change directly in production so that real users test it immediately as it is put into use
Show answer and explanationHide answer
Correct answer: CEvaluating the change against the current version before approval protects quality. Promoting first, skipping evaluation and testing on real users all put production at risk.
Question 7
Which signal best shows that retrieval quality has degraded in production?
- AAn increase in the number of documents in the source folder over the past year as the content grows
- BA rise in the number of users logging in to the chat interface during the working day in the office
- CA change in the colour of the agent's icon in the workspace, which the team noticed while in the office
- DA drop in answer accuracy on monitored questions, traced to retrieval recall or relevance measures
Show answer and explanationHide answer
Correct answer: DAccuracy drops traced to recall or relevance point to retrieval degradation. Login counts, icon colours and growing folders do not measure retrieval quality.
Question 8
Which practice supports a safe rollout of a new retrieval index?
- AKeeping both indexes live but letting users choose the one they prefer without any measurement of the results
- BReplacing the old index immediately without a fallback, since the new one is always better than the old one in practice
- CRolling out at the end of each day without monitoring, so that any problems are found the next morning by users
- DA staged rollout with a fallback to the previous index, and monitoring of key metrics during the rollout
Show answer and explanationHide answer
Correct answer: DA staged rollout with fallback and monitoring limits harm and allows rapid reversal. Immediate replacement, unmonitored night rollouts and unmeasured user choice all increase risk.
Question 9
Which TWO are valid governance practices for agent context? (Choose two.)
- ADefining retention and deletion rules for stored context and memory, in line with policy
- BKeeping memory indefinitely for every user, regardless of consent or the purpose it was collected for
- CAuditing who accessed the context and when, with logs retained for review by the governance function
- DSharing the context of one customer with another customer's agent session to save processing time in the system
- EGiving every developer full access to all customer context by default, to speed up debugging of the agent
Show answer and explanationHide answer
Correct answer: A, CRetention and deletion rules and auditable access logs are core governance practices. Indefinite memory, cross-customer sharing and default full access all breach privacy and control expectations.
Question 10
Which TWO are good practices for operating a context pipeline over time? (Choose two.)
- AMonitoring data freshness and index health, with alerts when a refresh fails or a source goes stale
- BRefreshing the index only when a user complains, so that the operational effort is kept to a minimum
- CVersioning index and prompt changes together, so that a result can be reproduced and rolled back
- DTreating every change as an emergency and making it directly in production without a record kept of it
- EDisabling evaluation runs once the pipeline is live, since it is assumed to be stable from that point on
Show answer and explanationHide answer
Correct answer: A, CMonitoring freshness and health, and versioning index and prompt changes together, support reliable operation and rollback. Complaint-driven refreshes, undocumented emergency changes and disabled evaluation all weaken operation.
Context Assembly and Memory (10 questions)
Question 11
An agent must keep track of a long conversation without exceeding the model's context window. Which approach fits best?
- ADeleting the whole conversation after each answer, so that the context is always empty for the next request
- BSending the entire conversation history on every request, however long it grows, since the model can cope
- CSummarising older turns and keeping recent turns verbatim, with key facts stored as structured memory
- DAsking the user to repeat their earlier questions each time, so that the agent never needs any memory
Show answer and explanationHide answer
Correct answer: CSummarising older turns and keeping recent turns, with structured memory of key facts, fits the window. Full history grows without bound, deleting it loses continuity, and repetition offloads the work to the user.
Question 12
Which element of a prompt tells the agent how to behave and which tools it may use?
- AThe user's typing speed, which the agent uses to decide how long each answer should be in words
- BThe system instructions, which define the agent's role, rules and the tools available to it
- CThe colour theme of the chat interface, which determines how the agent formats its responses visually
- DThe file name of the first document retrieved, which the agent uses to choose a tool at run time
Show answer and explanationHide answer
Correct answer: BSystem instructions define role, rules and tool availability. Typing speed, interface colour and file names do not set behaviour.
Question 13
Why is a token budget planned explicitly when assembling context for an agent?
- ABecause the model stops working entirely after exactly one thousand tokens, regardless of how the context is built
- BBecause tokens are only used for billing and never affect the quality, speed or limits of the model's responses
- CBecause each part of the context, including instructions, retrieved content and tool results, consumes tokens and must fit the window
- DBecause tokens determine the colour of the agent's answer in the interface, which the team must control for branding
Show answer and explanationHide answer
Correct answer: CEvery context component consumes tokens, so the budget must fit the window and preserve the most important content. Billing-only views, a fixed stop limit and colour control are incorrect.
Question 14
Which practice most helps keep an agent's tool results useful inside its context?
- AReturning concise, structured tool outputs with only the fields the agent needs for its next step
- BReturning the entire raw database table for every tool call, so that the agent has all the data it could need
- CReturning stack traces from the tool's internal code on every call, to show the agent how the code works
- DReturning the tool's full log file each time, so that nothing is ever missed in the reasoning of the agent
Show answer and explanationHide answer
Correct answer: AConcise, structured outputs with needed fields keep context focused. Raw tables, stack traces and full logs flood the window with irrelevant tokens.
Question 15
Which memory type stores facts about a specific user across separate sessions for an agent?
- ALong-term memory, persisted in a governed store and retrieved for the matching user when relevant
- BWorking memory held only in the current prompt, which is discarded when the request finishes and is never kept
- CA temperature setting, which keeps track of each user's preferences in the model's sampling parameters
- DA cache of the model's previous token probabilities, which is cleared after every request the model serves
Show answer and explanationHide answer
Correct answer: ALong-term memory persists user facts across sessions in a governed store. Working memory is per request, temperature is a sampling setting, and probability caches are not user memory.
Question 16
Which practice reduces the risk of an agent following instructions hidden inside retrieved documents?
- AGiving retrieved documents the same authority as the system prompt, so the agent follows every sentence it reads
- BTreating retrieved content as data rather than instructions, and separating it from the system prompt
- CAllowing the agent to execute any command written in a retrieved document without asking the user first
- DStoring the system prompt inside the retrieved documents, so that the two are always updated together automatically
Show answer and explanationHide answer
Correct answer: BTreating retrieved text as data and separating it from system instructions reduces injection risk. Giving documents authority, executing commands from documents and merging prompts all increase it.
Question 17
Which TWO are valid ways to keep an agent's context accurate over a long session? (Choose two.)
- ARefreshing outdated facts in memory when the source data changes, with timestamps recorded
- BKeeping stale facts in memory indefinitely, since older information is always more reliable than new
- CSummarising completed tasks so that their details do not crowd out the information needed now
- DMixing the facts of several different users in one shared memory block to save storage in the system
- EDisabling memory writes after the first turn, so that no new information can ever enter the context
Show answer and explanationHide answer
Correct answer: A, CRefreshing facts with timestamps and summarising completed tasks keep context current and focused. Keeping stale facts, mixing users and disabling writes all harm accuracy or privacy.
Question 18
Which practice keeps tool calls from exposing sensitive data to the model?
- ALetting the model choose which fields to return from each sensitive table in the database for each request it makes
- BReturning every column of every table to the model, so that the model can decide for itself what is sensitive
- CLogging the raw tool outputs in the prompt for transparency, so that reviewers can see everything the model saw
- DFiltering tool outputs to remove fields the model should not see, and enforcing permissions inside the tool itself
Show answer and explanationHide answer
Correct answer: DFiltering outputs and enforcing permissions in the tool keeps sensitive fields away from the model. Returning all columns, logging raw outputs and letting the model choose fields all expose data.
Question 19
Which measure best shows whether an agent's context was sufficient to answer correctly?
- AComparing answers against an evaluation set with known correct context and grounded citations
- BCounting the number of tokens in the final answer, regardless of whether the answer is correct or not
- CThe number of words the agent used in its greeting message at the start of each conversation with a user
- DThe colour of the response bubble in the chat interface, which is chosen by the design team each year
Show answer and explanationHide answer
Correct answer: AComparing answers with known-correct context and citations shows sufficiency. Token counts, greeting length and bubble colour do not measure whether the context was adequate.
Question 20
Which TWO are valid techniques for reducing prompt size without losing key facts? (Choose two.)
- ACompressing older context into a summary that keeps the facts and decisions the agent still needs
- BRepeating the same instructions several times in each prompt, to make sure they are never forgotten
- CRemoving the citations that are needed to verify the grounded answer that the agent has produced
- DKeeping only the most relevant retrieved chunks after reranking, so the prompt holds the best evidence
- EIncluding whole documents when only one section of each document is needed to answer the question
Show answer and explanationHide answer
Correct answer: A, DSummarising older context while keeping facts, and keeping only the best reranked chunks, reduce size without losing key content. Repetition, removing citations and including whole documents waste tokens or break grounding.
Context Design and Retrieval (10 questions)
Question 21
An agent must answer questions from thousands of internal documents that change daily. Which design gives it current, grounded context?
- AFine-tuning the foundation model on a snapshot of the documents once each year, with no further updates to the model
- BRetrieval-augmented generation over a Delta table of chunked documents, indexed with Mosaic AI Vector Search and synced as the source changes
- CPasting every document into the prompt on every request, regardless of how many tokens the documents contain
- DStoring the documents as screenshots in a folder, so that the model reads the images directly at query time
Show answer and explanationHide answer
Correct answer: BRetrieval over chunked documents, indexed and synced with the source, keeps context current and grounded. Yearly fine-tuning goes stale, full-prompt pasting exceeds token budgets, and screenshots are not an efficient retrieval design.
Question 22
Why does chunk size matter in a retrieval pipeline for an agent?
- ASmaller chunks always produce better answers, so the largest possible number of chunks should be created by default
- BChunk size has no effect on retrieval quality, because the embedding model always captures the full meaning anyway
- CChunks must always be exactly one page long, since any other size prevents the index from being built at all
- DChunks that are too large dilute relevance and waste tokens, while chunks that are too small lose the surrounding meaning
Show answer and explanationHide answer
Correct answer: DChunk size trades relevance against context completeness and token cost. Ignoring size, forcing page-length chunks and always preferring small chunks are all incorrect.
Question 23
Which retrieval approach combines keyword matching with semantic similarity to improve recall for an agent?
- AExact-match search only, which returns documents only when they contain the identical wording of the query
- BHybrid search, which combines keyword and vector similarity scores before ranking the results returned
- CRandom sampling of documents from the corpus, which gives each document an equal chance of being included
- DSorting all documents alphabetically by title and returning the first ten titles for each query received
Show answer and explanationHide answer
Correct answer: BHybrid search merges keyword and vector scores for better recall and precision. Exact match only, random sampling and alphabetical sorting do not combine both signals.
Question 24
What is the purpose of a reranking step after the initial retrieval for an agent?
- ATo translate each retrieved document into a different language before the agent sees any of its contents
- BTo delete every retrieved candidate that was returned by the first query, so that the agent starts afresh
- CTo reorder the retrieved candidates by a more precise relevance model before the best ones are placed in the context
- DTo store the retrieved documents permanently in the model's weights so that later queries do not need retrieval
Show answer and explanationHide answer
Correct answer: CReranking reorders candidates with a more precise model so the most relevant reach the context window. Deleting, translating and training into weights are not reranking.
Question 25
Which metadata most helps an agent filter retrieved content to the right user or business unit?
- AThe colour of the document's cover page, which the retrieval system reads to classify the document
- BThe file size of each document in bytes, which is recorded for storage budgeting purposes only
- CThe date the document was first printed on paper in the office archive, recorded as an image scan
- DAccess and ownership metadata attached to each chunk, used as filters in the retrieval query
Show answer and explanationHide answer
Correct answer: DAccess and ownership metadata used as filters enforce who sees what in retrieval. File size, print dates and cover colours do not control access.
Question 26
Which step should come first when preparing source documents for a retrieval index?
- AIndexing the documents before deciding which source tables and folders are in scope for the agent at all
- BEmbedding the raw binary files directly without parsing, so that the index contains the exact original bytes
- CParsing and cleaning the source documents, then chunking them with preserved metadata such as source and section
- DRemoving all headings from the documents, since they only add tokens and never help retrieval quality
Show answer and explanationHide answer
Correct answer: CParsing, cleaning and chunking with metadata must come before indexing, so retrieval is meaningful. Embedding raw bytes, indexing before scoping and removing headings all reduce quality.
Question 27
An agent retrieves relevant chunks but still gives wrong answers. Which check is most useful first?
- AChecking whether the retrieved chunks actually contain the answer, separately from how the model used them
- BReplacing the foundation model with a larger one before examining what was retrieved for the failing questions
- CIncreasing the temperature setting of the model, so that it guesses the answer more creatively each time
- DDeleting the evaluation dataset, since it is probably out of date and therefore misleading the team's work
Show answer and explanationHide answer
Correct answer: ASeparating retrieval quality from generation quality locates the fault. Swapping models, raising temperature and deleting evaluation data skip the diagnosis.
Question 28
Which TWO practices help an agent keep retrieved context relevant and within budget? (Choose two.)
- ALimiting the number of retrieved chunks and ranking them by relevance before they enter the prompt
- BIncluding every retrieved chunk in the prompt, since the model can always ignore the irrelevant ones later
- CRepeating the full user query many times in the context, to increase the emphasis on what the user asked
- DFiltering retrieved content by metadata such as recency or ownership before ranking it
- EPadding the prompt with random text so that the context window is always filled to its maximum size
Show answer and explanationHide answer
Correct answer: A, DLimiting and ranking chunks, and filtering by metadata, keep context relevant and within budget. Including everything, repeating queries and padding waste tokens and dilute relevance.
Question 29
Which index type keeps a retrieval index synchronised as the source Delta table changes?
- AA static CSV export of the table, which is loaded into memory once when the agent starts and never refreshed
- BA Delta Sync index in Mosaic AI Vector Search, which updates the index automatically from the source table
- CA screenshot of the table saved every hour to a shared folder, which the agent reads as its only source
- DA printed copy of the table kept in the office, which staff scan into the agent manually when they remember
Show answer and explanationHide answer
Correct answer: BA Delta Sync index updates from the source table, keeping retrieval current. CSV snapshots, screenshots and printed copies go stale or require manual work.
Question 30
Why do embeddings matter for an agent's retrieval step?
- AThey map text into vectors so that semantically similar chunks can be found by similarity search
- BThey encrypt the text of each document so that the agent can read it only after a password is supplied
- CThey compress each document into a smaller file to save storage in the workspace for the team's use
- DThey rename each document with a unique number so that the agent can find it by name in the folder
Show answer and explanationHide answer
Correct answer: AEmbeddings represent meaning as vectors so similarity search finds related chunks. Encryption, compression and renaming are not their purpose.