Decide knowledge graph relations with evidence for each edge
For each pair of entities found in documents, have Jev choose the relation type or none, and keep the text that justified it.
DifficultyAdvanced
Setup time1-2 days
CategoryDecision models (Jev)
The use case
Data teams building knowledge graphs from documents struggle with LLMs that invent relations. In these builds candidate entity pairs come from extraction, and Jev picks the relation from a fixed list, including none, with the supporting sentence stored on the edge. A second build walks a Neo4j graph by asking at each node which outgoing relation to follow for a question. Analysts review a sample of new edges, and anything used for compliance or legal work should be checked against the source.
Example workflow
- Extract candidate entities from documents with spaCy or an LLM
- Define the allowed relation types plus none
- Ask Jev a Choice question per pair with the source sentence
- Write edges and evidence to Neo4j
- An analyst samples new edges weekly
Tools
- Jev (TypeSafe AI)
- Neo4j
- spaCy
Risks and guardrails
- Wrong entity matches create false links
- A fixed relation list misses new kinds of links
- Graphs used for decisions need source checks
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- jevgraph by chenmingtang830 on Made with Jev: madewithjev.com/builds/jevgraph
- jevgraph: original post or repo by chenmingtang830: github.com/chenmingtang830/jevgraph
- neo4jev by Michael Hunger on Made with Jev: madewithjev.com/builds/neo4jev
- neo4jev: original post or repo by Michael Hunger: github.com/jexp/neo4jev