Skip to content

RAG with Python Cookbook: seventy-one recipes, and the ones I actually used

Dominik Polzer · O'Reilly, 2026
22 de septiembre de 2026 por
RAG with Python Cookbook: seventy-one recipes, and the ones I actually used
Andrés Briñez

It is the practical counterpart to the previous one: where that book explains what breaks, this one hands you the code. I used it the way cookbooks are used, opening what I needed.

What I did with it

The reranking recipes gave me the argument for always including that step rather than offering it as an option: retrieving twenty passages and keeping the best five costs less compute than a larger model and improves the answer more.

The evaluation chapter left me a practice that is now part of what I deliver: a set of real client questions with the correct answer written down, against which every change is measured. Without that set, "it got better" is an opinion.

And the maintenance recipes changed what I put in proposals: a document that gets replaced leaves old fragments in circulation unless someone deletes them, and the system starts answering with last year's policy. That surfaces months later, long after the demo.

What I left out

Recipes tied to specific paid services. They age quickly, and the idea underneath can almost always be built on something else.

# AI
Hands-On RAG for Production: what breaks when the pilot goes live
Ofer Mendelevitch and Forrest Sheng Bao · O'Reilly, 2026
WhatsApp