Zubnet AI学习Wiki › Knowledge Graph
基础

Knowledge Graph

KG, Ontology
知识的结构化表示,作为由关系(边)连接的实体(节点)网络。“巴黎(实体)是(关系)法国(实体)的首都。”知识图谱以支持推理、查询、发现的方式编码事实。Google 的知识图谱、Wikidata、以及企业知识图谱驱动搜索、推荐、数据集成。

为什么重要

知识图谱通过提供 LLM 可查询而非幻觉的结构化、可验证事实来补充 LLM。当 LLM 把知识隐式存在权重里(有时是错的),知识图谱把它显式存在可验证、可更新的三元组里。LLM(理解自然语言)和 KG(锚定事实)的组合对企业 AI 是一个强大的模式。

Deep Dive

A knowledge graph stores knowledge as (subject, predicate, object) triples: (Albert Einstein, born_in, Ulm), (Ulm, located_in, Germany). These triples form a graph where entities are nodes and relationships are edges. You can traverse the graph to answer multi-hop questions: "Where was the birthplace of the person who developed general relativity?" follows Einstein → born_in → Ulm → located_in → Germany.

KGs + LLMs

The integration of knowledge graphs with LLMs takes several forms: using KGs as a source for RAG (retrieve relevant subgraphs for a query), using LLMs to populate KGs (extract entities and relationships from text), and using KGs to verify LLM outputs (check stated facts against the graph). GraphRAG (Microsoft) uses LLMs to build a knowledge graph from documents, then queries that graph for more structured retrieval than pure vector search.

Building Knowledge Graphs

Constructing a knowledge graph requires: entity extraction (identifying people, places, concepts in text), relation extraction (identifying how entities relate), entity resolution (recognizing that "NYC," "New York City," and "The Big Apple" are the same entity), and schema design (defining what types of entities and relationships exist). LLMs have made each of these steps cheaper and more accurate, democratizing KG construction for organizations that previously couldn't afford the manual effort.

相关概念

← 所有术语
← Knowledge Editing KV Cache →