HN में प्रस्तुत: FastGraphRAG – पारंपरिक PageRank का उपयोग करने वाली उन्नत RAG तकनीक
(github.com/circlemind-ai)सरल और promptable Fast GraphRAG framework
- व्याख्यायोग्य और debug करने योग्य ज्ञान: ग्राफ ऐसा knowledge view प्रदान करते हैं जिसे इंसान एक्सप्लोर कर सकते हैं, और जिसे query, visualize तथा update किया जा सकता है
- तेज़, सस्ता और efficient: बड़े पैमाने पर चलाने के लिए डिज़ाइन किया गया है, इसलिए resource और cost की ज़रूरतें कम हैं
- डायनामिक डेटा: domain और ontology आवश्यकताओं के अनुसार ग्राफ को अपने आप generate और refine करता है
- क्रमिक अपडेट: डेटा के विकसित होने के साथ real-time updates को support करता है
- बुद्धिमान exploration: accuracy और reliability बढ़ाने के लिए PageRank-आधारित graph exploration का उपयोग करता है
- async और type support: पूर्ण async और type support के साथ मज़बूत और पूर्वानुमेय workflows प्रदान करता है
इंस्टॉलेशन
-
PyPi से इंस्टॉल करें (अनुशंसित)
pip install fast-graphrag -
source से इंस्टॉल करें
# पहले इस repository को clone करें cd fast_graphrag poetry install
क्विक स्टार्ट
-
environment में OpenAI API key सेट करें
export OPENAI_API_KEY="sk-..." -
Charles Dickens की A Christmas Carol डाउनलोड करें
curl https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/… > ./book.txt -
Python code उदाहरण
from fast_graphrag import GraphRAG DOMAIN = "Analyze this story and identify the characters. Focus on how they interact with each other, the locations they explore, and their relationships." EXAMPLE_QUERIES = [ "What is the significance of Christmas Eve in A Christmas Carol?", "How does the setting of Victorian London contribute to the story's themes?", "Describe the chain of events that leads to Scrooge's transformation.", "How does Dickens use the different spirits (Past, Present, and Future) to guide Scrooge?", "Why does Dickens choose to divide the story into \"staves\" rather than chapters?" ] ENTITY_TYPES = ["Character", "Animal", "Place", "Object", "Activity", "Event"] grag = GraphRAG( working_dir="./book_example", domain=DOMAIN, example_queries="\n".join(EXAMPLE_QUERIES), entity_types=ENTITY_TYPES ) with open("./book.txt") as f: grag.insert(f.read()) print(grag.query("Who is Scrooge?").response) -
उसी working directory में fast-graphrag को दोबारा initialize करने पर यह अपने आप सारा knowledge बनाए रखता है
उदाहरण
- लाइब्रेरी के सामान्य उपयोग मामलों के tutorial देखने के लिए
examplesफ़ोल्डर देखेंcustom_llm.py: विभिन्न OpenAI API-संगत language models और embedders के साथ fast-graphrag को configure करने का एक सरल उदाहरण
योगदान
- छोटे-बड़े सभी योगदानों का स्वागत है। योगदान open source समुदाय को सीखने, प्रेरित होने और निर्माण करने की एक शानदार जगह बनाते हैं
- कैसे शुरू करें, यह जानने के लिए contribution guide देखें
- अगर समझ न आए कि कहाँ से शुरू करें, तो Discord में शामिल होकर सवाल पूछ सकते हैं
दर्शन
- हमारा मिशन दुनिया में सफल GenAI applications की संख्या बढ़ाना है
- इसके लिए हम memory और data tools बना रहे हैं, ताकि LLM apps agent workflow को सेट और maintain करने की जटिलता के बिना अत्यधिक specialized retrieval pipelines का उपयोग कर सकें
ओपन सोर्स या managed service
- यह repository MIT license के तहत है। अधिक जानकारी के लिए LICENSE.txt देखें
- Fast GraphRAG के साथ शुरुआत करने का सबसे तेज़ और विश्वसनीय तरीका managed service का उपयोग करना है
- हर महीने शुरुआती 100 requests मुफ़्त हैं, उसके बाद usage के आधार पर शुल्क लिया जाता है
1 टिप्पणियां
Hacker News टिप्पणी
BM25 और LLM को साथ में इस्तेमाल करने पर बहुत उच्च प्रासंगिकता वाले परिणाम मिल सकते हैं
mermaid.jsmindmap का उपयोग करके input को hierarchical तरीके से बाँटा जाता है और उपयुक्त root खोजा जाता हैPageRank और Triangle Centrality ऐसे दिलचस्प centrality metrics हैं जिन्हें graph पर लागू किया जा सकता है
पारंपरिक information retrieval, RAG के लिए उपयुक्त लगता है
एक AI startup बड़े पैमाने पर document analysis के लिए GraphRag system का उपयोग करना चाहता है
इस बात पर सवाल कि PageRank के लिए OpenAI API key क्यों चाहिए
graph database के बिना graph को store और query करने के तरीकों पर सवाल
sciphi triplexmodel से extraction की कोशिश में असंगत परिणाम मिलेdomain-specific text के knowledge graph निर्माण के लिए आवश्यक text की मात्रा पर सवाल
domain और example queries knowledge graph बनाने में कैसे मदद करते हैं, इस पर सवाल
pricing policy को लेकर भ्रम
"Scrooge कौन है?" इस सवाल के जवाब के अन्य approaches से बेहतर होने पर सवाल