Part 1 Reliable outputs
Large language models (LLMs) are remarkable. They can write code, summarize legal documents, and reason through multistep problems that stump most humans. But ask one about your company’s return policy or whether a specific product is in stock, and it simply doesn’t have the context to give you a useful answer. It might hallucinate something plausible or tell you that it can’t help, when the right answer was sitting in your documentation all along. The model has no way to tell you which answers come from knowledge and which come from pattern-matching. Your users can’t tell the difference either, and if they can’t trust the answers, they stop using the system.
The first part of this book tackles that gap head-on. It starts with what you can control immediately (the prompt) and works outward to increasingly powerful techniques for grounding model outputs in truth. Each chapter builds on the preceding one: better prompts reduce hallucinations, retrieval-augmented generation (RAG) grounds answers in your actual data, embeddings and vector search make that retrieval precise, and fine-tuning reshapes the model itself for your domain.