chapter fourteen
14 Advanced components for LLM applications
This chapter covers
- RAG on a knowledge graph
- Combining RAG and agentic AI using only SLMs
- Managing short- and long-term memory for chatbots and AI agents
In chapter 13, you learned about two key paradigms for language models: retrieval-augmented generation (RAG) and agentic AI. We built a RAG system from scratch, introduced vector databases for these applications, and implemented an AI agent using the open source smolagents framework. In this chapter, we’ll cover some new concepts and tools that can make RAG systems and agents more robust, and you’ll learn how to combine them.