RFC: repetition/attempt tracking in ResultSet (raised by AgentVerity via issue #20) #22
Replies: 2 comments 1 reply
|
Yes, On fixtures: happy to contribute the valid multi-attempt case plus the same-attempt collision rejection once field names settle in the PR. |
|
Agreed on all three refinements — I'll keep I'll ping you once the field names are settled in the PR so you can add the valid multi-attempt fixture and the same-attempt-collision rejection case — that'll be a good test of whether the schema actually holds up under AgentVerity's stability computation. |
Uh oh!
There was an error while loading. Please reload this page.
Opening this to formalize a design question raised by @mrwersa in #20, following the same process Discussions #8–#11 went through (proposal here, comment period, then a PR implementing whatever the discussion converges on).
The gap
ResultSet.results[]today is documented as "one result per test case" but that's actually only a documentation convention, not an enforced constraint — I checked both enforcement points directly:spec/schemas/resultset.json'sresultsarray has nouniqueItems/key constraint ontest_case_id.sdk/python/openeval/validate.py'svalidate_result_set()has no duplicate-id check — contrast withvalidate_suite(), which explicitly tracksids=set()and raisesDUPLICATE_IDfor repeatedtest_case.id. That check exists on the suite side and has no counterpart on the result side.So nothing today actually stops a producer from emitting several
Results with the sametest_case_id— it's just unaddressed: no field distinguishes why there are several, no join key relates them, andsummarycomputation has no defined behavior when it happens. @mrwersa's #20 describes exactly the consequence: LangSmith'snum_repetitions, Promptfoo's per-test repeats, and Inspect AI'sepochsall produce this shape upstream, and it currently either collapses to one result or fragments intokResultSets that only relate by convention — losing the ordered-pairing structure that stability/flip-rate analysis over repeated trials needs (AgentVerity's use case), and losing whether repeats ran in fresh or shared sessions (which changes what the data can support statistically).The three directions from #20
attemptfield onResult(+ optionalisolationfield), pairing by(test_case_id, run_id, attempt).ResultSets sharingsuite_id, plus a recommended join convention.profile:stabilityconvention describing how producers should emit repeat data, likely metadata-based.Where I lean, and why
Toward (1). Reasoning:
Result.completed_at) rather than restructuring the document — old consumers that don't know about the field keep working unchanged, new consumers that do get exact tie-breaking. Anattemptfield is the same move: optional, additive,additionalProperties: falseonResultalready means adding it is the only schema-level change required on theResultSetside.ResultSets sharing asuite_idis already legal today and already doesn't give you ordered same-case pairing across files — you'd needrun_idplus an inferred ordering plus consistentstarted_attimestamps to reconstruct pairs after the fact, and nothing enforces producers do that consistently. It formalizes the status quo rather than fixing what Repetitions and trial isolation in ResultSet (needed for baseline qualification) #20 is describing as actually broken today.profile:convention is a fine home for aggregation/statistics methodology (e.g. how AgentVerity's flip-rate computation itself should be described so two tools agree on what "stable" means), but the underlying data model still needs some join key to exist first. I'd rather see (1) land as the data-model fix, and treat a stability-profile convention as a separate, later RFC that builds on top of it if there's appetite — bundling both into one change is a good way to stall on the harder, more opinionated half indefinitely.Concretely, if (1) is where this converges, the shape I'd propose:
Plus a
validate_result_set()change: when twoResults share atest_case_id, require them to have distinctattemptvalues (default-absent treated asattempt: 1) — turning today's silent, unspecified duplicate-test_case_idgap into an actual, checked constraint instead of leaving it as an accidental permissiveness nobody relies on correctly.Ask
@mrwersa — does that match what AgentVerity's importer actually needs, or does flip-rate/stability computation need something
attempt+isolationalone doesn't give you (e.g. an explicit pairing across non-adjacent attempts, or a required minimum attempt count)? You mentioned being glad to contribute conformance fixtures if this lands — a fixture pair (multi-attemptResultSetvalid + one with a same-test_case_id/same-attemptcollision that should be rejected) would be exactly the kind of casespec/conformance/is built for, and I'd rather build the fixtures against real requirements than guess at them.Leaving this open for comment before any spec/schema/SDK PR, per the same process #8 went through. Cross-referencing #20 so both threads point at each other.
All reactions