Skip to content

OntoCast

OntoCast reads documents and writes an RDF knowledge graph: an ontology that describes the domain, and the facts the documents state in its terms.

Give it your ontologies and it extracts facts against them; give it none and it builds one as it reads. Each part of a document is handled by a language model in a render-and-critique loop, and every change to a graph is a small, checked patch rather than a rewritten file.

It is for engineers who need a graph they can query, validate and trace back to the text it came from.

pip install "ontocast[server,openai]"

Quick start How it works

Documents pass through a render-and-critique loop and become two layers of one graph: an ontology of classes above, and facts below, each fact typed by a class. Documents render critique Ontology Facts

What you can do with it

Build or extend an ontology

From the text, OntoCast proposes classes and properties, checks them for structure and consistency, and merges them into the ontology one version at a time. Start from your own ontologies or from none.

Extract facts in its terms

Facts are written against the ontology, so every new entity is typed by it. Mentions of the same entity across a document are merged into one, and the result can be validated with SHACL shapes before it is stored.

Run it the way you work

Run OntoCast as an HTTP service, as a batch command over a folder, or inside your own LangChain or LangGraph agent. Graphs stay in memory by default, or go to Apache Jena Fuseki.

  • Installation

    Install the package with the extras you need.

  • Quick start

    Start the server and turn one document into a graph.

  • How it works

    The pipeline from document to graph, stage by stage.

  • Recipes

    Settings for evaluating, building an ontology, or serving.