AI320 — Original on-site preparation
Independent written study. All essential explanations and optional model reasoning for this chapter are on this page. References are optional further study. No degree, professional approval or observed competence is conferred.
Harbor: evaluate the complete evidence-and-action procedure
Harbor is a fictional policy-help service. It answers from a versioned corpus, permits an insufficient-evidence or conflict state, and prepares requests for separate approval. Its demonstration sends nothing outside a local synthetic fixture. Produce a reproducible dossier joining task decomposition, literal output validation, calculated retrieval, source interpretation, action recovery and operating cost. Use the original project and durable-action laboratory as distinct implementations with different boundaries: the first has an in-memory dry-run store; the second simulates a persistent provider contract. Do not describe either as proof that an arbitrary external provider permits safe automatic retry.
Retain the preceding three-chunk ranking fixture and its changed authorized corpus. Then assess the six cases below. A is a current general policy; C is its applicable custom-order exception; D is an independently conflicting current policy covering the same case. Z is nonexistent. P is a restricted passage the requester cannot read. Gold evidence sets are stipulated for this exercise, not inferred from a similarity score.
| Case | Required behavior | Observed context and result |
|---|---|---|
| Q1 ordinary order | Answer supported by A | Context A; correct bounded answer citing A |
| Q2 custom order | Answer accounting for A and C | Context A; positive answer citing A but omitting C's exclusion |
| Q3 no applicable source | Insufficient evidence | Empty context; explicit insufficient-evidence result |
| Q4 restricted inquiry | Exclude P before context; deny access | P entered context; final display omitted its citation and refused to answer |
| Q5 current contradiction | Identify conflict using A and D | Context A,D; correct conflict explanation citing both |
| Q6 ordinary order | Answer supported by A | Context A; answer attempted with invented citation Z |
Report retrieval measures for the positive-answer cases Q1,Q2,Q6 separately from the conflict and denied-access cases. Calculate passage recall across their four required passage occurrences, complete-support retrieval across their three questions, supported-answer precision across attempted positive answers, and correct end-to-end behavior across all six cases. The release rule forbids any unauthorized context entry or invented citation in this fixture. Explain whether the rule passes even if the UI refuses Q4.
A separate operating sample has 150 monthly cases. Drafting saves three minutes per case, review adds two, corrections add one, and maintenance adds four hours monthly. Calculate net labor capacity before subscription charges, and distinguish it from cash savings. Next trace an approved operation R for recipient A through the retained durable fixture's crash after the provider effect. State what the recorded provider hash/result can establish, what a missing result cannot establish, and what a changed recipient requires. Finally describe how database connection lifecycle affects reliable local cleanup.
Complete dossier and changed-record reasoning
Task and evidence. Exact totals and authorization decisions belong to explicit deterministic contracts; language generation may propose an explanation but cannot grant itself source or tool access. The positive-answer evidence occurrences are A for Q1, A and C for Q2, and A for Q6. Retrieval supplied three of these four occurrences, so micro passage recall is 3/4=.75. Full evidence is present for Q1 and Q6 but not Q2, so complete-support retrieval is 2/3. A's repeated appearance across questions counts once per required evaluation occurrence, not as a new distinct corpus document. The conflict case Q5 has its own two-passage requirement and is reported separately; combining populations without explaining the weighting would change the metric.
Answering and release. Positive answers were attempted in Q1,Q2,Q6; only Q1 is supported, giving supported-answer precision 1/3. Q6 demonstrates that sufficient retrieved evidence can still produce an invalid answer reference. Q3 and Q5 exhibit correct abstention and conflict behavior. Together with Q1, three of six cases satisfy their complete end-to-end requirement: 3/6=.5. Q4 fails at context admission despite the final refusal. Hiding a citation does not remove the information already exposed to generation. The fixture fails both the unauthorized-context and invented-reference gates. Repair those mechanisms and rerun the original and changed cases before considering release. Six constructed cases and zero failures after repair would remain bounded test evidence, not a population error guarantee.
Cost. Drafting frees 150×3=450 minutes; review consumes 300 and corrections 150. Before maintenance the net is zero, and four maintenance hours make the net a loss of four labor hours monthly. An estimate of monetary value also needs wage or opportunity-cost assumptions, subscription/infrastructure charges and an account of whether capacity can actually be redeployed. Fixed wages do not automatically fall when work takes fewer minutes. Measure quality improvements separately rather than relabeling them as labor savings.
Recovery. The fixture can leave local R in executing while the provider has a committed result. Its reconciliation compares the provider's operation identity and payload hash with the approved record, then records the matching result locally. The observed one-effect assertion concerns that synthetic provider's unique-key contract. A missing lookup returns uncertainty; it does not prove that a real provider never executed, particularly if lookup can lag. Do not manufacture a new operation ID or silently switch recipient to B. A changed consequential payload needs fresh authorization and must not be slipped under R's original approval. Atomic local claiming addresses competing ownership; provider reconciliation addresses the different external-effect/local-record window.
Resource lifecycle. A Python SQLite connection's transaction context manager commits or rolls back; it does not itself guarantee connection closure. An open handle can prevent temporary-file cleanup on Windows even after assertions passed. The following separate teaching example explicitly closes a local connection after its transaction. It is a lifecycle demonstration, not a replacement implementation for the preserved shared laboratory.
from contextlib import closing
import sqlite3
def create_local_note(path):
with closing(sqlite3.connect(path)) as connection:
with connection:
connection.execute(
"CREATE TABLE IF NOT EXISTS notes(id INTEGER PRIMARY KEY, text TEXT)"
)
connection.execute(
"INSERT INTO notes(text) VALUES(?)", ("fictional practice",)
)
# Transaction ended before closing; no connection is returned to the caller.
Changed record. Supply C in Q2 and correct its answer to include the exclusion; replace Q6's citation and claim review with a correct answer tied to A. Positive-case passage recall becomes 4/4 and complete-support retrieval 3/3; supported-answer precision becomes 3/3. Correct end-to-end behavior becomes 5/6 because Q4 still admitted P. The release gate still fails. If a subsequent independently observed rerun also excludes P before context, all six stipulated case requirements pass, but retain the finite-fixture limitation. Separately increase monthly drafting savings to five minutes with review/correction unchanged: 750−300−150=300 minutes, or five hours, before maintenance; subtract four maintenance hours to obtain one hour of potential net capacity. These changed assumptions alter the operating estimate, not the authorization requirements.
Optional twenty-point rubric: score each criterion 0–4: (1) task, source version, access and claim-state boundaries; (2) reproducible retrieval calculation and complete-evidence denominators; (3) all answer/state outcomes, severe failures and changed-case release decision; (4) correct cost arithmetic with capacity/value/cash distinctions; (5) durable action trace, unresolved outcomes, connection lifecycle and reproducibility manifest. Four means correct complete reasoning with explicit assumptions; three a limited omission; two a material gap; one an unsupported conclusion; zero absent or contradictory work. Preserve original capstone criteria as well. Written comparison is optional and does not record learner completion or establish observed competence.
Optional source references
These sources support the explanations; reading them is optional. Original Academy examples are fictional. Historical attributed readings remain preserved.