Skip to content

[Bug]: LLM field variations (file/path -> source_file, relationship -> relation) trigger false extraction schema warnings #4390

Closed

Description

@AndresDiagoM

Pre-flight checks

  • I have checked the Troubleshooting section in the README

What happened?

When loading or validating semantic extractions, LLMs frequently emit "file", "path", or "filepath" instead of "source_file" on nodes, and "relationship" instead of "relation" on edges.

Currently, _fold_edge_aliases() only folds type -> relation and does not handle relationship. Additionally, there is no node alias folding, causing validate_extraction() to emit hundreds of warnings:

[graphify] Extraction warning: missing required field 'source_file'; missing required field 'relation'

Furthermore, nodes lacking source_file fail file-based deduplication and deletion guards.

Steps to reproduce

Pass an extraction dictionary containing nodes with "file": "src/app.ts" and edges with "relationship": "calls" to build_from_json().

Error output or graph output

[graphify] Extraction warning (537 issues): 500x missing required field 'source_file' (e.g. Node 1 missing required field 'source_file'); 37x missing required field 'relation' (e.g. Edge 2 missing required field 'relation')

Graphify version

0.9.87

Operating System

Windows / Linux / macOS

Python Version

3.11 / 3.12 / 3.13

Activity

  1. github-actions commented on Oct 12, 2026

    @github-actions

    Thanks for opening this issue, @AndresDiagoM. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

  2. safishamsi commented on Oct 12, 2026

    @safishamsi
    Member

    Fixed in v0.9.88 (graphifyy 0.9.88 on PyPI) via #4391.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions