مهندسی سامانه‌های هوش مصنوعی · فصل ۱ — Gateway، Structured Output، Prompt Governance و Qualification · 136

Model Qualification: Task/Locale/Risk Benchmark

Build a reproducible qualification benchmark over representative task × locale × risk slices, declare metrics and hard failure gates before testing, compare candidate models/configurations with row-level evidence and uncertainty, and issue a bounded QUALIFIED / NOT_QUALIFIED / CONDITIONAL decision that downstream routing may consume without turning a generic benchmark into product authority. می‌تواند «Model Qualification: Task/Locale/Risk Benchmark» را در یک workflow AI محدود طراحی کند و validation، authority، cost یا failure controls مرتبط را مشخص کند.

Model Qualification: Task/Locale/Risk Benchmark — fa-IR

Lesson summary

Build a reproducible qualification benchmark over representative task × locale × risk slices, declare metrics and hard failure gates before testing, compare candidate models/configurations with row-level evidence and uncertainty, and issue a bounded QUALIFIED / NOT_QUALIFIED / CONDITIONAL decision that downstream routing may consume without turning a generic benchmark into product authority.

می‌تواند «Model Qualification: Task/Locale/Risk Benchmark» را در یک workflow AI محدود طراحی کند و validation، authority، cost یا failure controls مرتبط را مشخص کند.

This lesson produces

می‌تواند «Model Qualification: Task/Locale/Risk Benchmark» را در یک workflow AI محدود طراحی کند و validation، authority، cost یا failure controls مرتبط را مشخص کند.

Who it is for

Foundation

Use a guided contract/evidence matrix and one worked provider/output/context/eval contrast.

Repair

Re-run only the failed contract or evidence dimension with a smaller deterministic synthetic fixture.

Experienced

Start from mixed provider evidence and require explicit capability/validation/governance/qualification trade-offs.

Prerequisites

1. The real problem: one aggregate score can hide a critical failure

A model that looks excellent on a public leaderboard or a few English demos is not automatically qualified for your workflow. Real requirements vary by task, locale, risk tier, schema, refusal behavior, and failure cost. If a global average hides a critical Persian high-risk failure under strong scores elsewhere, the benchmark is producing numerical comfort rather than a defensible decision.

2. Qualification is not a global property of a model name

QUALIFIED must bind to an exact candidate and exact scope: model version, configuration, prompt version, dataset version, and task × locale × risk slice. The same model can be qualified for low-risk English summarization and not qualified for high-risk Persian extraction. A familiar model name does not authorize implicit inheritance across those slices.

3. Declare the evaluation contract before seeing results

Before running candidates, declare slices, metrics, hard gates, soft metrics, failure budgets, and how UNKNOWN is handled. A threshold changed after scores arrive is not an auditable qualification rule. The contract must say which failure closes qualification by itself and which metric is merely comparative or diagnostic.

4. The dataset must represent the product, not benchmark convenience

The evaluation set should cover representative product tasks, locales, and risk tiers. Record coverage explicitly: which slices were tested, how much evidence each slice has, and which slices remain unobserved. Do not fill a missing Persian high-risk slice with English low-risk evidence; retain that state as UNKNOWN or out of scope.

5. Keep row-level evidence beside aggregate results

Aggregates help reveal trends, but root causes and critical failures live at row level. The matrix should retain candidate/version/slice, hard-gate result, metric scores, human rating, judge state, and uncertainty. When an aggregate is green and a declared hard gate is red, the hard gate wins.

6. Separate hard gates from soft metrics on purpose

Schema validity, forbidden unsafe output, a required refusal, or a critical extraction field can be hard gates; fluency or style may be soft metrics. A strong soft average cannot compensate for a hard failure. Conversely, a low soft metric should not silently become NOT_QUALIFIED unless the predeclared contract made it decisive.

7. Do not treat a judge model as ground truth

A model-based judge can scale evaluation, but it remains a measurement instrument. Calibrate it against human ratings or deterministic references on sensitive slices and preserve disagreement. If judge and calibrated human ratings diverge on a locale-sensitive subset, keep the state CONDITIONAL/OPEN rather than choosing whichever score is more convenient.

8. Use human review only where it adds distinct evidence

Not every dimension needs a human rating. JSON schema validity, exact field matches, and forbidden tokens can be checked deterministically. Nuanced usefulness, cultural fit, or ambiguous refusal may need human review. The goal is reproducible evidence plus accountable human judgment where it is genuinely required.

9. Three bounded states: QUALIFIED, NOT_QUALIFIED, CONDITIONAL

QUALIFIED means all in-scope required slices and declared hard gates have sufficient passing evidence. NOT_QUALIFIED means at least one decisive hard gate fails. CONDITIONAL means there is no decisive failure but an evidence gap, judge disagreement, or scope limitation remains. None of these states means the model is globally good, bad, or safe.

10. Worked example: the best average is not necessarily the winner

Suppose Candidate A has a 0.94 mean but violates a schema/safety hard gate on Persian high-risk extraction. Candidate B has a 0.86 mean and passes every hard gate in the declared scope. B may be QUALIFIED for that scope while A is NOT_QUALIFIED; the aggregate cannot override the critical row.

11. Do not close UNKNOWN by silent inference

If a new candidate has English evidence but Persian/high-risk has not been tested, that slice remains UNKNOWN. Similar naming, nearby versions, or strong performance elsewhere is not sufficient inheritance evidence. Preserve the gap and state the requalification trigger.

12. Version binding is part of the evidence

