Skip to content

BlogConcepts

Graphify edge confidence: EXTRACTED, INFERRED, AMBIGUOUS

· 4 minute read

Graphify edge confidence is a label on every relationship in a Graphify graph that says how the relationship was found. EXTRACTED means it was read directly from the source. INFERRED means it was a reasonable inference, stored with a confidence score. AMBIGUOUS means it is flagged for review. The label tells you how far to trust a hop.

What do Graphify's edge confidence tags mean?Link to What do Graphify's edge confidence tags mean?

Each edge in graph.json carries one of three tags in its confidence field. The tag describes the evidence, not the importance of the edge.

| Tag | Meaning | Score | How to treat it | |---|---|---|---| | EXTRACTED | Found directly in the source | Always 1.0 | Fact you can rely on | | INFERRED | A reasonable inference | 0.0 to 1.0 | A lead to confirm | | AMBIGUOUS | Evidence did not resolve | Flagged | Read the source |

The README states the rule plainly: every INFERRED edge has a confidence_score, and EXTRACTED edges are always 1.0.

Where does an EXTRACTED edge come from?Link to Where does an EXTRACTED edge come from?

An EXTRACTED edge comes from the syntax tree. Graphify parses code locally with tree-sitter. When a function body contains a call to another function in the same file, the parser sees it. That edge is deterministic. Parse the same file again and you get the same edge.

Where does an INFERRED edge come from?Link to Where does an INFERRED edge come from?

An INFERRED edge is a connection that needed a judgment. Two sources produce them. The first is your assistant's model, when it links a doc, a PDF, or an image to the code it describes. The second is cross-file resolution, when Graphify matches a call to a definition in another file by name.

Here is a real example. We built a two-file Python project with Graphify CLI 0.6.0, the current release at the time of writing. app.py imports check_token from auth.py and calls it. auth.py defines check_token, which calls verify in the same file. We ran graphify update ., then asked for a path:

text
$ graphify path "handle" "verify"
Shortest path (2 hops):
  handle() --calls [INFERRED]--> check_token() --calls [EXTRACTED]--> verify()

The same-file call is EXTRACTED with a score of 1.0. The cross-file call is INFERRED, and graph.json stores it with a confidence_score of 0.8. Graphify is telling you which hop it saw directly and which it matched.

What makes an edge AMBIGUOUS?Link to What makes an edge AMBIGUOUS?

AMBIGUOUS edges are relationships Graphify found evidence for but could not resolve. Dynamic code is the usual cause. A call through a variable, a plugin loaded by name, or a model's unsure link between a doc and two possible functions all qualify. The edge stays in the graph with the flag, so the gap is visible instead of hidden.

How do you see the tags?Link to How do you see the tags?

The CLI prints them on every hop. graphify path shows the tag on each edge, as above. graphify explain "check_token" lists a node's connections with their tags. graphify query prints nodes and tagged edges for a question. GRAPH_REPORT.md also summarizes how much of the graph is EXTRACTED versus INFERRED.

Before you change code based on a path, read the tags. Lean on EXTRACTED hops. Open the files behind INFERRED hops. Treat AMBIGUOUS hops as a place to read the source yourself.

How do you audit the tags in graph.json?Link to How do you audit the tags in graph.json?

Every edge in graphify-out/graph.json stores confidence and confidence_score. A few lines of Python list every edge that was not read directly from source. Run it after each rebuild to see which hops still need a human check. In our two-file project, it printed one edge: the cross-file call, tagged INFERRED at 0.8.

bash
python3 -c 'import json; g = json.load(open("graphify-out/graph.json")); [print(e["source"], e["relation"], e["target"], e["confidence"], e["confidence_score"]) for e in g["links"] if e["confidence"] != "EXTRACTED"]'

How do you read the split in GRAPH_REPORT.md?Link to How do you read the split in GRAPH_REPORT.md?

The report opens with a one-line summary of the whole graph. On our demo, Graphify 0.6.0 wrote: Extraction: 80% EXTRACTED · 20% INFERRED · 0% AMBIGUOUS · INFERRED: 1 edges (avg confidence: 0.8). Five edges, four parsed, one matched. A falling EXTRACTED share after a big change means more edges need checking.

The same report lists INFERRED edges under its surprising connections, so you can start reviewing there.

FAQLink to FAQ

Is an INFERRED edge usually wrong?Link to Is an INFERRED edge usually wrong?

No. Most inferred edges are right. The tag means the link was matched or judged rather than read directly, so check it before relying on it.

Can I filter a graph to EXTRACTED edges only?Link to Can I filter a graph to EXTRACTED edges only?

The confidence field is in graph.json, so you can filter it with any JSON tool. The report also shows the split.

Does the model assign the confidence score?Link to Does the model assign the confidence score?

For doc and media edges, yes. For cross-file code matches, Graphify assigns it during resolution.

Do tags change when I rebuild?Link to Do tags change when I rebuild?

EXTRACTED edges stay stable for unchanged code. INFERRED edges from a model can vary between runs.

Where are the tags stored?Link to Where are the tags stored?

On each edge in graphify-out/graph.json, in the confidence and confidence_score fields.

Try itLink to Try it

Install with uv: uv tool install graphifyy, run graphify update . in a repository, and try graphify path between two functions. The code is on GitHub. The confidence tags glossary entry goes further. To serve tagged edges to an agent, see what an MCP server is. See also what the Graphify benchmark measures. Setup details are in the installation docs.

Try Graphify now.

Try for free