RAG with Python Cookbook: Practical Recipes from Data Preprocessing to LLM Agents

- 50%

Original price was: $79.99.Current price is: $39.99.

Add to wishlistAdded to wishlistRemoved from wishlist 0

Product Specs:

  • File Type: PDF
  • File Size: 17.4 MB
  • Book Language: English
  • Total Page Count: 378
  • Instant Download

Build RAG Systems That Hold Up in Production 💻

Retrieval-augmented generation (RAG) gives large language models a way to work with external, current, and private information. The hard part is not getting a demo to answer a question. The hard part is building something accurate, scalable, and maintainable when the data changes, the queries get messy, and the system has to explain itself.

RAG with Python Cookbook takes on that engineering reality. Dominik Polzer, a machine learning engineer who has worked at Siemens, assembles more than 70 recipes that move from core concepts to deployment. Each recipe addresses a concrete problem, explains the trade-offs, and gives you working Python code you can adapt.

What You’ll Build and Understand ⚙️

The 11 chapters follow the lifecycle of a real RAG application:

  • Foundations: identify high-value use cases, set up Jupyter and VS Code, manage API keys, and choose frameworks.
  • Generation: design prompt templates, compare OpenAI, Gemini, Anthropic, and local Ollama models, and create structured outputs with Pydantic.
  • Data loading: work with Word, PDF, Excel, CSV, PostgreSQL, audio, images, video, Tesseract OCR, and multimodal models.
  • Preparation: enrich metadata, replace abbreviations, generate hypothetical questions, and apply character, recursive, document-aware, semantic, and agentic chunking.
  • Embeddings: map language to vectors, visualize semantic relationships, calculate distances, choose embedding models, and use CLIP for images and text.
  • Storage and search: compare vector databases and use FAISS, Chroma, and PostgreSQL with pgvector, including indexing and hybrid search.
  • Advanced retrieval: improve results with metadata filtering, HyDE, multiquery retrieval, query routing, auto-merging, sentence-window retrieval, reranking, and subquery decomposition.
  • Agents and graphs: build tools, apply multiagent workflow patterns, use function calling, asyncio, OpenAI Agents SDK, MCP tools, LangGraph, and Neo4j knowledge graphs.
  • Evaluation and deployment: choose metrics, run human evaluation, generate synthetic test data, calculate context precision and faithfulness, and deploy Streamlit apps with Docker and AWS.

A Cookbook for Developers Who Need Working Solutions

The recipes are written for developers and data scientists who are comfortable with Python, APIs, data processing, and general software development. A deep machine learning background is not required. Concepts are introduced as they appear, but you should be ready to write, run, and debug code.

What sets the book apart is its production focus. It does not stop at basic retrieval. It explores the questions that appear when a system has to handle complex requests, preserve relationships between entities, and be evaluated for accuracy and relevance.

Why This Belongs on Your Shelf

RAG has become a practical way to ground generative AI in trusted information. This cookbook helps you move from isolated examples to systems that can retrieve, reason, and respond with more confidence. If you are building chatbots, knowledge assistants, or autonomous agents, the recipes here provide a structured path through the decisions that matter.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
Write a review

There are no reviews yet.

Be the first to review “RAG with Python Cookbook: Practical Recipes from Data Preprocessing to LLM Agents”

No product has been found!
RAG with Python Cookbook: Practical Recipes from Data Preprocessing to LLM Agents
RAG with Python Cookbook: Practical Recipes from Data Preprocessing to LLM Agents

Original price was: $79.99.Current price is: $39.99.

Digital Delights
Logo
Shopping cart