본문으로 건너뛰기

Quality Lab

Quality Lab은 API collection을 위한 product-facing validation layer입니다. 반복 가능한 case를 search, target selection, plan synthesis, optional execution으로 실행합니다.

실제 Planflow 사용을 허용하기 전에 아래 네 가지 질문에 답해야 합니다.

  1. search가 올바른 target family를 찾는가?
  2. target selection이 정확한 final tool을 선택하는가?
  3. plan synthesis가 required input을 채우거나 요청할 수 있는가?
  4. execution이 downstream API까지 안전하게 도달하는가?

Validation Flow

Quality Lab은 staged gate로 실행합니다. search 또는 plan evidence가 안정적이지 않은데 live execution부터 시작하지 않습니다.

StageInputOutputStop If
BuildOpenAPI/MCP/Python sourcecollection artifact, readiness reportschema coverage가 너무 낮음
Searchquery caseTop-K row와 evidenceexpected target이 없음
SelectTop-K + optional LLM targettarget_selector blockcritical case에서 selector가 ambiguous
Planselected target + entityPlan, slot, diagnosticrequired field 미충족
Executeplan + adapter authrunner event와 assertionauth 또는 mutation safety 실패
Learnscrubbed resultsuggestion과 shadow rankpayload scrubbing 실패

이렇게 나누면 모든 실패가 "agent failed" 하나로 뭉치지 않고 stage별로 분류됩니다.

Case Modes

ModePurposeTypical Gate
searchretrieval과 Top-K behavior 확인expected target이 Top-K 안에 있음
plantarget selection과 plan synthesis 확인selected target과 plan tools가 기대값과 일치
execute안전할 때 adapter를 통해 plan 실행HTTP result와 assertion 통과

Search와 plan case는 자주 실행해야 합니다. Execute case는 auth readiness와 mutation safety가 이해된 상태에서만 실행합니다.

Case Schema

{
"id": "member-search-001",
"mode": "search",
"query": "회원 배송지 상세 정보를 찾아줘",
"expected_target": "getMemberDeliveryDetail",
"expected_top_k": 8,
"assertions": [
{"type": "top_k_contains", "tool": "getMemberDeliveryDetail", "k": 8}
]
}

field는 additive하게 유지합니다. 기존 search-only case는 plan 또는 execute field가 추가되어도 계속 동작해야 합니다.

Result Shape

유용한 Quality Lab result는 stage를 별도 object로 보존해야 합니다.

SectionPurpose
searchTop-K results, hit position, score breakdown
target_selectorLLM target, selected target, override flag, reason codes
planplan id, steps, user input slots, synthesis diagnostics
executerunner events, HTTP status, latency, assertions
auth_readinessstructured auth preflight state
learningsuggestions created or shadow-applied
failurestable failure reason and failed stage

예시:

{
"case_id": "member-plan-001",
"mode": "plan",
"status": "passed",
"latency_ms": {
"search": 42,
"target_selection": 3,
"plan": 914
},
"search": {
"hit": true,
"hit_rank": 1,
"top_k": 8
},
"target_selector": {
"llm_target": "getMemberDeliveryList",
"selected_target": "getMemberDeliveryDetail",
"overrode_llm": true,
"reason_codes": ["llm_target_overridden", "selected_by_strong_evidence"]
},
"plan": {
"status": "synthesized",
"tools": ["getMemberDeliveryDetail"],
"user_input_slots": []
}
}

Execute Safety

Mutating execute case는 아래 조건을 요구해야 합니다.

  • explicit mutation allowance
  • dev host allowlist
  • cleanup steps
  • assertions
  • structured failure recording

조건을 만족하지 못하는 case는 search 또는 plan mode로 유지합니다. Read-only execution도 adapter operation이므로 downstream API 호출 전에 auth readiness를 거쳐야 합니다.

Auth Readiness

Execute mode는 preflight failure와 실제 API failure를 분리해야 합니다.

ReasonMeaning
auth_context_requiredusable runtime user/session context 없음
auth_profile_missingcollection에 auth가 필요하지만 auth profile 없음
auth_header_resolution_failedadapter가 execution header를 만들지 못함
auth_faileddownstream API가 401 또는 403 반환

Quality Lab result에는 raw token, cookie, user id, generated auth header value를 저장하지 않습니다. header name과 structured reason code만 저장합니다.

작은 suite부터 시작하고 signal이 안정되면 확장합니다.

SuitePurposeSuggested Cadence
search_core_30실제 OpenAPI summary 기반 search casesearch/semantic 변경마다
business_manual_20operator가 작성한 대표 business queryrelease candidate마다
plan_e2e_10target selection과 plan synthesis caseplan/selector 변경마다
execute_read_5auth readiness가 있는 read-only execution casedev deployment smoke
execute_mutation_3cleanup이 있는 dev-only mutation casemanual 또는 gated CI only

Acceptance Metrics

metric은 collection별로 달라질 수 있지만, healthy large API collection은 아래를 추적해야 합니다.

Metric보여주는 것
search hit@Kretrieval이 correct tool을 후보군에 유지하는지
search Top-1첫 candidate가 보통 correct인지
target selector accuracydeterministic guardrail이 실패를 숨기지 않고 도움이 되는지
plan hit rateselected target이 executable plan이 되는지
execute read success rateadapter/auth/request execution이 동작하는지
structured failure ratefailure가 500이 아니라 분류되는지
latency by stageruntime이 어디에서 쓰이는지

public quality claim에는 dataset, applicable model, run configuration, stored result artifact가 포함되어야 합니다.

Promotion Policy

Quality Lab result를 search tuning과 trace learning promotion gate로 사용합니다.

Change TypeRequired Evidence
alias 또는 semantic metadatasearch suite가 개선되거나 유지됨
selector override policyplan case에서 correct final target 확인
contract extraction changereadiness와 contract coverage 개선
learning suggestion promotionshadow result 개선 + scrub check 통과
execute enablementauth readiness와 read-only assertion 통과

manual query 하나가 좋아졌다는 이유로 promote하지 않습니다. 실패 evidence와 fixed evidence를 나란히 보존합니다.

Troubleshooting

SymptomLikely CauseWhat To Inspect
Search는 통과하지만 plan 실패required field가 충족되지 않음plan.user_input_slots, IO contracts
Plan은 통과하지만 execute 실패auth 또는 request adapter 문제auth_readiness, runner events
LLM target과 selected target이 다름strong selector evidence override 또는 ambiguitytarget_selector.reason_codes
Execute가 401/403 반환runtime auth가 API까지 갔지만 거절됨auth profile과 downstream API policy
shadow에서만 개선됨learning suggestion이 promoted되지 않음promotion policy와 Quality Lab approval
Execute는 성공했지만 assertion 실패API는 도달했지만 wrong shape 반환response schema와 assertion path

관련 문서