You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AST "uses" edges always get INFERRED confidence_score=0.5, violating the documented rubric #2813
Every edge with relation: "uses" produced by the structural (AST) extractor
is marked confidence: "INFERRED" with confidence_score: 0.5 — no
exceptions. Checked across a full project graph: 21/21 "uses" edges are
flat 0.5.
This directly violates the confidence rubric in references/extraction-spec.md,
which says INFERRED edges must pick one of {0.55, 0.65, 0.75, 0.85, 0.95} and
"never 0.5, never as a default." All other relation types in the same graph
(shares_data_with, semantically_similar_to, conceptually_related_to,
produced by the semantic/LLM subagents) correctly follow the discrete rubric —
this is isolated to AST-generated uses edges specifically.
Why this is wrong, not just inconsistent
The uses edges I checked are not actually uncertain — they're structurally
certain (e.g. a function with a type-annotated parameter ledger: QuotaLedger
that calls ledger.charge(...) in its body). AST already labels imports and calls edges as EXTRACTED with confidence_score: 1.0 for equivalent
structural certainty. uses edges from the same extractor should get the same
treatment — either EXTRACTED/1.0, or a real score from the rubric — not a
hardcoded 0.5 placeholder that makes 100%-certain relationships look like a
coin flip.
Repro
Run /graphify <path> on any Python project with class instances passed
between functions, then:
python -c "
import json
from collections import Counter
g = json.load(open('graphify-out/graph.json'))
c = Counter(e['confidence_score'] for e in g['links'] if e['relation']=='uses' and e['confidence']=='INFERRED')
print(c)
"
Expect: Counter({0.5: N}) for all N "uses" edges.
Suggested fix
In the AST extractor, either:
Emit uses edges as EXTRACTED / 1.0 (matches imports/calls treatment), or
Score them against the same discrete INFERRED rubric semantic subagents use.
Traced it — bug's not in the uses extractors. resolution.py/apex.py just set confidence: "INFERRED", no score. Real culprit is export.py's fallback table:
_CONFIDENCE_SCORE_DEFAULTS = {"EXTRACTED": 1.0, "INFERRED": 0.5, "AMBIGUOUS": 0.2}
Anything hitting export without a confidence_score gets defaulted off this. calls/imports dodge it because they're tagged EXTRACTED already. uses never gets a real score upstream so it always lands on 0.5.
resolution.py's uses edges resolve to one unambiguous import target — should just be EXTRACTED like calls/imports, not a fallback default. Apex's uses (trigger/SObject/DML) are murkier, probably need actual per-case INFERRED scores instead of one blanket fix.
Can PR the resolution.py side if that's the right call
Activity
AromalBiju1 commentedon Aug 17, 2026
Traced it — bug's not in the uses extractors. resolution.py/apex.py just set confidence: "INFERRED", no score. Real culprit is export.py's fallback table:
_CONFIDENCE_SCORE_DEFAULTS = {"EXTRACTED": 1.0, "INFERRED": 0.5, "AMBIGUOUS": 0.2}
Anything hitting export without a confidence_score gets defaulted off this. calls/imports dodge it because they're tagged EXTRACTED already. uses never gets a real score upstream so it always lands on 0.5.
resolution.py's uses edges resolve to one unambiguous import target — should just be EXTRACTED like calls/imports, not a fallback default. Apex's uses (trigger/SObject/DML) are murkier, probably need actual per-case INFERRED scores instead of one blanket fix.
Can PR the resolution.py side if that's the right call
fix(extract): give AST INFERRED edges a rubric confidence_score (#2813)
docs(changelog): add the AST INFERRED rubric confidence_score entry (#…
chore: bump to 0.9.47
safishamsi commentedon Aug 19, 2026
Fixed in v0.9.47: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.47 (AST INFERRED edges now carry a rubric confidence_score). Closing as resolved.