Skip to content

Leveraging Multi-Agent LLMs for Automated Knowledge Graph Enrichment

Notifications You must be signed in to change notification settings

YuxingLu613/KARMA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

KARMA: Leveraging Multi-Agent LLMs for Automated Knowledge Graph Enrichment 🤖

License: MIT Python 3.8+ ArXiv

KARMA is a natural language processing framework that leverages a coordinated multi-agent system to automatically extract, validate, and integrate scientific knowledge into structured knowledge graphs. By employing specialized Large Language Model (LLM) agents, KARMA ensures high-quality knowledge extraction while maintaining semantic consistency.

Overall

Note

A primitive version of KARMA has released, we are still working on updating the pipeline. Feel free to provide suggestions.

🌟 Highlights

  • Multi-Agent Architecture: Coordinated system of specialized agents for robust knowledge extraction
  • Quality-Focused: Multi-stage validation with confidence, clarity, and relevance scoring
  • Domain-Adaptive: Specialized for scientific literature processing
  • Scalable: Handles both single documents and large-scale batch processing

🎯 Core Capabilities

1. Document Processing

  • PDF and text parsing
  • Context-aware content segmentation
  • Content summarization

2. Knowledge Extraction

  • Entity recognition
  • Relationship identification
  • Semantic triple formation
  • Conflict Resolution

3. Quality Assurance

  • Multi-dimensional scoring system
  • Domain relevance validation

🚀 Quick Start

To quickly get started with KARMA, you can run the provided script

python karma_pipeline.py \
--input path/to/document.pdf \
--api_key your-openai-api-key \
--model gpt-4o \
--output results.json

📊 Output Format

KARMA generates knowledge triples with quality metrics:

{
   "results": [
    {
      "head": "KARMA",
      "relation": "uses",
      "tail": "Multi-Agent LLMs",
      "confidence": 0.85,
      "clarity": 0.92,
      "relevance": 0.78
    }, 
      ... 
    ]
}

🛠️ Technical Requirements

  • Python 3.8+
  • Dependencies:
    • openai>=1.0.0: LLM integration
    • PyPDF2>=3.0.0: PDF processing
    • spacy>=3.0.0: NLP processing
    • networkx>=2.6.0: Knowledge graph operations
    • typing-extensions>=4.0.0: Type hints

🤝 Contributing

We welcome contributions!

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📬 Contact

For questions and feedback:

🔖 Cite Information

@article{lu2025karma, title={KARMA: Leveraging Multi-Agent LLMs for Automated Knowledge Graph Enrichment}, author={Lu, Yuxing and Wang, Jinzhuo}, journal={arXiv preprint arXiv:2502.06472}, year={2025} }

🙏 Acknowledgments

  • All LLMs we ues in our experiments
  • PubMed
  • All contributors and users

About

Leveraging Multi-Agent LLMs for Automated Knowledge Graph Enrichment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages