Knowledge graph generator for text analysis and RAG
Top 59.0% on sourcepulse
This library extracts knowledge graphs from any text, targeting users building RAG systems, synthetic data for ML, or needing to structure and analyze text relationships. It offers flexibility by supporting various LLM providers via LiteLLM and structured output generation with DSPy.
How It Works
kg-gen leverages large language models (LLMs) to identify entities and relationships within text. It processes input by chunking large documents and can optionally cluster similar entities and relations to normalize the output. The library supports both single text strings and conversational message formats, preserving conversational context for richer graph extraction.
Quick Start & Requirements
pip install kg-gen
Highlighted Details
Maintenance & Community
The project is maintained by stair-lab. Further community or roadmap details are not explicitly provided in the README.
Licensing & Compatibility
Limitations & Caveats
The effectiveness of graph generation is dependent on the chosen LLM's capabilities and the quality of the input text. Clustering and aggregation functionalities are optional and may require fine-tuning for optimal results.
1 week ago
1 week