Skip to content

neo4jev

Demo that navigates a Neo4j graph hop by hop, asking Jev which relationship to follow and whether the goal is reached.

LibraryprototypeMIT

Overview

neo4jev navigates a Neo4j knowledge graph one hop at a time using TypeSafe's system_one API instead of free-text generation. At each node, outgoing relationships (type, properties, target labels and properties) are presented as Choice options, and Jev returns a probability distribution over which to follow. A Noul question asking whether the goal has been reached rides in the same call, so each hop costs one round trip.

Top-k and cutoff selection over the returned probabilities implement a beam search, ranking chains by summed log-probabilities to avoid underflow and length bias. Results render in an interactive neo4j-viz graph. The app is schema-agnostic, discovering labels and relationships by introspection, and defaults to the public Neo4j Companies KG. It ships as a reusable library, three notebooks and a Streamlit app; without a TypeSafe key, failures are shown verbatim and stand-in answers are clearly labelled. It suits developers exploring LLM-guided graph traversal.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich outgoing relationship should be followed next toward the goal?—
Yes / noHas the goal been reached?yes · no

How it works

  1. Introspect the graph schema and start at a seed node.
  2. Present outgoing relationships as Choice options plus a goal Noul.
  3. Expand the top-k hops as a beam ranked by summed log-probabilities.
  4. Stop when the goal is reached and visualise the path.

Strengths

  • One API round trip per hop.
  • Schema-agnostic; works on any Neo4j instance.
  • Never presents stand-in output as TypeSafe output.

Caveats

  • Demo status; requires a TypeSafe API key for real decisions.
  • Beam search multiplies calls on wide graphs.

Getting started

Put TYPESAFE_API_KEY and Neo4j connection settings in .env, then run the Streamlit app or the notebooks.

At a glance

Type
Library
Status
prototype
Language
Python
Runtime
Streamlit, notebooks
Has code
yes
License
MIT
Stars
173

Use cases and integrations

How curated lists describe it

  • Graph navigation: navigates a Neo4j knowledge graph hop-by-hop using Jev Choice over candidate outgoing relationships and Noul to detect goal completion, using beam search over answer log-probabilities.

    yibie/awesome-jev
  • Neo4j graph navigation: at each node Jev chooses which relationship to follow, with beam search over log-probabilities

    AnotiaWang/awesome-decision-models
  • Navigates a Neo4j graph one hop at a time, asking Jev which relationship to follow next.

    logicrw/awesome-jev-projects
  • Typesafe.ai System One Model Jev navigating a Neo4j graph by using a classifier over neighbouring relationships

    wh000wh000/awesome-jev-live
  • Typesafe.ai System One Model Jev navigating a Neo4j graph by using a classifier over neighbouring relationships.

    hellogumbo/awesome-jev
  • Navigates a Neo4j graph by having Jev score neighbouring relationships, then beam-searching for the most probable path.

    MrJev/awesome-jev

Frequently asked questions

What does Jev decide at each node?

Which outgoing relationship to follow, and whether the goal has been reached.

Why beam search?

It keeps several promising paths, ranked by summed log-probabilities, rather than committing to one.

Can I use my own graph?

Yes, the schema is discovered live, so you can point it at another Neo4j instance via .env.

Related projects

  • Terminal tool that finds link paths between Wikipedia articles: Jev ranks each page's outgoing links while Python runs the search.

    ProjectbetaPython
  • Milvus-based multi-hop graph RAG library where two-stage Jev Noul scoring selects relations and reranks passages.

    LibrarybetaPython
  • Graph-database-agnostic GraphRAG framework where swappable Laya or Jev decisions score edges, route intents and gate hallucinations.

    ServicebetaPython
  • CLI and agent skill that shortlist notes in Obsidian or Logseq locally, then have Jev rerank them, returning original passages.

    DemobetaJavaScript
  • Independent experiments on Jev for search stopping, memory reranking and multi-hop relation selection, with stated limits.

    Articleresearch
  • Codex hook that compacts large command and tool outputs, using Jev to rank which chunks matter and keeping the full output retrievable.

    ServicebetaPython