Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Alessandro Negro, Vlastimil Kus, Giuseppe Futia, Fabio Montagna

Rating No ratings yet

Combine knowledge graphs with large language models to deliver powerful, reliable, and explainable AI solutions. Knowledge graphs model relationships between the objects, events, situations, and concepts in your domain so you can readily identify important patterns in your own data and make better decisions. Paired up with large language models, they promise huge potential for working with structured and unstructured enterprise data, building recommendation systems, developing fraud detection mechanisms, delivering customer service chatbots, or more. This book provides tools and techniques for efficiently organizing data, modeling a knowledge graph, and incorporating KGs into the functioning of LLMs—and vice versa. In Knowledge Graphs and LLMs in Action you will learn how to: • Model knowledge graphs with an iterative top-down approach based in business needs • Create a knowledge graph starting from ontologies, taxonomies, and structured data • Build knowledge graphs from unstructured data sources using LLMs • Use machine learning algorithms to complete your graphs and derive insights from it • Reason on the knowledge graph and build KG-powered RAG systems for LLMs In Knowledge Graphs and LLMs in Action, you’ll discover the theory of knowledge graphs then put them into practice with LLMs to build working intelligence systems. You’ll learn to create KGs from first principles, go hands-on to develop advisor applications for real-world domains like healthcare and finance, build retrieval augmented generation for LLMs, and more. about the technology Using knowledge graphs with LLMs reduces hallucinations, enables explainable outputs, and supports better reasoning. By naturally encoding the relationships in your data, knowledge graphs help create AI systems that are more reliable and accurate, even for models that have limited domain knowledge. about the reader For ML and AI engineers, data scientists, and data engineers. Examples in Python.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
# Knowledge Graphs and LLMs in Action ## 【One-Line Pitch】 A practical guide for ML/AI engineers, data scientists, and data engineers who want to combine knowledge graphs with large language models to build reliable, explainable AI systems that reduce hallucinations and ground LLM outputs in structured domain knowledge. ## 【Book Arc】 - **Opening (~0%–8%)**: Establishes the "killer combination" thesis—knowledge graphs provide structured relationships and explainability while LLMs offer natural language understanding and generation. Introduces the hybrid intelligent system concept and the four pillars of knowledge graphs, with early use cases in drug discovery and customer support. - **Early (~17%–33%)**: Covers foundations of intelligent systems—what intelligence means, knowledge acquisition and representation, reasoning engines (deductive, inductive, and LLM-assisted), and the design philosophy behind hybrid approaches. Part 2 begins with hands-on KG construction from ontologies and structured data using RDF/LPG choices and tools like neosemantics. - **Middle (~42%–58%)**: Dives into real-world KG building from structured sources (biomedical, pharmaceutical, clinical domains) and then shifts to extracting knowledge from unstructured text using LLMs. Covers named entity disambiguation (NED) in depth, including a full SoHO knowledge graph case study and an open-LLM approach with Ollama and Llama 3.1. - **Late (~67%–75%)**: Moves into machine learning on graphs—node classification, link prediction, clustering, feature engineering (manual and semiautomated), graph embeddings, and graph neural networks (GNNs). Includes practical applications like anti-money laundering and movie recommendation systems. - **Ending (~83%–92%)**: Focuses on information retrieval—knowledge graph–powered retrieval-augmented generation (Graph RAG), natural language querying of KGs, schema-based approaches, intent detection, and building a full QA agent with LangGraph and Streamlit. Concludes with a policing-domain investigation use case and future directions. ## 【Key Takeaways】 - **Knowledge graphs and LLMs are complementary, not competing** (Early): KGs provide structured, explainable relationships while LLMs offer flexible natural language understanding. Together they mitigate each other's weaknesses—KGs reduce hallucinations and ground outputs, LLMs make KGs accessible via natural language. - **Start KG design from business needs, not technology** (Early): The book advocates an iterative top-down approach beginning with business and domain understanding before data modeling. This prevents building technically correct but practically useless graphs. - **RDF vs. LPG is a goal-driven decision** (Middle): Choose between Resource Description Framework and Labeled Property Graphs based on your query patterns, edge property needs, and tooling ecosystem. The book walks through this trade-off with concrete examples. - **LLMs can build KGs from unstructured text, but require careful prompt engineering** (Middle): Named entity recognition and relation extraction from documents become feasible with LLMs, but success depends on well-designed prompts, normalization, cleansing, and entity resolution strategies. - **Named entity disambiguation is the hard part** (Middle): Moving from recognition to disambiguation requires domain ontologies, candidate selection, and context-aware matching. The book demonstrates both traditional and open-LLM approaches (Llama 3.1) for medical domain NED. - **Graph machine learning follows an encoder–decoder pattern** (Late): From shallow embeddings like Node2Vec to message-passing GNNs, the encoder–decoder framework unifies graph representation learning. Understanding this pattern helps you apply node classification and link prediction across domains. - **Graph RAG outperforms vector-based RAG for structured queries** (Late): Vector-based retrieval struggles with multi-hop reasoning and precise relationship queries. Knowledge graph–powered RAG provides complete context and enables reasoning agents that can answer complex questions reliably. - **Schema-aware prompting is key for natural language KG querying** (Late): Converting user questions to Cypher queries works best when you provide the graph schema, descriptive annotations, and structured output formats to the LLM. Intent detection and response summarization complete the pipeline. ## 【Reading Tips】 - **Skim Part 1 (Chapters 1–2)** if you already understand KG basics; it's conceptual groundwork. Focus instead on the "deciding whether to use a KG" checklist and the hybrid reasoning engine discussion. - **Deep-read Chapters 3–4** for hands-on KG construction from structured data—the RDF vs. LPG decision framework and the biomedical/pharmaceutical case studies are directly reusable. - **Pay special attention to Chapter 7 (NED)** —it's the most detailed real-world example (SoHO knowledge graph) and covers the full pipeline from schema definition to disambiguation to KG-based use cases. - **Chapter 14 is the heart of the LLM integration** —the schema-based querying approach, intent detection, and "reasoning first vs. answer first" discussion are immediately actionable for building production QA systems. - **Skim Chapter 15** if you're not building agents with LangGraph specifically, but do read the architecture overview and the policing investigation case study for a complete end-to-end example. ## 【Coverage Limits】 This guide covers the book's progression from KG foundations through construction, machine learning, and LLM integration. The excerpts do not cover the appendices (graph introduction, Neo4j setup, structured source building) in detail, nor the final chapter's future directions beyond what's listed in the table of contents. ##
Excerpt 1
书名: Knowledge Graphs and LLMs in Action (Alessandro Negro, Vlastimil Kus, Giuseppe Futia etc.) (Z-Library) 作者: Alessandro Negro, Vlastimil Kus, Giuseppe Futi...
View in text
Page 6
g.com ©2026 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in...
View in text
Page 9
AND LLMS ................................................... 335 13 ■ Knowledge graph–powered retrieval-augmented generation 337 14 ■ Asking a KG questions w...
View in text
Page 12
he data 141 Unstructured data 141 ■ Domain ontologies 142 7.6 Building a SoHO knowledge graph 146 Defining the schema 147 ■ Processing and ingesting document...
View in text
Page 15
LM 339 13.3 Challenges in the production environment 341 13.4 Chatting with the AI about private data 342 Retrieval-augmented generation 343 ■ Vector-based R...
View in text
Page 17
s that can serve as reliable advisors in critical decisions. This hybrid approach addresses the reliability and explainability challenges that have lim- ited...
View in text
Page 19
significant changes swept through the technology landscape. Large language models (LLMs) and generative AI disrupted the field entirely, and knowledge graph...
View in text
Tags
AI categories
Artificial Intelligenceknowledge graphs
llmgraph
ISBN: 1633439895
Publish Year: 2025
Language: English
Pages: 544
File Format: PDF
File Size: 27.1 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…