fix(core): align assert-set scoring semantics - #1644
Merged
Conversation
Deploying agentv with
|
| Latest commit: |
b8a3e97
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://17df7afb.agentv.pages.dev |
| Branch Preview URL: | https://promptfoo-assert-set-semanti.agentv.pages.dev |
christso
marked this pull request as ready for review
July 4, 2026 07:42
christso
marked this pull request as draft
July 4, 2026 07:42
christso
marked this pull request as ready for review
July 4, 2026 07:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentV-authored
type: assert-setYAML now matches Promptfoo's compatible scoring shape: omitted thresholds follow child pass/fail results, explicit thresholds gate on aggregate score, child weights affect aggregation, and parent metrics preserve grouped score names. Assert-set-levelconfigis accepted in authored YAML and inherited by children with child config taking precedence, including for runtime script assertion context.Semantic Decisions
thresholdoverrides child verdicts and gates on the weighted aggregate score.weightcontributes to aggregate scoring;weight: 0children are metric-only and do not fail an omitted-threshold parent.metricnames the assert-set aggregate score while child metrics remain visible as nested/named scores.assert; internal TypeScript keepsAssertSetGraderConfig.assertionsbecause it is established AgentV API shape and clearer inside the grader boundary.Promptfoo Evidence
Verified against local Promptfoo clone commit
6bfc5a0c7f16f9c4717ac731d276b578e63d0769.src/types/index.ts:AssertionSetSchemasupports nestedassertplus optionalconfig,metric,weight, andthreshold.src/assertions/assertionsResult.ts: no-threshold assertion sets follow child pass/fail results; thresholds override with aggregate score checks; child weights and named scores feed aggregation.src/assertions/index.ts: assert-set assertions are flattened through a parent assertion-set result, preserving parent metric/weight behavior.Intentional Divergences
threshold: 0as an authored threshold because AgentV threshold handling uses definedness, while the inspected Promptfoo code uses a truthiness check for threshold override.configinheritance for authored YAML and programmatic configs. The Promptfoo schema exposes set-levelconfig, but the inspected flattening path did not visibly merge that config into children; AgentV's inheritance is the documented compatibility behavior for this surface.Verification
bun test packages/core/test/evaluation/loaders/grader-parser.test.ts packages/core/test/evaluation/graders/promptfoo-assertions.test.ts packages/core/test/evaluation/validation/eval-file-schema.test.tsbun --filter @agentv/core lintbun --filter @agentv/core typecheckbun --filter @agentv/core buildbun --filter @agentv/sdk buildbun --filter @agentv/web buildbun run lintgit diff --checkbun run validate:exampleswas not run because examples were not changed. The full rootbun run testsuite was not run; focused parser/schema/grader coverage was run for the touched behavior.Dogfood And Evidence
Live dogfood used the local OpenAI-compatible proxy at
http://127.0.0.1:10531/v1with modelgpt-5.4-mini, an OpenAI-compatible target, and a livellm-rubricchild grader.Command:
LOCAL_OPENAI_PROXY_BASE_URL=http://127.0.0.1:10531/v1 LOCAL_OPENAI_PROXY_API_KEY=local-proxy LOCAL_OPENAI_PROXY_MODEL=gpt-5.4-mini bun apps/cli/src/cli.ts eval run /tmp/agentv-av-mc8q-dogfood/assert-set-live.eval.yaml --targets /tmp/agentv-av-mc8q-dogfood/targets.yaml --target proxy-llm --workers 1 --threshold 0.5Result:
PASS (1/1 scored >= 50%, mean: 100%).Run bundle:
.agentv/results/2026-07-04T07-32-25-895Z.Private evidence:
EntityProcess/agentv-privatebranchevidence/av-mc8q-assert-set-semantics, commit98bb85d.Post-Deploy Monitoring And Validation
No additional operational monitoring is required for this local library/CLI scoring semantics change. CI should remain the merge gate; after merge, watch for core test/build/lint failures and user reports of assert-set score or verdict regressions.
Related
Related:
av-mc8q