chapter fourteen

14 Advanced Components for LLM Applications

 

This chapter covers

  • RAG on a knowledge graph.
  • Combining RAG and agentic AI using only SLMs.
  • Long- and short-term memory management for chatbots and agentic AI applications.

In chapter 13 we learned two important paradigms about language models, RAG (Retrieval Augmented Generation) and Agentic AI. That chapter covered the implementation of a RAG system from scratch and also introduced the usage of a vector database in these kinds of applications, and the implementation of an AI agent through the Open Source Smolagents framework. In this chapter we are going to learn new concepts and tools to make RAG systems and AI agents more robust and to how to combine them together.

14.1 Graph RAG

14.1.1 Microsoft’s OS GraphRAG capabilities

14.1.2 Evaluation metrics

14.2 RAG + Agentic AI

14.3 Long- and short-term memory management

14.4 Summary