Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(llma): clamp llm evaluation sampling percentage to 2 decimal places (#59735)

Paul D'Ambra60e5bd38afd2
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 9074d1c54405..3e43a4b24bf4 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -4149,7 +4149,7 @@ snapshots:
scenes-app-dashboards--edit--dark:
hash: v1.k794b7964.bd3d07247d36e8ec8da6ac4786ccb76ae4ab25f8bf2ee715a65116ea0a351d7e.k2IamoJqoBz3dJd0G5BLinh4FInyFYw9whCsiBbn-JA
scenes-app-dashboards--edit--light:
- hash: v1.k794b7964.543acaca813f958c9fcb37d71de69db98826752f2c766175c299433df8927da7.2SQ-1Ctzbkg4E3HPsXzF4agVBwBhdQtvQXR9dI3ROfc
+ hash: v1.k794b7964.323ad2f789d32ab1f7ff93e7f9123a5b57584a51140d17c189ceeafe1254c6f2.xPHUsj1Ql16ii6E9XeaYqXAkHY5DCaOYimQlEbUNrA8
scenes-app-dashboards--erroring--dark:
hash: v1.k794b7964.a356bf2ce40e53018919ebc890579c0ad6e493385f546d26b1f70471bf99f726.UER3Vv5UUZ1POzJv4_TuxrLBcLfLa8WTZ_hyUX9t72s
scenes-app-dashboards--erroring--light:
diff --git a/products/llm_analytics/frontend/evaluations/llmEvaluationLogic.ts b/products/llm_analytics/frontend/evaluations/llmEvaluationLogic.ts
index c041dd38d2f1..f8fd1d7adfbf 100644
--- a/products/llm_analytics/frontend/evaluations/llmEvaluationLogic.ts
+++ b/products/llm_analytics/frontend/evaluations/llmEvaluationLogic.ts
@@ -228,7 +228,17 @@ export const llmEvaluationLogic = kea<llmEvaluationLogicType>([
setEvaluationEnabled: (state, { enabled }) => (state ? { ...state, enabled } : null),
setAllowsNA: (state, { allowsNA }) =>
state ? { ...state, output_config: { ...state.output_config, allows_na: allowsNA } } : null,
- setTriggerConditions: (state, { conditions }) => (state ? { ...state, conditions } : null),
+ setTriggerConditions: (state, { conditions }) =>
+ state
+ ? {
+ ...state,
+ conditions: conditions.map((c) =>
+ c.rollout_percentage != null
+ ? { ...c, rollout_percentage: Math.round(c.rollout_percentage * 100) / 100 }
+ : c
+ ),
+ }
+ : null,
setModelConfiguration: (state, { modelConfiguration }) =>
state ? { ...state, model_configuration: modelConfiguration } : null,
setEvaluationType: (state, { evaluationType }) => {