liveBook · Manning

Chapter 13: Creating end-to-end LLM applications

What you will learn in chapter 13 of Domain-Specific Small Language Models

The chapter introduction contrasts standalone SLM use with larger language-model systems and states why those systems will use domain-specific small models.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The chapter introduction contrasts standalone SLM use with larger language-model systems and states why those systems will use domain-specific small models.

Key terms: SLM, larger system, domain-specific small models, privacy, safety, security, specificity, cost savings

13.1 Why LLMs alone aren’t enough

This section argues that business value comes from a complete, well-integrated LLM application rather than from making the language model as large as possible.

Key terms: language model, final system, business goal, smaller models, tailored SLM, full stack, compliance, AGI, prompt engineering, external knowledge

13.2 Combining a domain-specific SLM with RAG

The section builds a local RAG example that prepares a PDF for retrieval, finds relevant passages with a small embedding model, and supplies those passages to a small generator model.

Key terms: RAG, offline, online, embeddings, vector database, generator model, PDF, sentences, chunks, token limit

13.3 Using a vector database

This section replaces disk-persisted embeddings in a small RAG example with a LanceDB vector database and compares the resulting retrieval and answer quality.

Key terms: vector database, vector store, embeddings, approximate nearest neighbor (ANN), query vector, LanceDB, NumPy arrays, list of dictionaries, PyArrow table, custom schema

13.4 Building an agent

The section explains what makes a system agentic and builds a local flight-booking agent that plans steps and uses custom tools.

Key terms: AI agent, reason, act, interact, RPA, smolagents, CodeAgent, ReAct, Python snippets, configured tools

13.5 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 12: Running on your laptop Chapter 14: Advanced components for LLM applications →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.