Knowledge Graph
A knowledge graph is a knowledge base that represents real-world entities and their relations in a graph structure. Nodes stand for entities (people, places, companies, events) and edges stand for relations (born in, works for, acquired). It lets machines manage knowledge structurally and reason over it, and it is the infrastructure behind search engines, recommendation systems, and intelligent question answering.
Core Structure
The basic unit is the triple: head entity, relation, tail entity. For example, (Yao Ming, born in, Shanghai). A vast number of triples forms a directed graph that supports multi-hop queries: asking for the birthplace of Yao Ming's daughter means walking two hops, Yao Ming to daughter to birthplace.
Entity attributes are described as key-value pairs, such as Yao Ming - height - 226cm. Relations can carry attributes too (the start date of an employment relation, for instance), in which case the triple expands into a quadruple or a hyperedge.
Construction Pipeline
Knowledge extraction identifies entities (named entity recognition), relations (relation extraction), and attributes (attribute extraction) from unstructured text. Knowledge fusion resolves different surface forms of the same entity (Beijing and the city of Beijing must be merged) through entity alignment and entity disambiguation. Knowledge reasoning derives implicit relations with rules or embedding models (knowing that A is B's father implies B is A's child).
Difference from Vector Databases
A knowledge graph is an explicit, precise, explainable representation of knowledge, suited to strongly structured relational queries; a vector database is an implicit, fuzzy, semantic representation, suited to similarity search. The two complement each other. GraphRAG, which emerged after 2024, combines knowledge graphs with RAG so that graph structure improves the relevance and explainability of retrieval.
Challenges
The biggest bottlenecks are high construction cost and lagging updates. Manual annotation is expensive, automatic extraction makes errors, and real-world knowledge keeps changing, so maintaining a high-quality graph is a continuous investment. This is also why, after general large models appeared, many projects chose to answer directly with a large model instead of maintaining a graph.
Applications
Google search knowledge panels, corporate risk control (spotting related-party transactions and fraud rings), medical diagnostic assistance (reasoning over symptom-disease-drug relations), financial research (industry chain graphs), and intelligent customer service (product-fault-solution relations).