AutoKG: Efficient Automated Knowledge Graph Generation for Language Models

Dec 18, 2023·
Bohan Chen
,
Andrea L. Bertozzi
· 1 min read
Abstract
Traditional methods of linking large language models (LLMs) to knowledge bases via the semantic similarity search often fall short of capturing complex relational dynamics. To address these limitations, we introduce AutoKG, a lightweight and efficient approach for automated knowledge graph (KG) construction. For a given knowledge base consisting of text blocks, AutoKG first extracts keywords using a LLM and then evaluates the relationship weight between each pair of keywords using graph Laplace learning. We employ a hybrid search scheme combining vector similarity and graph-based associations to enrich LLM responses. Preliminary experiments demonstrate that AutoKG offers a more comprehensive and interconnected knowledge retrieval mechanism compared to the semantic similarity search, thereby enhancing the capabilities of LLMs in generating more insightful and relevant outputs.
Type
Publication
2023 IEEE International Conference on Big Data (BigData)

AutoKG is a lightweight pipeline for turning an unstructured text collection into a knowledge graph that can augment a large language model. An LLM extracts keywords from text blocks, and graph Laplace learning estimates relationships between keyword pairs without requiring a hand-designed ontology or end-to-end model fine-tuning.

At query time, AutoKG combines standard vector similarity with graph-guided retrieval. The vector search identifies semantically relevant text blocks, while the graph expands the search toward strongly associated keywords and their supporting passages. The merged context exposes relational information that a nearest-neighbor search can miss.

Experiments on question answering and knowledge discovery show that this hybrid retrieval mechanism returns more interconnected context and helps the language model produce more relevant and informative responses. The paper appeared in the GTA3 workshop at IEEE BigData 2023, and the complete demonstration notebooks are publicly available.