liveBook · Manning

Chapter 1: Introduction to AI agents and applications

What you will learn in chapter 1 of AI Agents and Applications

The introduction describes what LLM applications and agents can do and why frameworks help developers build them.

After this chapter you will be able to

Section by section

Introduction

The introduction describes what LLM applications and agents can do and why frameworks help developers build them.

Key terms: large language models (LLMs), AI agents, tools or services, multi-step workflows, ingest and manage data, structure prompts, chain model calls, external APIs and services, modular building blocks, boilerplate

1.1 Building LLM-based applications and agents

The section explains the common shape of LLM applications and distinguishes bounded engines, conversational chatbots, and action-taking agents.

Key terms: natural language, summarization, translation, sentiment analysis, semantic search, code generation, natural language input, unstructured data, extra context, prompt

1.1.1 LLM-based applications: Summarization and Q&A engines

This section explains how backend LLM applications summarize text, answer questions using retrieved knowledge, and run predefined workflows rather than managing them like agents.

Key terms: LLM-based application, summarization engine, shared services, REST API, content ingestion, chunks, embeddings, vector store, query phase, semantic search

1.1.2 LLM-based chatbots

This section explains how LLM-based chatbots use dialogue, instructions, factual context, and conversation history to provide useful responses that users can refine.

Key terms: summarization chatbot, summarization engine, interactivity, prompt design, role-based messaging formats, system, user, assistant, factual context, local knowledge sources

1.1.3 AI agents

This section explains how AI agents use LLM-guided tool choices to complete multi-step tasks, illustrated by holiday planning, and introduces oversight and MCP-based tool access.

Key terms: AI agent, LLM, simple pipelines, constraints, adaptive decision-making, tools, developer-crafted prompt, queries, SQL, REST API calls

1.2 Introducing LangChain

This section introduces LangChain as a set of reusable building blocks for handling data, composing LLM applications, and changing components as needs evolve.

Key terms: loaders, splitters, embeddings, vector stores, retrievers, prompt templates, chains, LCEL, Runnable interface, modularity

1.2.1 LangChain architecture

This section maps LangChain’s main components from document ingestion through response generation and contrasts sequential chains with dynamic agent workflows.

Key terms: document loaders, Document, text splitters, embedding models, vector stores, similarity search, retrievers, prompts, LLM cache, LLM/chat model

1.2.2 LangChain’s core object model

The section introduces LangChain’s core object families and shows how documents move through loaders, splitters, vector stores, and retrievers, while a shared Runnable interface supports composition.

Key terms: Document, DocumentLoader, TextSplitter, VectorStore, Retriever, Runnable interface, composed, chained, modular workflows, class hierarchies

1.3 Typical LLM use cases

This section surveys common LLM uses and notes that real-world tasks may require capabilities beyond an LLM’s initial training.

Key terms: text classification, sentiment analysis, natural language understanding and generation, structured data extraction, semantic search, knowledge base, intent and context, autonomous reasoning, workflow execution, code understanding and generation

1.4 How to adapt an LLM to your needs

Introduces three techniques for adapting an LLM to user requests—prompt engineering, RAG, and fine-tuning—without explaining how they work.

1.4.1 Prompt engineering

Introduces prompt engineering as a way to guide LLM responses through instructions, examples, and context, while explaining its reuse patterns and limits.

Key terms: prompt engineering, in-context learning, few-shot prompting, fine-tuning, prompt templates, variable fields, recent conversation turns, RAG, user-specific or enterprise data, external sources

1.4.2 RAG

Introduces RAG as a way to ground LLM answers in retrieved data, outlines how a vector-based knowledge base is prepared, and explains its benefits and safeguards.

Key terms: RAG, grounding, hallucination, knowledge base, chunks, embedding model, embeddings, vector database, semantic meaning, key chunks

1.4.3 Fine-tuning

This section explains how fine-tuning adapts a pretrained LLM and when its benefits may justify its costs instead of using RAG or prompt engineering.

Key terms: fine-tuning, pretrained LLM, curated dataset, domain-specific knowledge, Low-Rank Adaptation (LoRA), parameter-efficient fine-tuning, RAG, domain-specific jargon, workflows

1.5 Which LLMs to choose

This section explains how to choose LLMs by balancing accuracy, speed, and cost against an application's tasks and deployment needs.

Key terms: accuracy, speed (latency), cost, inference, different models for different tasks, workflow, model purpose, context window size, multilingual support, instruction models

1.6 What you’ll learn from this book

This section previews the book’s learning path and explains why LLM interaction matters to modern software.

Key terms: LLM interaction, modern software

1.7 Summary

This chapter summary recaps the main kinds of LLM systems and the choices involved in grounding, assembling, and selecting models for them.

Where this is used later

Concepts explained in this chapter

Chapter 2: Executing prompts programmatically →

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.