ontogpt  by monarch-initiative

Python package for LLM-based structured information extraction

created 2 years ago
710 stars

Top 49.4% on sourcepulse

GitHubView on GitHub
Project Summary

OntoGPT is a Python package designed for extracting structured information from text using Large Language Models (LLMs) and ontology-based grounding. It targets researchers and developers working with knowledge bases, aiming to streamline the process of populating them with data extracted from unstructured text.

How It Works

OntoGPT leverages LLMs through the litellm package, supporting a wide array of APIs including OpenAI, Azure, Anthropic, and Mistral. Its core methodology, SPIRES (Structured Prompt Interrogation and Recursive Extraction of Semantics), focuses on grounding LLM outputs with ontologies. This approach allows for more accurate and structured information extraction, enabling the population of knowledge bases with semantically rich data.

Quick Start & Requirements

  • Install with pip install ontogpt.
  • Requires Python 3.9+.
  • OpenAI API key setup: runoak set-apikey -e openai <your openai api key>.
  • Supports various LLM providers via litellm, requiring API key configuration for each.
  • Web application requires pip install ontogpt[web].
  • For Ollama integration, install Ollama and pull models (e.g., ollama pull llama3).
  • Full documentation: https://ontogpt.readthedocs.io/en/latest/

Highlighted Details

  • Utilizes the SPIRES method for structured, ontology-grounded LLM extraction.
  • Supports a broad range of LLM providers through litellm, including local models via Ollama.
  • Offers a command-line interface and a basic web application for interaction.
  • Evaluated on test data with details available in documentation.

Maintenance & Community

  • Part of the Monarch Initiative.
  • Supported by Bosch Research.
  • Related project: TALISMAN uses OntoGPT.
  • Presentations and tutorials available, including a video on SPIRES.

Licensing & Compatibility

  • The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The web application is described as "bare bones" and not recommended for public hosting without authentication. The licensing status is unclear, which may impact commercial adoption.

Health Check
Last commit

5 days ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
2
Star History
36 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.