DatabricksContext Compression and Compaction

Choose Retrieval Strategy & Permitting — Databricks Context Associate Practice Question

A representative Databricks Certified Context Engineer Associate (Databricks Context Associate) exam question on Choose Retrieval Strategy & Permitting. Work through it below, then read why each option is right or wrong.

This question is part of the free Databricks Certified Context Engineer Associate practice test.

Short answer

The correct answer is A. Combine retrieval with a secondary validation layer: retrieve top-N results using standard ranking, then apply a rule-based filter that explicitly checks for known rare-failure patterns (e.g., amendment conflicts, revoked permits) before returning results..

A secondary validation layer preserves high recall for rare cases by explicitly checking for known failure patterns after initial retrieval. This ensures rare but critical records are not filtered out by standard ranking. Aggressive caching risks missing rare historical cases that fall outside the cache window. Pruning old records eliminates the very historical context needed to catch revocations and amendments. Keyword-only retrieval loses semantic understanding of zoning relationships and may miss relevant records. The two-stage approach aligns with Databricks guidance on structured retrieval for high-stakes compliance scenarios.

The Question

A municipal permitting department uses a Databricks agent to retrieve historical permit records, zoning regulations, and inspection reports to validate new applications. Rare failure cases—such as conflicting zoning amendments or long-buried permit revocations—occur in fewer than 2% of queries but cause significant rework when missed. The department wants to optimize retrieval performance while maintaining high recall for these rare cases. Which strategy best addresses this constraint?

ACombine retrieval with a secondary validation layer: retrieve top-N results using standard ranking, then apply a rule-based filter that explicitly checks for known rare-failure patterns (e.g., amendment conflicts, revoked permits) before returning results.Correct
BImplement aggressive caching of the most frequently accessed permits and zoning regulations with a 24-hour TTL, so common queries return quickly and retrieval load on the Vector Search index drops during busy hours.
CUse semantic pruning to exclude permit records and inspection reports older than 5 years from the Vector Search index, reducing the search space and improving query speed for current permit applications.
DReplace semantic search with keyword-only retrieval over permit numbers and zoning codes, removing the overhead of embedding computation and vector similarity scoring on each query from the permitting staff.

Why A is correct

A secondary validation layer preserves high recall for rare cases by explicitly checking for known failure patterns after initial retrieval. This ensures rare but critical records are not filtered out by standard ranking. Aggressive caching risks missing rare historical cases that fall outside the cache window. Pruning old records eliminates the very historical context needed to catch revocations and amendments. Keyword-only retrieval loses semantic understanding of zoning relationships and may miss relevant records. The two-stage approach aligns with Databricks guidance on structured retrieval for high-stakes compliance scenarios.

Why the other options are wrong

Option B: Implement aggressive caching of the most frequently accessed permits and zoning regulations with a 24-hour TTL, so common queries return quickly and retrieval load on the Vector Search index drops during busy hours.

Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Option C: Use semantic pruning to exclude permit records and inspection reports older than 5 years from the Vector Search index, reducing the search space and improving query speed for current permit applications.

Option C does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Option D: Replace semantic search with keyword-only retrieval over permit numbers and zoning codes, removing the overhead of embedding computation and vector similarity scoring on each query from the permitting staff.

Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Key idea: Choose Retrieval Strategy & Permitting

A secondary validation layer preserves high recall for rare cases by explicitly checking for known failure patterns after initial retrieval. This ensures rare but critical records are not filtered out by standard ranking. Aggressive caching risks missing rare historical cases that fall outside the cache window. Pruning old records eliminates the very historical context needed to catch revocations and amendments. Keyword-only retrieval loses semantic understanding of zoning relationships and may miss relevant records. The two-stage approach aligns with Databricks guidance on structured retrieval for high-stakes compliance scenarios. On the Databricks Context Associate exam, questions in the "Context Compression and Compaction" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.

Ready to see how you'd score?

Take the free practice quiz and find out which Databricks Certified Context Engineer Associate domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related Databricks Certified Context Engineer Associate Practice Questions

Official sources used

Verify program and exam details at the source before scheduling.