-
Notifications
You must be signed in to change notification settings - Fork 0
Decouple Wikidata linking into background linking agent #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
62e6d5b
1b846d0
9276dbc
2e97446
4f3d892
8fef347
1e9c1c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,84 @@ | ||||||
| # Decouple Wikidata Linking into Background Linking Agent | ||||||
|
|
||||||
| **Date:** 2026-03-31 | ||||||
|
|
||||||
| ## Problem | ||||||
|
|
||||||
| The resolve pipeline step called the Wikidata API synchronously for every entity, causing timeouts on episodes with many entities. The Wikidata Q-ID is not needed for embedding or RAG queries, so linking can be deferred. | ||||||
|
|
||||||
| ## Changes | ||||||
|
|
||||||
| ### Entity model (`episodes/models.py`) | ||||||
|
|
||||||
| Added `LinkingStatus` choices (`pending`, `linked`, `skipped`, `failed`) and `linking_status` field to `Entity`. Data migration sets existing entities with `wikidata_id` to `linked`. | ||||||
|
||||||
| Added `LinkingStatus` choices (`pending`, `linked`, `skipped`, `failed`) and `linking_status` field to `Entity`. Data migration sets existing entities with `wikidata_id` to `linked`. | |
| Added `LinkingStatus` choices (`pending`, `linking`, `linked`, `skipped`, `failed`) and `linking_status` field to `Entity`. `linking` represents an in-progress Wikidata linking operation. Data migration sets existing entities with `wikidata_id` to `linked`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linking agent documentation omits the
linkingstatus even though it’s a realEntity.linking_statuschoice and will show up in admin/filters. Consider documenting whatlinkingmeans (claimed/in-progress) and how to recover if entities get stuck in that state (e.g., reset topendingvia admin/CLI).