AutoKG: Efficient Automated Knowledge Graph Generation for Language Models

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.