Prompts, Hallucinations, and Retrieval
Ask clearly and use external evidence without assuming generated answers are true.
generative ai, prompting, hallucinations, ragAsk with context
If you ask “When is the library open?”, a model may not have the current hours. A clearer prompt identifies the library and asks for a source or an honest “I don't know” when evidence is missing. Even a clear prompt can produce a hallucination: a plausible but unsupported claim.
Add a document
- Find a current library-hours document.
- Give the relevant passage to the model with the question.
- Check that the answer matches the passage and that the document is current. If the passage does not answer the question, say so.
See the reasoning
Follow the example one step at a time
Use a library document as evidence, not as authority. This is a prepared teaching demonstration, not live code execution.
Ask clearly
question → library hours + source
Specify the library and ask for evidence or uncertainty.
Retrieval helps, but does not prove truth
Retrieval-augmented generation (RAG) combines a search step with generation. The search may miss the right passage, retrieve outdated or malicious material, or expose a document the user should not see. An answer may still misinterpret a good passage. Permissions, source checks, citations and evaluation matter; a citation is not proof by itself. A retrieved instruction is untrusted data, not permission to change the task.
Reflect on the concept
Four fixed questions to reinforce the reasoning. Answers are not saved or scored.