Each row should bind at least model version, configuration version, prompt version, and dataset version. A change in one decisive component may invalidate only certain slices. Requalification does not always require rerunning the whole benchmark, but reuse is allowed only when the evidence binding is genuinely unchanged.

13. The qualification record constrains downstream behavior

The output of this lesson is not a public ranking; it is a versioned qualification matrix that downstream routing can consume. The record must expose scope, status, hard failures, evidence gaps, conditional limits, and requalification triggers so AIE-005 cannot reinterpret a bounded status as global permission.

14. Lab: eight deterministic fixtures

The lab includes an all-pass baseline, aggregate trap, judge-human disagreement, missing high-risk slice, schema hard-gate failure, lower soft mean with intact hard gates, prompt-version mismatch, and a transfer case where model v2 changes refusal behavior. The evaluator returns coverage, hard failures, UNKNOWN state, judge disagreement, aggregate quality, and a bounded decision; hidden expected labels are never placed in learner files.

15. Exit checklist and transfer

Before leaving, verify explicit scope and versions, representative slice coverage, predeclared hard gates, retained row-level evidence, no aggregate override of hard failures, judge calibration, preserved UNKNOWN state, and a bounded auditable status. For transfer, a new version that improves English quality but changes refusal behavior and lacks Persian high-risk evidence reruns only the necessary slices and never inherits prior qualification blindly.

Assessment

There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.

Q1 retrieval

Why can a high aggregate score fail to qualify a model?

lesson ✗AI ✗notes ✗

Q2 application

A model has English low-risk evidence but no Persian high-risk evidence. What is the Persian high-risk status?

lesson ✗AI ✗notes ✗

Q3 diagnosis

A judge model scores a Persian subset highly but calibrated human ratings disagree beyond tolerance. What should happen?

lesson ✗AI ✗notes ✗

Q4 evidence

Which version fields must row-level qualification evidence bind to?

lesson ✗AI ✗notes ✗

Q5 transfer

Model v2 improves English but changes refusal behavior and lacks Persian high-risk evidence. May v1 qualification be copied globally?

lesson ✗AI ✗notes ✗
Assessment rubric

A sufficient submission declares task × locale × risk scope and version bindings before evaluation, distinguishes hard gates from soft metrics, preserves row-level failures and UNKNOWN evidence, treats judge metrics as calibratable instruments rather than ground truth, issues a bounded QUALIFIED / NOT_QUALIFIED / CONDITIONAL state, and rebuilds transfer decisions from changed evidence. It fails if a leaderboard, one aggregate, model name, or stale evidence overrides a critical slice or missing evidence.

References & freshness

Vertex AI — View and interpret evaluation results
·
Current Vertex AI evidence for pointwise/pairwise/computation metrics and instance-level versus aggregate result structure; not proof that one metric or aggregate is sufficient for product qualification.
Vertex AI — Evaluate a judge model
·
Current evidence that judge-model evaluation can be compared against human ratings as ground truth for calibration; not authority to replace human judgment in every risk class.
NIST AI RMF: Generative Artificial Intelligence Profile
·
Current NIST GAI risk-management profile used to bound context-, goal-, and lifecycle-aware evaluation claims. NIST states AI RMF 1.0 is under revision, so this lesson does not freeze future framework wording.
OpenAI API — Create eval
·
Current evaluation object semantics: testing criteria plus data-source configuration reusable across model/parameter runs; not a prescription for sufficient product slices or thresholds.

Case studies

Lesson visuals

AIE004-V1

Lab files

Implement evaluate(case) in starter.py. Return exactly these eight auditable fields: total_required_slices, covered_slice_count, hard_gate_fail_count, unknown_slice_count, judge_disagreement_count, aggregate_quality_mean, final_decision, and reason_class.

Evidence is valid for a required slice only when its evidence_state is OBSERVED and its model/configuration/prompt versions match the candidate being qualified. A valid observed row with hard_gate_pass=false is decisive. Missing or stale evidence remains UNKNOWN. Judge disagreement exists when both human and judge ratings are present and their absolute difference exceeds judge_tolerance.

Decision order: decisive hard-gate failure → NOT_QUALIFIED; otherwise evidence/version gaps → CONDITIONAL; otherwise unresolved judge calibration disagreement → CONDITIONAL; otherwise QUALIFIED. Aggregate quality is descriptive and must never override a hard gate. Round the aggregate mean to four decimal places; if no valid quality scores exist, return None.

Run python run_checks.py for learner-visible structural checks. The expected qualification labels are intentionally not included in learner files.

Lesson media & slides

MAKNOW_AIE-004_DECISION_EVIDENCE_TABLE_v1.0.svg
DECISION EVIDENCE TABLE v1.0.svg
MAKNOW_AIE-004_FAILURE_REPAIR_v1.0.svg
FAILURE REPAIR v1.0.svg
MAKNOW_AIE-004_PRIMARY_MODEL_v1.0.svg
PRIMARY MODEL v1.0.svg
MAKNOW_AIE-004_WORKED_EXAMPLE_v1.0.svg
WORKED EXAMPLE v1.0.svg

Teaching files (download)

XLSXModel Qualification Matrix Task Locale Risk v1 v1.0.0.xlsxTeaching files (download)
DOCXModel Qualification Matrix Task Locale Risk v1 WORKSHEET v1.0.0.docxTeaching files (download)
PDFModel Qualification Matrix Task Locale Risk v1 WORKSHEET v1.0.0.pdfTeaching files (download)