FREE · 20 QUESTIONS WITH ANSWERS

Prompt Engineering interview questions

The Prompt Engineering questions interviewers ask most, with short answers you can explain in your own words. Tap a question to see the answer.

01What is prompt engineering?

Designing instructions and context so an AI model gives accurate, useful and consistent answers.

02What makes a good prompt?

A clear task, relevant context, constraints, the output format and examples where helpful.

03Zero-shot vs few-shot?

Zero-shot gives only instructions. Few-shot adds examples of input and output to guide the model.

04Why use delimiters or XML tags?

They separate instructions from data, so the model does not confuse pasted text with your instructions.

<instructions>Summarise the ticket</instructions>
<ticket>...</ticket>
05What is a system prompt?

Instructions that set the model's role, rules and style for the whole conversation.

06What is step-by-step reasoning prompting?

Asking the model to work through the problem before answering, which improves accuracy on multi-step tasks.

07How do you get structured output?

Specify the exact JSON shape, give an example, and validate the result in code.

08What is prompt chaining?

Splitting a big task into smaller prompts where each output feeds the next.

09What are hallucinations and how do you reduce them?

Confident but wrong answers. Give source material, ask it to quote sources, allow 'I don't know' and verify important facts.

10What does temperature do?

Controls randomness. Low is more consistent, higher is more creative.

11What is a context window?

The maximum amount of text (tokens) the model can consider at once, including your prompt and its answer.

12What is a token?

A piece of text the model processes, roughly three quarters of an English word on average.

13How do you evaluate a prompt?

Build a small test set of real inputs with expected results and score outputs whenever you change the prompt.

14What is prompt injection?

Text in user input or documents that tries to override your instructions. Separate data from instructions and limit what the model can do.

15What is RAG?

Retrieval augmented generation: fetching relevant documents and adding them to the prompt so answers use your data.

16How would you prompt for SQL generation?

Give the schema, table meanings, the dialect, an example question and answer, and ask it to explain assumptions.

17How do you make answers shorter or longer?

Say the exact length and format, for example '3 bullet points, under 50 words'.

18Role prompting: does it help?

Giving a role like 'senior SQL reviewer' sets tone and focus, but clear task and context matter more.

19What data should you never paste into public AI tools?

Passwords, keys, personal data and confidential company data unless your company approves the tool.

20How do you iterate on a prompt?

Change one thing at a time, test on the same examples and keep the version that scores best.

More Prompt Engineering interview questions

Free PDF downloads and premium packs with scenario questions and detailed model answers.

Coming soon

The premium Prompt Engineering interview pack is being prepared.

🎤 Practise with a real mock interview

60 minutes live with Hikmat Ullah, plus written feedback. 30 USD, or 3 for 80 USD.

Book a mock interview