Skip to content

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

fix(database-read-stream): when downloading traces/observations as csv annotations scored as zero dropped (#9682)

marliessophiebbc252ffde68
diff --git a/worker/src/features/database-read-stream/getDatabaseReadStream.ts b/worker/src/features/database-read-stream/getDatabaseReadStream.ts
index f7b9152e6d..63dfd0ec9c 100644
--- a/worker/src/features/database-read-stream/getDatabaseReadStream.ts
+++ b/worker/src/features/database-read-stream/getDatabaseReadStream.ts
@@ -7,6 +7,7 @@ import {
evalDatasetFormFilterCols,
OrderByState,
TracingSearchType,
+ isPresent,
} from "@langfuse/shared";
import { prisma } from "@langfuse/shared/src/db";
import {
@@ -588,7 +589,7 @@ export function prepareScoresForOutput(
const existingValues = acc[score.name];
const newValue =
score.dataType === "NUMERIC" ? score.value : score.stringValue;
- if (!newValue) return acc;
+ if (!isPresent(newValue)) return acc;
if (!existingValues) {
// First value determines the type