Knowledge graph ज्ञान को (subject, predicate, object) triples के रूप में store करता है: (Albert Einstein, born_in, Ulm), (Ulm, located_in, Germany)। ये triples एक graph बनाते हैं जहां entities nodes हैं और relationships edges हैं। आप multi-hop questions का उत्तर देने के लिए graph traverse कर सकते हैं: "general relativity develop करने वाले व्यक्ति का जन्मस्थान कहां था?" Einstein → born_in → Ulm → located_in → Germany follow करता है।
Knowledge graphs और LLMs का integration कई रूप लेता है: RAG के source के रूप में KGs का उपयोग (query के लिए relevant subgraphs retrieve करना), KGs populate करने के लिए LLMs का उपयोग (text से entities और relationships extract करना), और LLM outputs verify करने के लिए KGs का उपयोग (stated facts को graph से check करना)। GraphRAG (Microsoft) documents से knowledge graph बनाने के लिए LLMs का उपयोग करता है, फिर pure vector search से अधिक structured retrieval के लिए उस graph को query करता है।
Knowledge graph construct करने के लिए आवश्यक है: entity extraction (text में people, places, concepts identify करना), relation extraction (entities कैसे relate हैं identify करना), entity resolution (recognize करना कि "NYC," "New York City," और "The Big Apple" एक ही entity हैं), और schema design (define करना कि किस प्रकार की entities और relationships exist करती हैं)। LLMs ने इनमें से प्रत्येक step को सस्ता और अधिक accurate बना दिया है, उन organizations के लिए KG construction को democratize किया है जो पहले manual effort afford नहीं कर सकती थीं।