How can you use prompting to reduce hallucinations?
What the interviewer wants to hear
- Provide source material and restrict answers to it
- Allow the model to say it does not know
- Ask for quotes or citations
- Lower temperature for factual tasks; verify outputs
Model answer
The most effective step is to give the model the facts it needs, such as the relevant documents or data, and instruct it to answer only from that material. I explicitly allow an answer like "I could not find this in the provided information", because models often guess when they think an answer is expected. For long documents I ask the model to first quote the relevant passages and then answer, which keeps it grounded and makes checking easier. Asking for citations to specific sections helps users verify. I use low temperature for factual tasks. Prompting alone cannot remove hallucinations, so I also measure the hallucination rate on an eval set and, where it matters, add automatic checks that cited text actually exists in the source.
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?
- 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?
- What is chain-of-thought prompting, and when would you use it or avoid it?
- A prompt works on your demo examples but fails for some users. How do you find out why?