Courseiva

CCDV-F · topic practice

Prompt and Context Engineering practice questions

This domain covers how to structure prompts and manage context when building on the Claude API. It is tested through scenario questions about system vs. user fields, multi-document inputs, evaluation with hold-out sets, and reducing hallucination in tasks like summarization with Claude 3.5 Sonnet.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Prompt and Context Engineering

What the exam tests

What to know about Prompt and Context Engineering

You must be able to design prompts that separate persistent instructions from task input, label multiple documents clearly, and ground answers in supplied text. The single most important thing is choosing the right field and structure so Claude references only the provided context.

Choosing the system field for persistent role and behavior instructions versus the user field for task-specific input.

Structuring multiple independent documents in one prompt with clear delimiters or tags so Claude can reference each accurately.

Using hold-out prompt sets the model was not trained on to evaluate performance without data leakage.

Applying grounding techniques such as instructing Claude to answer only from provided source text to reduce hallucinated figures.

Watch out for

Common Prompt and Context Engineering exam traps

  • ▸Putting durable role and formatting rules in the user turn instead of the system field, causing inconsistent behavior across requests.
  • ▸Concatenating multiple documents without delimiters or labels, so Claude cannot reliably attribute content to the correct source.
  • ▸Evaluating on prompts similar to training data instead of a true hold-out set, producing inflated and misleading performance results.

Practice set

Prompt and Context Engineering questions

20 questions · select your answer, then reveal the explanation

The application fails to maintain the correct persona during multi-turn conversations. How should the structure be adjusted to ensure the system prompt remains effective?

Exhibit

{
  "system": "You are a helpful assistant.",
  "messages": [
    {"role": "user", "content": "Summarize this report: [REPORT DATA]"},
    {"role": "assistant", "content": "Here is the summary..."},
    {"role": "user", "content": "Actually, make it a bulleted list instead."}
  ]
}

The model is failing to find errors in the logs. Which structural change will most likely increase the success rate?

Exhibit

{
  "system": "Analyze the provided logs.",
  "messages": [
    {"role": "user", "content": "Logs: [LOGS]\nFind the error."}
  ]
}

How can you best ensure Claude follows complex, multi-part negative constraints (e.g., 'Do not use adjectives, do not start with X, do not mention Y')?

The model is outputting dates in an inconsistent format or including extra text. How can you ensure strict compliance with the format?

Exhibit

{
  "system": "Extract all dates. Output format: YYYY-MM-DD.",
  "messages": [
    {"role": "user", "content": "The project started on Jan 5th, 2023 and ended on March 12, 2024."}
  ]
}

A developer wants to optimize a prompt that processes 100,000 tokens of context. Which TWO techniques will most effectively maintain performance while minimizing errors?

Which THREE best practices should be followed when including images in the context for a multi-modal prompt with Claude 3 Vision models?

Which TWO methods are considered 'Chain of Thought' techniques that can be explicitly prompted to improve Claude's reasoning on a math problem?

When migrating a prompt from a legacy model to Claude 3.5 Sonnet, a developer notices that the model is now ignoring a key instruction. What is the most likely cause related to prompt engineering?

You are optimizing a prompt for a complex data extraction task using Claude. The model is struggling to consistently output valid JSON. Which TWO strategies should you implement to improve the reliability of the structured output?

A developer is building an agent that reads a 60,000-token policy handbook and answers employee questions. Retrieval is not available; the full handbook must be included each turn. Answers are accurate for questions about the first 10,000 tokens but degrade badly for content near the end. Which action best addresses the degradation?

You are developing a summarization tool using Claude 3.5 Sonnet. You notice the model often hallucinates specific financial figures not present in the source text. What is the most effective prompt engineering strategy to mitigate this?

Which TWO of the following practices are considered best practices for optimizing Claude's performance using prompt engineering? (Choose two)

When designing a system prompt for a chatbot, which approach is most effective for ensuring the model maintains a consistent tone?

Which THREE strategies are effective for reducing 'prompt leakage' (where the model reveals its system instructions)? (Choose three)

When evaluating LLM performance, why is it critical to use a 'hold-out' test set of prompts that the model was not trained on?

Which method is best for improving Claude's accuracy in a complex multi-step reasoning task?

When should you use the 'system' field versus putting instructions in the 'user' field?

Which THREE of the following are valid methods to optimize the token usage of a prompt without sacrificing performance? (Choose three)

A developer needs Claude to analyze a legal document and extract specific clauses into a structured format. To ensure the model focuses only on the provided text and ignores its general knowledge of law, which prompting strategy is most effective?

When designing prompts for complex reasoning tasks, which TWO practices are recommended by Anthropic to improve the reliability of the output?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Prompt and Context Engineering sessions

Start a Prompt and Context Engineering only practice session

Every question in these sessions is drawn from the Prompt and Context Engineering domain — nothing else.

Related practice questions

Related CCDV-F topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the CCDV-F exam test about Prompt and Context Engineering?
You must be able to design prompts that separate persistent instructions from task input, label multiple documents clearly, and ground answers in supplied text. The single most important thing is choosing the right field and structure so Claude references only the provided context.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Prompt and Context Engineering questions in a focused session?
Yes — the session launcher on this page draws every question from the Prompt and Context Engineering domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other CCDV-F topics?
Use the topic links above to move to related areas, or go back to the CCDV-F question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the CCDV-F exam covers. They are not copied from any real exam or dump site.