Prompt Engineering Practice Test
Practise the prompt techniques used in real AI products: clear instructions, few-shot examples, structured output, reducing hallucinations, and prompt injection.
AI Skills
Before you start
- Questions
- 15
- Time
- 15 minutes
- Format
- Single section
- The timer starts when you press Start. When it reaches zero, your answers are submitted automatically.
- Use the numbered navigator to move between questions, and flag any you want to come back to.
- For typed answers, keep within the word limit. Answers over the limit are marked wrong, as in the real test.
- You can submit early. Your score, the correct answers and explanations appear straight away.
Prompt Engineering Practice Test: all 15 questions with answers
Prefer to work through the test on paper? Answer the questions, then open “Show answer” to check.
Choose the correct answer, A, B, C or D.
Q1.A model keeps giving vague answers. What usually helps most?
- A.Writing the prompt in capital letters
- B.Making the prompt as short as possible
- C.Asking the same question again without changes
- D.Giving specific instructions, relevant context and the output format you want
Show answer
Answer: D. Giving specific instructions, relevant context and the output format you want
Models perform best when the task, context, audience and expected format are stated clearly.
Q2.What is few-shot prompting?
- A.Including a few worked examples of input and desired output in the prompt
- B.Limiting the model to a few words
- C.Running the prompt a few times
- D.Using a smaller model
Show answer
Answer: A. Including a few worked examples of input and desired output in the prompt
Examples show the model the exact pattern, tone and format to follow.
Q3.What is zero-shot prompting?
- A.A prompt with zero words
- B.Asking the model to do a task without giving any examples
- C.A prompt that always fails
- D.Training a model from scratch
Show answer
Answer: B. Asking the model to do a task without giving any examples
Zero-shot means the model relies only on the instructions, with no examples.
Q4.What is the main purpose of a system prompt?
- A.To store the user's password
- B.To speed up the API
- C.To set the model's role, rules and behaviour for the whole conversation
- D.To translate the user's message
Show answer
Answer: C. To set the model's role, rules and behaviour for the whole conversation
System prompts give persistent instructions, such as role, tone, constraints and output rules.
Q5.When does asking the model to reason step by step help most?
- A.Simple greetings
- B.Spelling a single word
- C.Choosing a random number
- D.Multi-step problems such as maths, logic or planning
Show answer
Answer: D. Multi-step problems such as maths, logic or planning
Step-by-step (chain-of-thought) reasoning gives the model room to work through intermediate steps before answering.
Q6.Your code must parse the model's reply. What is the best approach?
- A.Ask for an exact format such as JSON with a defined schema, and validate the result
- B.Hope the model formats it correctly
- C.Ask for a friendly paragraph
- D.Use a higher temperature
Show answer
Answer: A. Ask for an exact format such as JSON with a defined schema, and validate the result
A defined schema (or a structured-output feature) plus validation makes output reliable for code.
Q7.What is an AI 'hallucination'?
- A.The model refusing to answer
- B.The model stating false or unsupported information confidently
- C.A very slow response
- D.An image generated by AI
Show answer
Answer: B. The model stating false or unsupported information confidently
Hallucinations are fluent but incorrect or made-up statements.
Q8.Which prompt change best reduces hallucinations in a factual Q&A app?
- A.Ask the model to sound more confident
- B.Raise the temperature
- C.Provide the source documents and tell the model to answer only from them and say when it does not know
- D.Remove all context
Show answer
Answer: C. Provide the source documents and tell the model to answer only from them and say when it does not know
Grounding the model in sources and allowing 'I don't know' cuts down on invented answers.
Q9.Why wrap pasted content in delimiters such as XML tags or triple quotes?
- A.It makes the prompt look nicer
- B.It reduces the token count to zero
- C.It is required by every API
- D.It clearly separates instructions from the data the model should work on
Show answer
Answer: D. It clearly separates instructions from the data the model should work on
Delimiters stop the model from confusing your instructions with the document or user input.
Q10.What does a higher temperature setting usually do?
- A.Makes outputs always identical
- B.Makes the model faster
- C.Increases the context window
- D.Makes outputs more random and varied
Show answer
Answer: D. Makes outputs more random and varied
Higher temperature samples less likely tokens more often, giving more varied output. Lower is more deterministic.
Q11.What is prompt injection?
- A.Untrusted input that contains instructions trying to override the application's own instructions
- B.A way to make prompts shorter
- C.Adding examples to a prompt
- D.A method for fine-tuning
Show answer
Answer: A. Untrusted input that contains instructions trying to override the application's own instructions
For example, a web page or email that says 'ignore previous instructions'. Treat such content as data, never as commands.
Q12.A complex task gives poor results in one long prompt. What is a good fix?
- A.Add more exclamation marks
- B.Break it into smaller steps and chain prompts, passing each result to the next
- C.Remove all instructions
- D.Use the same prompt with a random seed
Show answer
Answer: B. Break it into smaller steps and chain prompts, passing each result to the next
Prompt chaining lets each step focus on one job and makes failures easier to debug.
Q13.Why give the model a role such as 'You are an experienced tax accountant'?
- A.It changes the model's training data
- B.It makes answers guaranteed to be correct
- C.It focuses tone, vocabulary and level of expertise for the task
- D.It is required for the API to work
Show answer
Answer: C. It focuses tone, vocabulary and level of expertise for the task
A role frames how the model should approach the task. It does not add new knowledge or guarantee accuracy.
Q14.A prompt works on some inputs but not others. What is the best next step?
- A.Try it once more and ship it
- B.Delete the prompt
- C.Only test with your favourite example
- D.Build a small test set of example inputs and compare outputs as you change the prompt
Show answer
Answer: D. Build a small test set of example inputs and compare outputs as you change the prompt
Evaluating against a fixed set of examples turns prompt tuning into measurable work instead of guesswork.
Q15.Which instruction is usually more effective?
- A."Write your answer as plain prose paragraphs."
- B."Don't use markdown."
- C."No bad formatting!!!"
- D."Format it however."
Show answer
Answer: A. "Write your answer as plain prose paragraphs."
Telling the model what to do works better than only telling it what not to do.