Ontology, Knowledge Graphs, and the Decision Model That Judges Them
Building knowledge graphs with LLMs has a cost structure that is easy to misread. Extraction is cheap and getting cheaper. Verification is where the money goes.
For every candidate entity and every candidate relation, something has to decide whether it is true to the document. That judgment repeats tens of thousands of times, which is the job a decision model exists for.
The model in question is Jev, a small decision model from TypeSafe built to take a claim, weigh the evidence and commit to an answer.
The pattern it challenges: - One large model handling extraction, summarisation and community building, with every step billed at frontier rates -The model that proposes a fact also being the one that grades it -Reasoning models adding a deliberation meter, paying for pages of thinking to collect one-word yes/no verdicts
OntoSmith splits the work into three layers: -A cheap mid-tier model proposes triples (Claude Haiku 5.5 in the reference setup). It reads and suggests. It does not decide. -A fitted pair call and then Jev judge every candidate before anything reaches the graph -A frontier model is reserved for the genuinely hard calls
The shared map is the ontology: versioned, hash-pinned packs for open-domain text, legal contracts and biomedical literature over a domain-neutral core. For a document type with no ready ontology, one is drafted for approval. The graph lives in Neo4j, one graph per ontology build.
This is not RAG versus Graph RAG. Search handles answers that sit in one paragraph. Graphs add value when relations span pages: +0.080 recall@20 (0.631 to 0.712) on a pinned 116-question set over long contracts, and exactly zero on short abstracts.
The measured figures: -3.8 cents per document across 500 documents in the flagship build -About 7 cents per document projected for judging alone in the default configuration -Corrected graph precision of 0.911 [0.892 to 0.928], revised down after a re-audit by a judge from a different model family, with the working shipped alongside
One lesson from the build: a decision model on default parameters is someone else’s operating point. Thresholds were fitted stage by stage, and experiments that missed their pre-registered bars stayed in the record as failures.
OntoSmith is MIT-licensed, on PyPI (pip install ontosmith) and on GitHub. 🔎
By Dongbum Lee
Github sbee.link/b7f83mctyv Article sbee.link/vumq48fnar
#OntoSmith #Neo4j #DecisionModels #RAG #LLM
--
Connected Data London 2026 | 11–12 November | Leonardo Royal Hotel London Tower Bridge
🎟 Tickets on sale now - 🔔 Just a few days left!
📺 Sponsorship opportunities available. Contact info@connected-data.london for details.
#KnowledgeGraph #GraphRAG #Ontology #Graph #AI #DataScience #GraphDB #SemTech