Skip to content

[FIX]: make entity linking deterministic across runs - #529

Open
oussamahansal wants to merge 3 commits into
mainfrom
fix/byokg-linking-determinism
Open

[FIX]: make entity linking deterministic across runs#529
oussamahansal wants to merge 3 commits into
mainfrom
fix/byokg-linking-determinism

Conversation

@oussamahansal

Copy link
Copy Markdown
Collaborator

Description

Entity linking is nondeterministic. The same query on the same graph with the same topk returns different seed sets between runs — and sometimes a different number of seeds. On the demo KG, 5 identical runs produced 5 distinct seed sets.

Changes

  • fuzzy_string.pysorted(set(...)) for a hash-independent vocab order
  • byokg_query_engine.pylist(dict.fromkeys(...)) for the seed union (order-preserving dedup) and sorted(explored_entities) for the path retriever input.

Problem

Related issue (if any): #

Testing

  • Unit tests added/updated
  • Integration tests added (as appropriate)
  • Existing tests pass (pytest)
  • Tested manually (describe below)

Checklist

  • Code follows existing style and conventions
  • License headers present on new files
  • Documentation updated (if applicable)
  • No breaking changes (or clearly documented)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

BYOKG-RAG Coverage Report: The coverage is at unknown% (target: unknown%). Download the HTML report here.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

BYOKG-RAG Coverage Report: The coverage is at 95.0% (target: 80%). Download the HTML report here.

@noel-improv noel-improv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice on this, just one non-blocker

Comment thread byokg-rag/src/graphrag_toolkit/byokg_rag/indexing/fuzzy_string.py
@github-actions

Copy link
Copy Markdown

BYOKG-RAG Coverage Report: The coverage is at 95.0% (target: 80%). Download the HTML report here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants