Context assembly and citations
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
build a prompt from chunks with citations and a safe "I don't know".
Planned topics
- Prompt parts: instructions, numbered sources, then the question. Keep instructions separate from retrieved text.
- Tell the model: answer only from the sources, cite source numbers, say it does not know when the sources do not answer.
- If retrieval returns nothing relevant, do not call the model with an empty context: return a fixed decline message.
- Return the citations (article id, title, link) to the client, not just text.
- Retrieved text is untrusted data; instructions inside it must not be followed (see MID-071).
Draft outline details
Demonstration
Answer using only the sources below. Cite as [1], [2]. If the sources do not
answer the question, reply: "I could not find this in our help center."
[1] (Returns, Deadlines) Items can be returned within 14 days ...
Question: Can I return shoes after three weeks?Deadline values are examples.
Check your understanding
What should the assistant do when retrieval finds nothing relevant?
Show answer
Decline explicitly; do not answer from model memory.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.