가이드
슬라이스
전체 비율은 그대로인데 스위트의 한 부분이 무너질 수 있습니다. 슬라이스는 선언된 스위트의 한 부분으로, 따로 측정되므로 그런 붕괴가 보이게 됩니다. 슬라이스에는 두 가지 규율이 따릅니다. 스위트의 여러 부분을 들여다보는 것이야말로 평가가 잡음을 찾아내고 그것을 발견이라고 부르게 되는 경로이기 때문입니다.
슬라이스 선언하기
슬라이스는 oloproof.yaml에서 이름을 지정합니다. 흔한 종류는 각 케이스의 metadata에서 키 하나를 읽습니다.
slices: [metadata.lang, metadata.topic]
min_slice_support: 30{"id": "c000", "input": {"lang": "en", "topic": "billing", "hard": false, "n": 0}, "expected": {"label": "yes"}, "metadata": {"lang": "en", "topic": "billing"}}파일이 받아들이는 모든 슬라이스 종류는 다음과 같습니다.
| 슬라이스 | 케이스를 묶는 기준 | 필요한 것 |
|---|---|---|
| metadata.<key> | 케이스의 metadata에 있는 그 키의 값 | 케이스에 있는 해당 키 |
| relevant_position | 첫 번째 관련 구절이 검색된 위치: top_k, beyond_top_k 또는 not_retrieved | RAG 시스템과 expected.relevant |
| context_truncated | 토큰 예산 때문에 컨텍스트에서 구절이 빠졌는지 여부 | token_budget이 있는 RAG 시스템 |
| first_tool | 에이전트가 처음 호출한 도구 | agent_trajectory/v1 기록 |
| repeated_action | 에이전트가 동일한 호출을 반복했는지 여부 | agent_trajectory/v1 기록 |
| route | 제어권을 가졌던 에이전트들, triage>billing 형식으로 표기 | 단계마다 에이전트 이름이 있는 agent_trajectory/v1 기록 |
| trajectory_length:4,8 | 선언한 경계로 나눈 단계 수 | agent_trajectory/v1 기록 |
| confidence:0.5 | 모델이 행에 부여한 점수, 선언한 경계로 나눈 구간 | predictive: 블록 |
파일이 인식하지 못하는 이름은 아무것도 실행되기 전에 거부됩니다.
Configuration error: unknown slice 'lang'; declare metadata.<key>, relevant_position, context_truncated, first_tool, repeated_action, route, trajectory_length:<bounds> or confidence:<bounds>슬라이스는 보고만 하고 게이트하지 않습니다
실행은 슬라이스를 별도의 제목 아래에 출력합니다. 영어는 고치고 프랑스어는 망가뜨린 후보의 경우입니다.
│ metadata.lang=de │ ok │ 100.0% │ [95.4%, 100.0%] │ 80 / 80 observed · 0 missing · 0 excluded · exploratory · support 80 │
│ metadata.lang=en │ ok │ 100.0% │ [95.4%, 100.0%] │ 80 / 80 observed · 0 missing · 0 excluded · exploratory · support 80 │
│ metadata.lang=fr │ ok │ 32.5% │ [22.4%, 43.9%] │ 26 / 80 observed · 0 missing · 0 excluded · exploratory · support 80 │
│ metadata.topic=account │ ok │ 88.3% │ [81.2%, 93.5%] │ 106 / 120 observed · 0 missing · 0 excluded · exploratory · support 120 │
│ metadata.topic=billing │ ok │ 66.7% │ [57.4%, 75.1%] │ 80 / 120 observed · 0 missing · 0 excluded · exploratory · support 120 │표의 제목은 Slices (exploratory; never gated)이며, 말 그대로입니다. 이 실행의 전체 비율은 77.5%였고 게이트는 릴리스를 허용했습니다. 프랑스어는 그 비율의 3분의 1 수준이었는데도 말입니다. 실행에 대한 릴리스 규칙은 전체 지표를 지정하며, 단일 실행의 슬라이스로 범위를 한정한 규칙은 거부됩니다.
Configuration error: release rule 'fr-floor' targets slice/metadata.lang=fr; a run's slice results are exploratory, and only a comparison rule gates a slice, inside a family with a correction이것이 첫 번째 규율입니다. 열 가지로 나눈 스위트에는 우연히 차이를 보일 기회가 열 번 있으며, 슬라이스를 읽는 게이트는 잡음 때문에 릴리스를 차단하게 됩니다. 슬라이스는 어디를 들여다볼지 찾기 위한 것입니다.
눈에 띄는 슬라이스
실행은 또한 슬라이스를 실행 자체의 비율과 비교해 순위를 매기고 차이가 나는 것을 표시합니다. Benjamini-Yekutieli 절차를 사용하므로 슬라이스들이 어떻게 겹치든 잘못된 표시의 비율이 통제됩니다. 터미널의 슬라이스 표는 각 슬라이스를 BY mark 열에 marked, not marked, 또는 검정하기에 너무 얇은 슬라이스의 경우 빈칸으로 보여 주며, 순위의 근거가 된 p값도 함께 보여 줍니다. 이 값들은 실행에도 저장되고, 번들의 run.json으로 내보내집니다.
jq -c '.run.slice_metrics[] | {scope, estimate, fdr_marked, fdr_p_value}' .oloproof/bundles/RUN_ID/run.json{"scope":"slice/metadata.lang=de","estimate":1.0,"fdr_marked":true,"fdr_p_value":0.0001}
{"scope":"slice/metadata.lang=en","estimate":1.0,"fdr_marked":true,"fdr_p_value":0.0001}
{"scope":"slice/metadata.lang=fr","estimate":0.325,"fdr_marked":true,"fdr_p_value":0.0001}
{"scope":"slice/metadata.topic=account","estimate":0.8833333333333333,"fdr_marked":true,"fdr_p_value":0.0037003540039062493}
{"scope":"slice/metadata.topic=billing","estimate":0.6666666666666666,"fdr_marked":true,"fdr_p_value":0.008582189941406249}표시되지 않은 슬라이스는 실행과 일치한다는 것이 보여진 것이 아니라, 단지 표시되지 않았을 뿐입니다. 표시는 주의를 이끌 뿐이며 어떤 게이트에도 도달하지 않습니다.
지지도
min_slice_support는 슬라이스가 구간을 얻기 위해 필요한 최소 케이스 수입니다. 그보다 적으면 추정값은 표시되고 구간은 보류됩니다. 이 값을 4로 설정한 프로젝트의 예입니다.
│ metadata.topic=account │ answer_correct │ 100.0% │ │ 1 / 1 observed · 0 missing · 0 excluded · exploratory · support 1 │
│ │ │ │ │ < 4, no interval │기본값은 30입니다. 이 값을 낮춘 작은 스위트는 얇은 슬라이스에도 구간을 얻으며, 그 구간은 스스로 그 사실을 드러낼 만큼 넓습니다.
비교에서 슬라이스로 게이트하기
슬라이스가 정말로 퇴보해서는 안 되는 경우, 비교 규칙의 범위를 그 슬라이스로 한정할 수 있습니다. 범위는 슬라이스 이름 앞에 slice/를 붙인 것이며, 규칙은 근거를 읽기 전에 필요한 지지도를 명시합니다.
version: 1
rules:
- {id: overall, metric: ok, kind: non_inferiority, margin: 0.05}
- {id: fr-not-worse, metric: ok, kind: non_inferiority, margin: 0.05, scope: slice/metadata.lang=fr, min_support: 30}
- {id: en-not-worse, metric: ok, kind: non_inferiority, margin: 0.05, scope: slice/metadata.lang=en, min_support: 30}
- {id: de-not-worse, metric: ok, kind: non_inferiority, margin: 0.05, scope: slice/metadata.lang=de, min_support: 30}
families:
- {id: languages, correction: holm, rules: [fr-not-worse, en-not-worse, de-not-worse]}접두사 없이 쓰면 범위가 거부됩니다.
Configuration error: rule 'fr-not-worse' has unknown scope 'metadata.lang=fr'; a comparison rule decides on the global scope or on slice/<name>=<value>접두사를 붙이면, 위의 후보를 그 기준선과 비교한 결과는 다음과 같습니다.
oloproof compare CANDIDATE_RUN_ID BASELINE_RUN_ID --policy compare.yamlComparison sha256:cd2693b505e645919d397e8d7a87eaf0a841ab0c11c0b95484912363381b72e0 of run_01M3C46CYA163JSMSA5QZ6KAZA against run_01M3C46B3PSNP1ZTC8X05AG0GE · 240 paired cases
ok: -5.0 points [-15.2, +4.9] · 240 paired · 0 missing · 0 excluded
ok [slice/metadata.lang=de]: +8.8 points [-0.5, +21.5] · 80 paired · 0 missing · 0 excluded · exploratory · support 80
ok [slice/metadata.lang=en]: +18.8 points [+7.0, +34.4] · 80 paired · 0 missing · 0 excluded · exploratory · support 80
ok [slice/metadata.lang=fr]: -42.5 points [-60.3, -26.8] · 80 paired · 0 missing · 0 excluded · exploratory · support 80
ok [slice/metadata.topic=account]: +7.5 points [+0.9, +17.1] · 120 paired · 0 missing · 0 excluded · exploratory · support 120
ok [slice/metadata.topic=billing]: -17.5 points [-35.0, -0.1] · 120 paired · 0 missing · 0 excluded · exploratory · support 120
Decisions
overall ok non-inferiority, margin 5.0 points INSUFFICIENT_EVIDENCE interval_overlaps_margin
no sample size would make this PASS: the difference itself (-5.0 points) is outside the margin, so more cases would move it toward FAIL
fr-not-worse ok non-inferiority, margin 5.0 points FAIL upper_bound_below_margin
en-not-worse ok non-inferiority, margin 5.0 points PASS lower_bound_above_margin
de-not-worse ok non-inferiority, margin 5.0 points PASS lower_bound_above_margin
Family languages: Holm over 3 rules; adjusted levels 0.01667
Gate: BLOCK (exit 1)이것이 두 번째 규율입니다. 슬라이스로 범위를 한정한 규칙은 families: 항목 안에서만 게이트합니다. 이 항목은 거짓 실패를 함께 통제할 규칙들을 나열합니다. holm이 보정 방법입니다. 패밀리 안에서 실패한 규칙은 패밀리에 포함된 규칙 수에 따라 정해지는 더 엄격한 수준에서 다시 검정되므로, 우연히 실패할 기회가 세 번 있다고 해서 위험이 세 배로 늘어나지 않습니다. 신뢰 수준 0.95에 규칙이 세 개라면, 가장 강한 실패는 0.05 / 3에서, 그다음은 0.05 / 2에서, 마지막은 0.05에서 다시 검정됩니다. 실패만 다시 검정합니다. 통과는 기각이 아니므로 보정이 필요 없습니다. 여기서는 규칙 하나가 실패했고 0.01667에서 다시 검정되었으며, 프랑스어는 여전히 실패합니다. 전체 규칙은 결정을 내리지 못했고, 그 아래의 조언은 케이스를 늘려도 FAIL 쪽으로 움직일 뿐이라고 말합니다.
어떤 패밀리에도 속하지 않은 슬라이스 규칙은 거부됩니다.
Configuration error: slice rule 'fr-not-worse' belongs to no family; slice rules multiply the chances of a false FAIL, so they gate only inside a family with a correction다음 단계
분류기와 회귀 모델은 metadata가 아닌 슬라이스를 사용합니다.