What you will learn in Knowledge Graphs and LLMs in Action
Build AI systems using connected data
Chapter by chapter
Chapter 1: Knowledge graphs and LLMs: A killer combination
The chapter introduces why knowledge graphs and large language models complement each other in domain-specific, data-driven applications.
What you learn in chapter 1 →Chapter 2: Intelligent systems: A hybrid approach
The introduction frames intelligent advisor systems as combining KGs and LLMs to tackle complex problems, and argues that understanding their operation is necessary to judge their trustworthiness and safety.
What you learn in chapter 2 →Chapter 3: Create your first knowledge graph from ontologies
The introduction explains why integrating diverse data into a knowledge graph is difficult and how an ontology can provide shared meaning, using rare-disease data as the chapter’s example.
What you learn in chapter 3 →Chapter 4: From simple networks to multisource integration
The introduction frames the move from a single ontology to multisource knowledge graphs and explains why traditional integration, rather than LLMs, leads their construction.
What you learn in chapter 4 →Chapter 5: Extracting domain-specific knowledge from unstructured data
Introduces why unstructured documents are valuable sources for knowledge graphs and frames the work as knowledge representation and knowledge learning.
What you learn in chapter 5 →Chapter 6: Building knowledge graphs with large language models
The introduction recalls what the Rockefeller Archive Center documents contain and sets up the move from extracted text to a knowledge graph.
What you learn in chapter 6 →Chapter 7: Named entity disambiguation
The chapter introduction explains what named entity recognition contributes to building knowledge graphs from text and why it is not sufficient for precise domain understanding.
What you learn in chapter 7 →Chapter 8: NED with open LLMs and domain ontologies
The introduction recalls scispaCy’s biomedical role in Chapter 7 and previews Chapter 8’s approach to named entity disambiguation.
What you learn in chapter 8 →Chapter 9: Machine learning on knowledge graphs: A primer approach
The introduction explains why machine learning on knowledge graphs matters for intelligent advisory systems: it can use integrated graph knowledge to provide insights beyond ordinary querying and navigation.
What you learn in chapter 9 →Chapter 10: Graph feature engineering: Manual and semiautomated approaches
This introduction explains why graph machine learning needs numerical features and compares manual, semiautomated, and learned ways to create them.
What you learn in chapter 10 →Chapter 11: Graph representation learning and graph neural networks
The introduction explains why graph representation learning can replace hard-to-scale manual feature engineering with learned embeddings and introduces GNNs as a way to learn them.
What you learn in chapter 11 →Chapter 12: Node classification and link prediction with GNNs
The introduction connects two GNN tasks to real-world applications: identifying illicit activity in transaction graphs and recommending movies from user–movie interactions.
What you learn in chapter 12 →Chapter 13: Knowledge graph–powered retrieval-augmented generation
The introduction contrasts the ease of building NLP applications with LLMs against the work still needed to make them useful in enterprise production.
What you learn in chapter 13 →Chapter 14: Asking a KG questions with natural language
The chapter introduces an expert-emulated approach to asking knowledge graphs questions and explains why its design accounts for presenting answers to end users.
What you learn in chapter 14 →Chapter 15: Building a QA agent with LangGraph
The introduction previews an application that will combine chapter 14’s knowledge-graph querying techniques into a LangGraph pipeline with a Streamlit interface.
What you learn in chapter 15 →Concepts explained in this book
- language modelA large language model is a neural language model trained on very large text corpora to understand and generate natural-language content.
- embeddingA feature vector is a numerical vector whose components represent measurable characteristics of an input for machine learning.
- knowledge graphA knowledge graph is an evolving graph data structure of typed entities, attributes, and meaningful named relationships that integrates structured and unstructured domain data.
- prompt engineeringPrompt engineering is the deliberate design and iterative refinement of instructions and examples given to a language model to obtain desired outputs.
- schemaA schema is a formal specification of the structure, types, and relationships permitted in a data representation.
- link predictionLink prediction is a graph-learning technique that forecasts missing, future, or otherwise unobserved connections between nodes, optionally assigning scores or probabilities to candidate links.
- feature engineeringManual feature extraction is the hand-designed selection or computation of features from raw data.
- AI agentAn agent is a computational system that can use information and perform actions to accomplish tasks.
- intent detectionIntent detection is the technique of identifying a user's goal, information need, or preferred answer format from a question.
- disambiguationNamed entity disambiguation is the technique of determining which real-world entity a mention in text refers to and linking it to the correct knowledge-base entity.
- node classificationNode classification is a graph-learning task that predicts one or more labels for each node from labeled examples and graph information.
- multi-step reasoningReasoning is the process of analyzing information, applying rules, and drawing conclusions from evidence or premises.
- automated query generationQuery generation is the process of producing an executable database query from a natural-language request, structured intent, or other specifications.
- ontologyAn ontology is a formal model of concepts, relationships, and constraints in a domain that supports shared interpretation and inference.
- retrieval-augmented generationRetrieval-augmented generation is a technique that supplies a generative language model with relevant information retrieved from an external source before answer generation.
- inductive inferenceInductive reasoning is the derivation of general patterns, conclusions, or predictions from observed cases, including cases with incomplete information.
- f-scoreF1 score is the harmonic mean of precision and recall.
- inputA feature is an input variable or measurable attribute selected from data for training a predictive model.
- graph neural networkA graph neural network is a neural network architecture that learns representations by propagating information among nodes and edges of a graph.
- graph attention networkA graph attention network is a graph neural network that uses learned attention weights to aggregate information from neighboring nodes.
- degree-weighted path countA degree-weighted path count is a path-based graph metric that weights paths according to the degrees of the entities they traverse.
- node degreeNode degree is the number of edges incident to a node, optionally separated by incoming and outgoing direction.
- CypherCypher is a declarative graph query language for matching patterns and reading or modifying property-graph data.
- GraphSAGEGraphSAGE is an inductive graph representation-learning framework that generates node representations by aggregating information from sampled neighborhoods.
- Human Phenotype OntologyThe Human Phenotype Ontology is a standardized ontology for describing human phenotypic abnormalities and their relationships.
- annotationAn annotation is a statement or assertion about a subject that may include descriptive metadata such as provenance, authorship, and creation time.
- GraphRAGGraphRAG is a retrieval-augmented generation approach that uses graph-structured knowledge to ground language-model outputs.
- phenotypic featureA phenotypic abnormality is an observable physical or biochemical characteristic that deviates from typical traits.
- named entity recognitionNamed entity recognition is the natural-language-processing technique of identifying mentions of named entities in text and assigning them to predefined categories.
- prediction stabilityPrediction stability is the consistency of a model's outputs across repeated runs on the same input and configuration.
- encoder-decoder architectureAn encoder-decoder architecture is a model design in which an encoder transforms input data into a learned representation and a decoder transforms that representation into predictions or reconstructed outputs.
- data integrationThe process of combining data from multiple sources into a coherent and consistent representation.
- precisionPrecision is the proportion of predicted positive instances that are correct.
- recallRecall is the proportion of relevant positive instances that are successfully identified.
- graphA graph structure is a data representation consisting of interconnected vertices and edges.
- metapathA metapath is a sequence of node classes and relationship classes describing possible paths between specified source and destination types.
- graph convolutional networkA graph convolutional network is a graph-neural-network model that updates node representations by aggregating information from graph neighborhoods.
- homophilyHomophily is the tendency of connected or socially associated entities to share similar characteristics or group affiliations.
- cross entropy lossCross-entropy loss is a classification loss that penalizes incorrect probability assignments by comparing predicted probabilities with target labels.
- SNOMEDSNOMEDCT_US is the US edition of SNOMED CT, a multilingual clinical terminology and ontology containing standardized biomedical concepts and relationships.
- UMLSUMLS is a biomedical terminology system that integrates concepts and codes from multiple health and life-science vocabularies.
- entity resolutionEntity resolution is the process of determining which records or mentions refer to the same real-world entity.
- drug repurposingDrug repurposing is the investigation of an existing drug for a new therapeutic use.
- LangGraphLangGraph is a framework for building stateful, graph-structured workflows and agent applications powered by language models.
- vectorizationFeaturization is the transformation of raw data or graph objects into numerical features suitable for machine-learning models.
- edgeA relationship, or edge, is a graph connection representing a meaningful association between nodes.
- classification promptA classification prompt is a textual instruction that specifies categories, examples, and output requirements for classifying inputs.
- sigmoidA sigmoid activation maps a real-valued score to a value between zero and one, commonly interpreted as a probability for a binary outcome.
- transductive learningTransductive learning learns representations or predictions for the specific nodes and graph structure observed during training rather than a general rule for unseen nodes.
- property graphA labeled property graph is a graph data model in which nodes and edges have labels and properties and represent relationships.
- intelligent systemAn intelligent system is a system that connects users to artificial intelligence and machine learning to achieve meaningful objectives while improving through use and interaction.
- message passingMessage passing is a graph-neural-network technique in which nodes iteratively exchange, aggregate, and use information from neighboring nodes to update their representations.
- ReFeXRecursive feature extraction is the repeated aggregation of existing graph features to derive increasingly extensive structural representations.
- encoderAn encoder is a model component that transforms input data into a learned representation, such as vectors.
- disease pathwayA disease pathway is a subgraph of a protein-protein interaction network containing proteins and interactions associated with a particular disease.
- weakly connected componentA weakly connected component is a maximal set of vertices in a directed graph that remains connected when edge directions are ignored.
- Node2VecNode2Vec is a graph representation-learning algorithm that generates node embeddings from biased random walks over a network.
- transfer learningTransfer learning is a machine-learning technique that reuses patterns learned from one task or domain to improve performance on another task or domain.
- hallucinationA language-model failure in which generated content is plausible but factually unsupported or incorrect.
- heterogeneous graphA heterogeneous graph is a graph containing multiple types of nodes, relationships, or both.
- summarizationSummarization is the process of condensing information into a shorter representation that preserves its most relevant factual content.
- path countPath count is the number of paths matching a specified metapath between defined source and target nodes.
- RDFRDF (Resource Description Framework) is a W3C-standard graph data model that represents knowledge as subject-predicate-object triples.
- standardizationFeature standardization transforms numerical features so that they have a specified mean and scale, commonly zero mean and unit variance.
- confusion matrixA confusion matrix is a tabular summary of predicted and actual class assignments, including counts of correct and incorrect classifications.
- candidate disambiguationCandidate disambiguation is the phase of named entity disambiguation that uses contextual and ontology-based evidence to select the intended entity from candidate entities.
- deductive reasoningDeductive reasoning derives a specific logical conclusion from assumed general statements or hypotheses.
- Euclidean spaceEuclidean space is a geometric space in which points have coordinate representations and distances follow the standard straight-line metric.
- hyperbolic spaceHyperbolic space is a negatively curved geometric space whose available volume grows exponentially with distance from a center.
- candidate selectionCandidate selection is the phase of entity disambiguation that identifies possible reference entities for a recognized mention.
- one-shot learningOne-shot learning is performing a task after receiving one task-specific example.
- zero-shot learningZero-shot learning is performing a task without task-specific examples, relying on a task description and pretrained knowledge.
- metagraphA metagraph is an intermediate graph representation that preserves page-level extracted entities, relationships, and their source information for later knowledge graph construction.
- path-to-text translationPath-to-text translation is the conversion of a graph path and its relationships into a natural-language textual representation.
- textual path summarizationTextual path summarization is the condensation of a graph path’s relationships and entities into a concise natural-language description.
- graph projectionA graph projection is an in-memory representation of selected graph data prepared for algorithmic analysis.
- PyTorch GeometricPyTorch Geometric is an open-source library that provides data structures and neural-network layers for geometric and graph machine learning with PyTorch.
- JSONJSON is a text-based data-interchange format that represents structured values using objects, arrays, and primitive data types.
- output specificationAn output format specification defines the required structure, fields, data types, and validity constraints of a system response.
- edge indexAn edge index is a tensor-based representation that encodes graph edges as pairs of source and destination node indices.
- ego networkAn ego network is a graph consisting of a focal node and its immediate neighboring nodes and connections.
- semantic typeA semantic type is a category that specifies the kind of entity represented by an ontology node, such as a disease, body structure, substance, or event.
- scispaCyscispaCy is a Python library providing natural-language-processing models and pipelines specialized for scientific and biomedical text.
- intelligent advisory systemAn advisory system is an intelligent system that supports human decision-making rather than acting independently.
- knowledge representationKnowledge representation is the formal encoding of knowledge so that computational systems can store, interpret, and reason over it.
- protein-protein interaction networkA protein-protein interaction network is a graph whose nodes represent proteins and whose edges represent experimentally observed physical or functional interactions between them.
- shortest-path detectionShortest-path detection is the computation of minimum-cost routes between nodes in a graph.
- schema extractionSchema extraction is the technique of identifying and structuring schema elements from a data source or schema description.
- NeosemanticsNeosemantics is a Neo4j plugin for importing, exporting, and working with RDF and other semantic-web data.
- retryA retry mechanism is a control procedure that repeats a failed operation according to configured retry conditions.
- community detectionA community detection algorithm identifies groups of graph nodes that are more strongly or densely connected to one another than to nodes outside the groups.
- betweenness centralityBetweenness centrality is a graph metric based on how often a node lies on shortest paths between other nodes.
- knowledge graph constructionKnowledge graph construction is the process of creating a knowledge graph by defining its scope, understanding its domain, and integrating information from multiple sources.
- dynamic routingDynamic routing is a workflow technique that selects the next processing path according to runtime state or results.
- agent stateAgent state is a structured record containing the information exchanged and accumulated by agents during a workflow.
- query executionQuery execution is the process of running a database query and processing the records or errors it produces.
- StateGraphStateGraph is a LangGraph class for constructing workflows whose nodes operate over shared typed state.
- conceptual schemaA conceptual schema is a domain-focused representation of a knowledge graph's essential entities, relationships, properties, and types, excluding technical implementation details.
- co-occurrenceCo-occurrence is the presence of two or more medical entities within the same sentence or textual context.
- graph densityGraph density is the fraction of possible edges that are present between nodes in a graph or subgraph.
- relation normalizationRelation normalization is the process of mapping semantically equivalent or similar extracted relation labels to a consistent relation type.
- kg-based interpretability and discoveryA technique that uses knowledge-graph structure to make information interpretable and expose previously unrecognized connections or knowledge.
- graph clustering methodA graph clustering method partitions graph nodes into groups according to structural or relational similarity.
- PageRankPageRank is a graph-ranking algorithm that estimates the importance of nodes from the structure and importance of incoming links.
- uncertaintyUncertainty is the lack of complete confidence that information, statements, or conclusions are true or precise.
- unstructured dataUnstructured data is information lacking a fixed tabular or schema-constrained organization, such as free-form documents.
- ontology pathAn ontology path is a traversable sequence of ontology relationships connecting concepts or entities and expressing their semantic connection.
- structured knowledge-based searchStructured knowledge-based search is a retrieval technique that uses formalized domain knowledge and ontologies to find and connect information across text.
- knowledge baseA knowledge base is a repository that stores structured representations of facts, entities, relationships, and rules for computational use.
- knowledge acquisitionKnowledge acquisition is the process of collecting information from sources, the environment, or domain experts for representation and reasoning.
- fine-tuningFine-tuning is adapting a pretrained model by continuing its training on targeted data or objectives.
- preprocessingData preparation is the process of selecting, cleaning, transforming, and organizing data for computational use.
- residual connectionA residual connection is a neural-network connection that combines a layer's input with its transformed output to facilitate information and gradient propagation.
- machine learningMachine learning is a field of computing in which models learn patterns from data to make predictions or decisions.
- domain knowledgeSpecialized knowledge and contextual understanding of a particular scientific or professional domain.
- collaborative filteringCollaborative filtering is a recommendation technique that infers preferences or associations from patterns across users, items, or entities.
- damping exponentA damping exponent is a nonnegative exponent that controls how graph degree values reduce the contribution of a path.
- HetionetHetionet is a biomedical knowledge graph integrating entities and relationships involving diseases, genes, drugs, and other biological concepts.
- path-degree productPath-degree product is the product of degree values raised to a damping exponent for all edge incidences along a path.
- multistage classification approachA multistage classification approach divides classification into sequential stages that can be refined independently.
- single broad promptA single broad prompt is one prompt that handles multiple classification categories and decision boundaries.
- text-attributed graphA text-attributed graph is a graph whose entities or relationships have associated textual attributes.
- text-paired graphA text-paired graph is a graph associated with documents or other textual resources and their metadata.
- technical database schemaA technical database schema is an implementation-level specification of a database's structures, elements, relationships, properties, metadata, and administrative details.
- data-centric paradigmA machine-learning development approach that prioritizes improving the quality and quantity of training data.
- attentionAn attention mechanism is a technique that assigns learned importance weights to inputs so a model can prioritize the most relevant information.
- monopartite graphA monopartite subnetwork is a network containing one type of node, with connections only between nodes of that type.
- purpose-driven approachPurpose-driven knowledge graph development is an approach that begins by defining business objectives and builds the knowledge graph around them.
- semi-supervised learningSemi-supervised learning is a machine-learning paradigm that learns from a combination of labeled and unlabeled examples.
- natural language processingNatural language processing is the computational analysis, understanding, and generation of human language, including conventional pipelines composed of specialized models.
- common senseCommon-sense reasoning is the use of ordinary human background knowledge and intuitive context to draw plausible conclusions.
- generalizationGeneralization is the process of deriving a broader model or conclusion that applies beyond the observed examples.
- constrained traversalA constrained traversal is a graph traversal restricted by specified node, relationship, property, or other query conditions.
- interpretabilityThe provision of understandable evidence or reasoning that allows people to inspect and validate an artificial intelligence system's outputs.
- graph conductanceGraph conductance is a measure of the connectivity between a subgraph and the remainder of its graph relative to the connections incident to the subgraph.
- string similarityString similarity is a measure of how closely two textual character sequences match.
- inner productA dot product is the scalar obtained by multiplying corresponding components of two equal-length vectors and summing the results.
- heterogeneous graph neural networkA heterogeneous graph neural network is a graph neural network designed to learn representations from graphs containing multiple node or relationship types.
- coreference resolutionCoreference resolution is the technique of determining which entity or expression a referring phrase, such as a pronoun or shortened name, denotes.
- precision medicinePersonalized medicine is an approach to healthcare that tailors prevention, diagnosis, or treatment to individual patient characteristics.
- knowledge cutoffA knowledge cutoff is the latest point in time represented in a model's training data, beyond which the model lacks learned information unless given new input.
- graph representation learningGraph representation learning is a machine-learning technique that automatically learns numerical representations of graph elements from graph structure and attributes.
- graph data scienceGraph data science is the application of graph algorithms and analytical methods to derive insights from connected data.
- intellectual networkAn intellectual network is a graph representing relationships among people involved in shared scholarly or professional activity.
- negative samplingNegative sampling is a training technique that selects unobserved or candidate relationships as negative examples instead of evaluating every possible relationship.
- StreamlitStreamlit is an open-source Python framework for creating interactive web applications from data and machine-learning code.
- source of truthA source of truth is an authoritative repository or representation from which consistent information is derived.
- phenotypic annotationA phenotypic annotation is an assertion associating a disease with a phenotypic feature and potentially recording metadata about that assertion.
- non-Euclidean spaceA non-Euclidean space is a geometric space whose distance or curvature properties differ from those of ordinary flat Euclidean space.
- semiautomated feature extractionSemiautomated feature engineering combines automated feature generation with human control or domain-informed refinement.
- semanticsSemantics is the explicit representation of the meaning of data through typed entities and meaningful relationships.
- degree algorithmA degree algorithm computes the number of relationships incident to each node in a graph.
- hub nodeA hub node is a graph node connected to an unusually large number of other nodes.
- schemaless approachA data-storage approach that imposes few or no fixed constraints on the format and relationships of stored items.
- candidate rankingCandidate ranking is the phase of entity disambiguation that scores and orders possible reference entities using contextual and other evidence.
- combined retrievalA retrieval technique that combines knowledge-graph context with document context obtained from multiple data sources.
- graph retrieverA retrieval component that returns relevant knowledge-graph information, such as nodes, relationships, or connecting subgraphs, for a query.
- knowledge graph-enhanced document retrieverA document-retrieval technique that uses knowledge-graph entities and relationships to select documents associated with the requested information.
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.
