← Retrieval-augmented generation (RAG)
Lesson 3 of 4
RAG pipelines
Watch, read the card, then practise. Retrieval and ranking · Grounded answers
The video for this lesson is being recorded.
Meanwhile, the notes below and the 60-second cards cover the same ideas.
Practise this topicRetrieval and ranking
RAG retrieves the most relevant chunks for a question, then the LLM answers from them.
Remember: Good retrieval matters more than a clever prompt.
Grounded answers
A grounded answer says only what the retrieved sources support, and shows where each claim came from.
Remember: Retrieved text is data, never instructions.
Try the example in Code Lab
scores = {"c1": 0.82, "c2": 0.91, "c3": 0.40, "c4": 0.77}
print(sorted(scores, key=scores.get, reverse=True)[:2])