CCDV-F Practice Questions: Prompt and Context Engineering Domain
Test your CCDV-F knowledge with 10 practice questions from the Prompt and Context Engineering domain. Includes detailed explanations and answers.
CCDV-F Practice Questions
Master the Prompt and Context Engineering Domain
Test your knowledge in the Prompt and Context Engineering domain with these 10 practice questions. Each question is designed to help you prepare for the CCDV-F certification exam with detailed explanations to reinforce your learning.
Question 1
A support assistant has a long conversation history. Earlier in the chat, a customer incorrectly stated that their plan was expired. Later, the billing system confirmed the plan is active, but Claude keeps drafting responses that mention expiration. The developer wants the most direct prompt/context fix without changing the model or API flow. What should the developer do first?
Show Answer & Explanation
Correct Answer: B
Correct answer (B): The failure is caused by context drift: stale or contradicted information remains in the context window and continues to influence the response. The best first fix is to remove or compact the old history so the current state is explicit and obsolete assumptions are not competing with it.
Why the other options are wrong:
- Option A: Increasing response length may produce a longer answer, but it does not remove the stale assumption that is steering the model.
- Option C: A reminder may help slightly, but it leaves the contradictory context in place and is less direct than resetting or compacting the task state.
- Option D: Appending more raw transcript increases context bloat and may bury the correction rather than eliminating the stale information.
Question 2
A workflow routes Claude's response into downstream code that requires this object: Required fields: - priority: one of "low", "medium", "high" - escalate: boolean - reason: string Recent response: {"priority":"urgent","escalate":"yes","reason":"Customer is angry"} What is the best implementation change?
Show Answer & Explanation
Correct Answer: A
Correct answer (A): Prompt instructions should explicitly state required fields, types, and allowed values, but production code should still validate Claude's output before using it. Defensive parsing is needed because prompt wording alone cannot guarantee exact schema compliance.
Why the other options are wrong:
- Option B: A general reminder is weaker than specifying the exact schema and does not add the required application-level validation.
- Option C: Silent coercion may hide invalid model output and can create incorrect downstream behavior when the allowed enum and types are strict.
- Option D: Reducing fields may lower complexity, but it changes the required contract rather than solving the schema-compliance and validation issue.
Question 3
A claims-processing application asks Claude to extract reimbursement amounts from submitted receipts. The prompt says, `Return the total exactly as shown.` During testing, some totals are plausible but do not match the receipt text. The extracted value is used to create a payment request. What is the best primary implementation response?
Show Answer & Explanation
Correct Answer: A
Correct answer (A): For a critical downstream action, prompt wording alone is not enough. The application should remain skeptical of confident outputs and validate extracted values against the source context before using them to create payment requests, with safe handling for mismatches.
Why the other options are wrong:
- Option B: Stronger wording can reduce errors but cannot guarantee correctness, especially when money movement depends on the output.
- Option C: Plausibility is not the same as source correctness and is unsafe for a payment-triggering workflow.
- Option D: More examples or receipts may add noise and does not directly verify the current extracted amount.
Question 4
A lead-routing application uses Claude to classify incoming leads. The team reviewed 50 failures and found that most invalid outputs use labels outside the allowed list. Artifact: Allowed labels: "enterprise", "midmarket", "startup", "student" Invalid outputs observed: "small business", "university", "large company" Current instruction: "Classify the lead type." What is the BEST prompt refinement?
Show Answer & Explanation
Correct Answer: A
Correct answer (A): Prompt refinement should target the observed failure mode. Since the issue is invalid labels, the prompt should provide explicit allowed values and require an exact selection, ideally paired with downstream validation in the application.
Why the other options are wrong:
- Option B: General guidance adds context but does not directly constrain the invalid-label failure mode.
- Option C: Allowing any descriptive label makes the exact problem worse by encouraging unconstrained outputs.
- Option D: Post-processing may catch some variants, but removing label constraints reduces reliability at the generation step.
Question 5
A long-running legal research assistant starts using an outdated jurisdiction from earlier in the chat. Transcript excerpt: Turn 4: User asked about California employment law. Turn 19: User switched to New York employment law. Turn 27: Current user asks for a New York-only memo. Claude response: "Under California rules..." What is the best primary fix?
Show Answer & Explanation
Correct Answer: A
Correct answer (A): This is context drift: stale prior context is influencing the current answer. The best primary mitigation is to reset, prune, or compact the context so only the current jurisdiction and relevant facts remain salient.
Why the other options are wrong:
- Option B: Repeated reminders add more tokens and may not overcome stale, conflicting context that remains in the window.
- Option C: Keeping the full transcript preserves the outdated California context that is already causing incorrect answers.
- Option D: More examples add bloat and do not directly remove the stale jurisdiction that is contaminating the answer.
Question 6
A document-extraction service uses Claude output as input to a downstream JSON parser. The parser fails intermittently. Artifact: Expected schema: { "invoice_id": "string", "currency": "USD|EUR|GBP", "total": "number" } Model output: "The invoice appears to be { invoice_id: A-9, currency: dollars, total: '104.20' }." Parser error: invalid JSON; currency not allowed enum; total is string What is the best implementation response?
Show Answer & Explanation
Correct Answer: B
Correct answer (B): Structured output should be explicitly constrained and validated by application code. When validation fails, a targeted repair or retry that includes the specific validation errors is safer than accepting malformed JSON, silently coercing fields, or pushing ambiguity downstream.
Why the other options are wrong:
- Option A: Loosening the parser may reduce failures but can hide malformed or semantically invalid outputs, such as unsupported enum values.
- Option C: A general request to be careful is weaker than explicit schema constraints and does not provide a robust recovery path for parse failures.
- Option D: Passing raw model text downstream spreads the parsing problem and makes downstream behavior less predictable.
Question 7
A compliance assistant answers questions using a provided policy excerpt. Reviewers find that when the excerpt does not contain the answer, Claude still gives a confident policy explanation. The primary goal is to reduce unsupported answers in the response format. What prompt change is best?
Show Answer & Explanation
Correct Answer: A
Correct answer (A): When answers must be grounded in provided context, the prompt should explicitly constrain the source of truth and define how to handle uncertainty or missing evidence. Requiring a specific fallback such as "not found" reduces unsupported confident output.
Why the other options are wrong:
- Option B: Using general knowledge may fill gaps, but it conflicts with the requirement to avoid unsupported answers from outside the provided excerpt.
- Option C: A confidence score can appear useful, but it does not prevent unsupported answers if evidence is still not required.
- Option D: Longer explanations may make unsupported reasoning more persuasive without improving grounding.
Question 8
A legal knowledge assistant must answer only from retrieved contract clauses. It recently gave a confident answer that was not supported by the supplied context. Artifact: User question: Can the vendor terminate for convenience? Retrieved context: Clause 8.1: Customer may terminate for convenience with 30 days' notice. Clause 8.2: Either party may terminate for uncured material breach after 15 days. Claude answer: Yes. The vendor may terminate for convenience with 30 days' notice. What is the best prompt/context adjustment?
Show Answer & Explanation
Correct Answer: C
Correct answer (C): For document-grounded tasks, the prompt should define how Claude uses source material and what to do when support is insufficient. The retrieved clauses support customer convenience termination, not vendor convenience termination, so the desired behavior is to avoid unsupported confident claims.
Why the other options are wrong:
- Option A: Less certainty changes tone but does not enforce source-grounded reasoning or insufficient-evidence behavior.
- Option B: More unrelated context can bloat the prompt and does not address the unsupported claim pattern.
- Option D: Rewriting clauses may preserve the same misunderstanding and adds an unnecessary transformation step.
Question 9
A refund-review workflow calls an internal order lookup tool, then asks Claude to decide whether to draft a refund response. The next prompt needs only purchase date, delivery status, item category, refund window, and fraud flags. The tool returns this excerpt: { "order_id": "O-8831", "purchase_date": "2026-01-04", "delivery_status": "delivered", "item_category": "electronics", "refund_window_days": 30, "fraud_flags": [], "warehouse_scan_events": [428 entries], "marketing_attribution": {...}, "recommended_addons": [51 entries], "agent_notes_archive": [19 old chats] } What should the developer pass into Claude for the next reasoning step?
Show Answer & Explanation
Correct Answer: B
Correct answer (B): Tool results should be pruned before being added to the model context. Because the decision requires specific eligibility fields, the best approach is to pass only those fields and concise supporting evidence. This reduces context bloat while preserving the information Claude needs for the current task.
Why the other options are wrong:
- Option A: The full response contains large irrelevant sections, which increases context bloat and can distract from the decision fields.
- Option C: A summary can be useful, but omitting the specific dates and eligibility fields removes facts needed for the decision.
- Option D: Old chats and complete raw output add irrelevant context, increasing the chance of drift or distraction.
Question 10
A developer is building a medical appointment assistant. Every response must be concise, avoid diagnosis, and ask users to contact emergency services for urgent symptoms. The current implementation asks end users to include these rules in each message, but many do not. Where should these durable behavior instructions be placed?
Show Answer & Explanation
Correct Answer: A
Correct answer (A): Durable application behavior should be expressed in developer-controlled instructions rather than relying on users or retrieved content to repeat critical constraints. This makes the desired behavior consistently present for each request and separates application policy from user-provided task data.
Why the other options are wrong:
- Option B: User text should be treated as task data or intent, not as the reliable place for application-wide behavioral constraints.
- Option C: Retrieved documents may or may not be present and are source context, not the right location for durable response rules.
- Option D: Examples can reinforce a pattern, but relying only on examples is weaker than explicitly stating durable constraints.
Ready to Accelerate Your CCDV-F Preparation?
Join thousands of professionals who are advancing their careers through expert certification preparation with FlashGenius.
- ✅ Unlimited practice questions across all CCDV-F domains
- ✅ Full-length exam simulations with real-time scoring
- ✅ AI-powered performance tracking and weak area identification
- ✅ Personalized study plans with adaptive learning
- ✅ Mobile-friendly platform for studying anywhere, anytime
- ✅ Expert explanations and study resources
Already have an account? Sign in here
About CCDV-F Certification
The CCDV-F certification validates your expertise in prompt and context engineering and other critical domains. Our comprehensive practice questions are carefully crafted to mirror the actual exam experience and help you identify knowledge gaps before test day.
More CCDV-F Practice Questions by Domain
- CCDV-F Practice Questions: Applications and Integration — 33.1% of the exam
- CCDV-F Practice Questions: Model Selection and Optimization — 16.8% of the exam
- CCDV-F Practice Questions: Agents and Workflows — 14.7% of the exam
- CCDV-F Practice Questions: Tools and MCPs — 10.6% of the exam
- CCDV-F Practice Questions: Security and Safety — 8.1% of the exam
- CCDV-F Practice Questions: Claude Code — 3.1% of the exam
- CCDV-F Practice Questions: Eval, Testing and Debugging — 2.6% of the exam
Want more? Take the free CCDV-F sample tests across all 8 domains, review the CCDV-F cheat sheet for last-minute revision, or work through the CCDV-F interactive guide.