Retrieving scores updated in the UI via the API #10593
-
|
I'm having difficulty retrieving a score (annotation) which was updated via the Langfuse web app using the python SDK. (I created the score, and score config, for test purposes. It's the only score for the given trace, of the given config and in the given queue.) The score was updated less than a day after it was created. It's a categorical score. Both the score and the comment were altered. However, when I query the API (using the python SDK's I've found quite a lot of information about the behaviour and mutability of the score data when updated via the API but nothing about this specific situation. At the moment, I have one score showing on the UI but a different one being retrieved via the API. Any advice would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
|
From November 20, 2025, I can help you understand the issue you're experiencing with scores updated via the Langfuse UI not reflecting in API queries. When you update a score through the Langfuse web UI, you need to understand how score updates work with idempotency keys. The documentation explains that by default, Langfuse allows multiple scores of the same When you created the score initially (either via SDK or UI), if no explicit
To resolve this, you should:
The documentation also notes that there can be race conditions with score ingestion, particularly in self-hosted environments(2), though this typically affects score creation rather than updates. 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
I have already tried setting I assume searching without specifying the score ID and seeing only the one score returned eliminates the possibility that there are multiple scores. I don't think I can use When I change the score on the app, the "Score data saved" animates, suggesting that the new value is saved (and indeed the new value is what is displayed when I go to view the score again). |
Beta Was this translation helpful? Give feedback.
-
|
Hi @chriswmann, thanks. Are you self-hosting Langfuse? If yes, which version are you running? |
Beta Was this translation helpful? Give feedback.
-
|
@chriswmann Thank you for the report! Updates to scores are processed on our backend like a "new" insert and then eventually deduplicated in the database and also deduplicated on reads. It seems that there was a bug where we took a random version of the score for the public API result. This will be fixed in #10634 with a cloud release happening later today and an OSS release following soon after. |
Beta Was this translation helpful? Give feedback.
@chriswmann Thank you for the report! Updates to scores are processed on our backend like a "new" insert and then eventually deduplicated in the database and also deduplicated on reads. It seems that there was a bug where we took a random version of the score for the public API result. This will be fixed in #10634 with a cloud release happening later today and an OSS release following soon after.