Capstone evaluation and operations
Evaluate exact outcomes before judging language
A capstone evidence bundle records inputs, expected outputs, observed outputs, versioned configurations, evaluation code and limitations. Evaluate the same cases against both architectures; a correct answer requires an exact canonical value and the expected citation. A correct abstention returns no value and no citations. Track access violations separately, even when the answer seems useful. For this toy task a strict exact checker is defensible; free-text answers require a reviewed evidence rubric and human agreement. Report English and Persian slices individually, including unknown and forbidden records. The examples use fictional labels and values. A small fixed dataset provides regression evidence, not estimates of production quality. Keep a frozen unseen evaluation set for actual model tests; tune only on development cases. NIST recommends selecting measures from the identified risks [3,4].
Compute slice-level evidence
The report function expects observations created by an external checker, not claims by the model. Each row contains locale, expected status, whether the complete expected response matches, and whether access was violated. A violation makes an otherwise exact answer fail. Counts rather than percentages alone keep the denominator visible; for empty slices no row is invented. Compute exact success as correct/n, abstention success as abstain_correct/abstain_n when denominators are positive. A value of zero is not missing. The example shows a wrong Persian answer and a correct abstention; the English slice is 2/2 and Persian is 1/2. Report these as fixture counts, not population fairness estimates. Review false refusals and unsupported answers separately and record actual case IDs. Include negative access tests as independent checks rather than treating overall accuracy as a security metric.
def report(rows): # Each row: (locale, expected status, exact match, access violation). result = {} for locale, status, match, violation in rows: if locale not in ("en", "fa") or status not in ("answer", "abstain"): raise ValueError("invalid evaluation label") if type(match) is not bool or type(violation) is not bool: raise ValueError("boolean observations required") bucket = result.setdefault(locale, {"n":0, "correct":0, "violations":0, "abstain_n":0, "abstain_correct":0}) bucket["n"] += 1 bucket["correct"] += match and not violation bucket["violations"] += violation if status == "abstain": bucket["abstain_n"] += 1 bucket["abstain_correct"] += match and not violation return result
rows = [("en", "answer", True, False), ("en", "abstain", True, False), ("fa", "answer", False, False), ("fa", "abstain", True, False)]print(report(rows))Gate cost and quality independently
The proposed test threshold requires three cases and one abstention per locale, all exact outcomes, zero observed access violations and a cost within an explicit cap. These intentionally strict toy thresholds do not imply safety or generalize to production. All monetary values in the example are integer microdollars (one millionth of a dollar). A hypothetical cost of 400 fits a 500 cap; because live verification is false the output is offline_only. A cost of 600 stops the pilot; a missing Persian slice requires revision. For a real model estimate cost = input tokens × input rate + output tokens × output rate + retrieval, serving, retry and review costs, using compatible units. Record actual billed usage separately from forecasts. Stop security failures before quality or budget; a review-eligible decision still requires human authorization and a real deployment assessment. Never automatically deploy based on a mock pass.
def release_decision(metrics, cost, cap, reviewed, live_verified): # Integer microdollars, count thresholds from this fictional project only. if any(type(v) is not int or v < 0 for v in (cost, cap)): raise ValueError("invalid cost") if any(b["violations"] for b in metrics.values()): return "stop_security" if cost > cap: return "stop_budget" for locale in ("en", "fa"): b = metrics.get(locale) if (not b or b["n"] < 3 or b["abstain_n"] < 1 or b["correct"] != b["n"] or b["abstain_correct"] != b["abstain_n"]): return "revise_quality" if not reviewed or not live_verified: return "offline_only" return "eligible_for_review" # never deploy automatically
b = {"n":3,"correct":3,"violations":0,"abstain_n":1,"abstain_correct":1}print(release_decision({"en":b,"fa":b}, 400, 500, True, False))print(release_decision({"en":b,"fa":b}, 600, 500, True, True))print(release_decision({"en":b}, 400, 500, True, True))Operations and rollback
Propose an SLO for the authorized FAQ service and monitor latency, timeout, abstention, failed access attempts, stale index hits and cost per successful task. Use synthetic monitoring without raw personal prompts in logs. Operators should freeze the provider adapter if unauthorized access is suspected, preserve minimal approved audit evidence, and activate the model-free authorized browse path. Restore a previously approved application/index pair only after reapplying current tombstones and access policy; do not resurrect deleted records. Inventory primary records, derived chunks, vector indexes, caches and backups; expire test logs according to the local retention policy and verify deletion across authorized retrieval. Review risks with an accountable product owner and security owner. NIST guidance encourages contingency and decommissioning planning [5]. Actual deletion, distributed invalidation, deployment and incident drills require a controlled environment.
Deliver the professional evidence bundle
Submit the architecture comparison, dataset permission and revision, runnable offline fixture, test results, failure analysis, cost worksheet, risk register and runbook. Demonstrate that both modes share a policy boundary; explain why the simpler architecture is preferable for this case. Include the limitations: tiny public teaching fixture, no genuine semantic search, no live model, no real MCP session, no external authorization or concurrency, and no measured cloud latency. An optional future evaluation must be separately authorized, with approved credentials, fresh frozen EN/FA cases, independently reviewed judgments, cost and timeout ceilings, and stop conditions. Present a draft release decision even when offline checks pass. Hand off specialized training to ML and full provider orchestration to LLM Engineering. A professional capstone demonstrates independent judgment, not an invented production launch.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Capstone evaluation and operations quiz
Assess capstone architecture, policy boundaries, evidence and release judgment.
What counts as a successful exact answer here?
Why report language slices separately?
A security violation occurs but cost is within budget. What takes precedence?
What does offline_only mean?
What must rollback preserve?