What is chain-of-thought prompting, and when would you use it or avoid it?
What the interviewer wants to hear
- Asks the model to reason step by step before answering
- Helps maths, logic and multi-step tasks
- Costs more tokens and time
- Separate reasoning from the final answer for parsing
- Reasoning models may already think internally
Model answer
Chain-of-thought prompting asks the model to work through the problem step by step before giving the answer. Writing out intermediate steps helps on tasks like maths, logic puzzles, multi-condition policy checks or planning, because the model can build on each step instead of jumping to a guess. I would avoid it for simple tasks such as short classification or rewriting, where it only adds tokens, cost and latency. When I use it in an app, I ask for the reasoning in one tag and the final answer in another, so code can parse the answer cleanly. I also check the model: many newer models reason internally, and for those, asking for explicit steps may add little, so I would compare both versions on an eval set before deciding.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Prompt Engineer questions
- What makes a good prompt? Walk me through how you would write one for a new task.
- When would you use zero-shot prompting and when would you add few-shot examples?
- How can you use prompting to reduce hallucinations?
- Your product team needs model output that software can read reliably. How do you design the prompt?
- Describe your process for improving a prompt that is giving mixed results.
- Explain temperature and top-p. How would you set them for different tasks?
- Explain retrieval-augmented generation (RAG) to a non-technical colleague. Why would we use it?
- What are tokens and context windows, and why do they matter when you design prompts?
- A prompt works on your demo examples but fails for some users. How do you find out why?