Evaluation: Add latency summary data
维护者通常 2 天内回复
评估
这个 Issue 还没有评估数据。
描述
Is your feature request related to a problem?
Evaluation runs provide cost information for OpenAI calls but lack latency data. This prevents us from identifying which configurations or prompts are slower, impacting our ability to optimize evaluations effectively.
Describe the solution you'd like
Add a latency summary to each evaluation run next to the cost, including:
- Average time of OpenAI calls in milliseconds, plus the number of calls for each step:
- response: generating the answer
- embedding: similarity scoring (v1 runs)
- judge: LLM-as-judge scoring (v2 runs)
- One overall average across all successful calls.
- Display this data on existing run endpoints for frontend integration.
- Ensure runs complete even if latency calculation fails.
Original issue
Is your feature request related to a problem? Please describe.
Evaluation runs show how much the OpenAI calls cost, but not how long they took. When we compare configs or prompts, we can't tell whether one setup is slower than another, or which step of the evaluation is slow: generating answers, embeddings, or judging. Response time is one of the main reasons fast evaluations exist, but we don't report it anywhere.
Describe the solution you'd like
Add a latency summary to each evaluation run, next to the existing cost:
- The average time of an OpenAI call in milliseconds, plus the number of calls, for each step:
- response: generating the answer for each question
- embedding: similarity scoring (v1 runs)
- judge: LLM-as-judge scoring (v2 runs)
- One overall average across all calls in the run.
- Only successful calls count. Failed calls and questions blocked by a guardrail are left out.
- Shown on the existing run endpoints, so the frontend can display it on the run card next to cost.
- If working out latency fails, the run should still complete.
Describe alternatives you've considered
- Storing latency inside the cost field. Rejected: a problem with one could wipe out the other. Keeping them separate keeps them independent.
- Using the total batch duration for batch runs. Rejected: batch time is mostly OpenAI queue time, not call time, so it would be misleading. Batch runs will show no latency.
- Adding p95 / max / per-question latency now. Deferred: we'll start with averages. The call counts and per-question timings are stored so these can be added later.
- 主要语言
- Python
- 星标
- 18
- 派生
- 11
- 平均合并
- 4 天 20 小时
- 30 天内合并 PR
- 9
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ProjectTech4DevAI/kaapi-backend 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
ProjectTech4DevAI/kaapi-backend#889 ·
维护者通常 2 天内回复
-
Fallback: Dynamic message translations可能已有人在做 @Prajna1999 今天认领。 未关闭
ProjectTech4DevAI/kaapi-backend#1251 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Redaction: Verify PII entity types可能已有人在做 @AkhileshNegi 今天认领。 未关闭enhancement
ProjectTech4DevAI/kaapi-backend#1250 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Content Safety: Unified wrapper validator可能已有人在做 @Prajna1999 今天认领。 未关闭
ProjectTech4DevAI/kaapi-backend#1249 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Documentation: Update API docs and Cookbook可能已有人在做 @Prajna1999 今天认领。 未关闭
ProjectTech4DevAI/kaapi-backend#1248 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 ProjectTech4DevAI/kaapi-backend 的全部 Issue
相似的 Issue
-
Agentic
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Imbad0202/academic-research-skills#979 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
reflex-dev/reflex#7561 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 62/100
prometheus-community/ansible#906 · 2 条评论 ·