Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: deduplicate API scores using the event_ts (#10634)

Steffen Schmitz43b4160740d6
diff --git a/web/src/features/public-api/server/scores.ts b/web/src/features/public-api/server/scores.ts
index 3cdc54c48f..7b98ece147 100644
--- a/web/src/features/public-api/server/scores.ts
+++ b/web/src/features/public-api/server/scores.ts
@@ -98,7 +98,7 @@ export const _handleGenerateScoresForPublicApi = async ({
${appliedScoresFilter.query ? `AND ${appliedScoresFilter.query}` : ""}
${tracesFilter.length() > 0 ? `AND ${appliedTracesFilter.query}` : ""}
ORDER BY
- s.timestamp desc
+ s.timestamp desc, s.event_ts desc
LIMIT
1 BY s.id, s.project_id
${props.limit !== undefined && props.page !== undefined ? `LIMIT {limit: Int32} OFFSET {offset: Int32}` : ""}