feat(evaluation) 5/15: generate the two promptfoo configs a run executes - #816
feat(evaluation) 5/15: generate the two promptfoo configs a run executes#816Ahmath-Gadji wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2860e1b to
daff0a7
Compare
7faed53 to
1f7dc63
Compare
|
@coderabbitai full review |
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 57 minutes. |
daff0a7 to
e595be2
Compare
1f7dc63 to
6fc3735
Compare
e595be2 to
19806fd
Compare
6fc3735 to
dc532d0
Compare
19806fd to
94ee72b
Compare
dc532d0 to
367fc99
Compare
A run produces two configs, not one, because the two questions need
different endpoints:
- retrieval hits `GET /search/partition/{partition}`, whose documents carry
the chunk `content` that `context-relevance` grades and the
`metadata.file_id` that feeds hit rate / MRR / recall;
- answers hit `POST /v1/chat/completions`, whose message content is what
`factuality` and `llm-rubric` grade.
Keeping them separate means every assertion in a config applies to that
config's single provider, so no assertion ever runs against an output shape
it cannot read.
Notes:
- `transformResponse` must be a single JavaScript expression. A statement or
an IIFE makes promptfoo error every row before grading, so the chat
transform extracts the message content and nothing more.
- The grader is OpenRAG's own configured LLM endpoint, so model-graded
assertions need no third-party credentials.
- Questions are interpolated through Nunjucks' `urlencode`, so one
containing `&` or `?` cannot corrupt the search query string.
- Assertions are copied per test rather than shared: a shared list
serialises as a YAML anchor plus aliases.
Pure — returns plain dicts. Serialisation and execution live in the worker.
94ee72b to
204206e
Compare
367fc99 to
35e2f62
Compare
hedhoud
left a comment
There was a problem hiding this comment.
I found one blocking issue in the default Helm deployment path. The rest of the configuration and focused tests look good.
| Points at OpenRAG's own OpenAI-compatible LLM endpoint so an eval needs no | ||
| third-party credentials. | ||
| """ | ||
| config: dict[str, Any] = {"apiBaseUrl": base_url} |
There was a problem hiding this comment.
[P1] Normalize the grader base URL
Could you please remove a trailing slash from this value? The bundled Helm configuration provides the grader URL ending in /v1/, and promptfoo appends /chat/completions directly. That makes grading requests use /v1//chat/completions, so both retrieval and answer evaluations fail with the default deployment settings. A regression test using a grader URL ending in / would cover this case.
Part 5 of 15 of the split of #811. Targets
eval/04-promptfoo-result-metrics(#815). Completescore/evaluation/— everything after this is wiring.What
build_retrieval_configandbuild_answer_config. Pure: they return plain dicts. Serialisation and execution live in the worker (part 9).Notable
GET /search/partition/{p}, whose documents carry the chunkcontentthatcontext-relevancegrades and themetadata.file_idthat feeds the ranking metrics; answers hitPOST /v1/chat/completions, whose message content is whatfactualityandllm-rubricgrade. Splitting them means every assertion in a config applies to that config's single provider — no assertion can run against an output shape it cannot read.transformResponsemust be a single JavaScript expression. A statement or an IIFE makes promptfoo error every row before grading. This was found by running the feature end to end, not by reading the docs. The chat transform therefore extracts the message content and nothing more; retrieved sources come from the retrieval pass instead.llm.base_url/llm.model), so model-graded assertions need no third-party credentials. AnapiKeyis always set because the OpenAI client refuses to send without one, even though vLLM ignores it.urlencode, so a question containing&or?cannot corrupt the search query string.expected_file_idsis deliberately absent fromvars— no assertion reads it. The ranking metrics are computed from the retrieved ids insummarize(part 4), not by promptfoo.Testing
10 unit tests asserting the generated structure: one provider per config, the endpoints and methods, bearer headers, per-test assertion copies,
urlencodetemplating,top_kpropagation, and the grader provider. The configs are asserted structurally rather than executed — promptfoo is not available in CI.