Skip to content

Introduction

This book is a practical guide to building applications on top of large language models. Its main goal is to show how to design, develop, and bring to production AI systems in which a language model is one of the core components.

Over the last few years, LLMs have dramatically lowered the barrier to entry in software development. Today you can build a prototype of a chatbot, an assistant, an agent with access to various tools, or a content generation service in a single evening.

We will build full-fledged LLM applications in which the model receives the right context, works correctly with data sources, and uses tools through clear contracts. This requires consistency across architecture, data, infrastructure, and product logic.

The book walks systematically through the fundamentals of LLM development:

  • basic interaction with models and prompt engineering
  • building query chains and structured workflows
  • working with documents, embeddings, semantic search, and RAG
  • designing agentic systems and integrating tools
  • fine-tuning, LoRA/QLoRA, and model customization
  • memory, personalization, and context management
  • multimodal models for text, images, and audio
  • open-source models, local deployment, and hybrid architectures
  • production deployment, monitoring, and scaling

At every stage we discuss not only "how to do it" but also "when it is actually needed." This matters because in LLM development there are almost always several paths to the same goal: you can improve the prompt, add RAG, fine-tune the model, connect a tool, change the data format, or replace the generative part with simpler logic altogether.

We place special emphasis on production thinking. You need to understand how a solution will behave on the long tail of queries, how it will degrade when external services fail, what it will cost as load grows, how to test it after a model update, and how to detect a drop in quality before users notice it. That is why the book pays so much attention to quality evaluation, CI/CD, fallback strategies, cost management, and operational risks.

The book is written for developers, ML engineers, data scientists, architects, and tech leads who build AI products. Deep mathematical preparation in NLP is not required, but general development experience will help: an understanding of APIs, data, backend development, basic infrastructure, and the software development lifecycle.

Keep in mind that tools change faster than text can be updated. Models, APIs, and frameworks will keep evolving, some concrete examples will become outdated, and some best practices will stop being relevant. So the main focus of this book is not memorizing particular libraries but understanding the principles of development.

LLMs speed up development, but they do not solve data and architecture problems on their own. They make it possible to build impressive MVPs quickly, but they demand a much more careful approach once they become part of a product. And the more powerful models become, the more important it is to understand where to use them, how to constrain them, what to complement them with, and how to build them into a system so that it is useful, reliable, and economically justified.