Skip to Content
Building AI Agents with LLMs, RAG, and Knowledge Graphs
book

Building AI Agents with LLMs, RAG, and Knowledge Graphs

by Salvatore Raieli, Gabriele Iuculano
July 2025
Intermediate to advanced
566 pages
16h 27m
English
Packt Publishing
Content preview from Building AI Agents with LLMs, RAG, and Knowledge Graphs

5

Extending Your Agent with RAG to Prevent Hallucinations

In earlier chapters, we saw what an LLM is, and in the previous chapter, we saw how it can control different tools to succeed at completing a task. However, some of the limitations of LLMs prevent their deployment in sensitive fields such as medicine. For example, LLMs crystallize their knowledge at the time of training, and rapidly developing fields such as medical sciences cause this knowledge to be outdated in a short time. Another problem that has emerged with the use of LLMs is that they can often hallucinate (produce answers that contain factual or conceptual errors). To overcome these limitations, a new paradigm has emerged: retrieval-augmented generation (RAG). RAG, as we will ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Modern Automated AI Agents: Building Agentic AI to Perform Complex Tasks

Modern Automated AI Agents: Building Agentic AI to Perform Complex Tasks

Sinan Ozdemir

Publisher Resources

ISBN: 9781835087060Supplemental Content