Skip to content

Graph.json inconsistency for same data across multiple runs #1632

Closed

Description

@umeshpsatwe

We are using this on documents. The resultant graph is not consistent across different runs. Ex, if I run Graphify on 50 documents multiple times, the nodes and edges are not consistent in graph.json.
Has anyone encountered this and found a solution ?

Activity

  1. sub4biz commented on Jul 3, 2026

    @sub4biz

    What backend do you use and exact model name?

  2. safishamsi commented on Jul 4, 2026

    @safishamsi
    Member

    Partially fixed in e2ef4ef (on v8, ships in 0.9.6).

    There were two layers here. The pipeline layer was a real bug: with a parallel LLM backend, chunk results were merged in completion order, so which network call happened to return first reordered nodes and edges run-to-run even when the model returned identical content. Chunks are now merged in deterministic submission order after the pool drains, so that source of churn is gone. (Clustering and code extraction were already deterministic - verified byte-identical graph.json across repeated code-only runs.)

    The remaining layer is not something graphify can fully eliminate: for documents, the semantic content itself is produced by the LLM, which is nondeterministic run-to-run (even at temperature 0, and especially for local models under load). So node/edge ordering is now stable, but the set of extracted concepts can still vary with the model. If you want maximum stability, the semantic cache (content-hash-keyed) keeps unchanged documents identical across runs, and pinning a deterministic backend/model helps. Closing on the pipeline fix - please reopen if you see ordering churn on an unchanged corpus after 0.9.6.

  3. added a commit that references this issue on Jul 4, 2026
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