Putting a language model behind a demo takes an afternoon. Putting one in front of paying customers takes this book.
Across 306 pages you build **DocuMind**, an AI document assistant that ingests real documents, retrieves the right passages, answers with citations, streams its response token by token, and doesn't quietly triple your bill overnight.
This is the gap nobody writes about: the retrieval that returns the wrong chunk, the prompt that works until a customer pastes something strange into it, the model that hallucinates in front of your best client, the stream that stalls behind a proxy.
**What's inside**
- LLM fundamentals for engineers who need to ship, not to publish papers
- Working with the Claude API from Django: sync, async, and when each one bites
- Prompt design that survives real users
- Streaming responses with Server-Sent Events — and making them work behind nginx
- Embeddings and vector search with pgvector, inside the database you already run
- Retrieval-Augmented Generation: chunking, ranking, citations, and why naive RAG fails
- Document ingestion pipelines that don't fall over on a 400-page PDF
- Guardrails, moderation and prompt injection
- Cost control: token budgets, caching, and knowing what a user actually costs you
- Evaluation: how to know your AI got worse before your customers tell you
- Observability, security, deployment and launch
**Formats:** PDF and EPUB. Download immediately after purchase.