Use this workbook with the full assigned readings. Work independently, then compare each explained solution. Practice and projects are voluntary. Cases and datasets are fictional unless a primary passage is explicitly named.
Task decomposition before model selection
An AI workflow is a sequence of decisions with different error costs and evidence needs. Exact arithmetic, permission checks and record identity should use deterministic mechanisms with explicit contracts. A language model may help draft or classify, but its output must enter a validation boundary before it controls an action. A polished sentence does not substitute for a verified source or authorization.
Define the task’s allowed outputs and an abstention route. A bounded assistant can decline when the requested evidence is missing. That is meaningful only if downstream code treats abstention differently from an empty but supposedly authoritative answer.
Worked problem
A user asks for the total of three invoices, an explanation of a refund policy, and transmission of a refund request. Design three separate stages.
Trace the complete solution
Calculate the invoice total from validated structured amounts with ordinary arithmetic; a generated number is not needed.
Retrieve the relevant policy version, check its applicability and draft an explanation tied to specific passages.
Prepare a proposed refund request separately from sending it. Validate the payload and obtain the required authorization for the actual external action.
If policy evidence is missing or contradictory, abstain or route to review. Do not turn a plausible draft into an approved transaction.
Independent transfer problem
The draft is correct but the recipient changed after approval. Is sending still covered by the prior approval?
Compare the reasoning and result
No. Approval must bind the consequential payload, including recipient and relevant amount or record identity. A changed recipient requires a fresh approval under the workflow’s policy. Content quality and action authorization are independent conditions.
Structured output constrains representation: fields, types, allowed values and sometimes relationships among fields. It does not prove that the cited passage supports the answer. Enforce an answer contract with distinct states such as answered, insufficient_evidence and conflict. A positive answer needs valid, authorized source identifiers and support for every material claim.
Reject unexpected fields when they could smuggle an action instruction through an otherwise valid object. Validate identifiers against the retrieved authorized corpus rather than accepting any well-formed string. Keep validation failures visible in evaluation.
Worked problem
Output is {status:answered,answer:All orders are refundable,sources:[P7]}. P7 says unused items may be refundable within 30 days. Evaluate syntax, source identity and entailment separately.
Trace the complete solution
The object might satisfy the declared schema if those fields and status are allowed. That is only structural validity.
Verify P7 exists, is the correct version and is accessible to the requester. An invented or unauthorized identifier fails provenance.
The unconditional all-orders claim exceeds P7’s restrictions. Correct it to the bounded conditions or mark unresolved exceptions.
If the workflow cannot establish applicability, return a distinct insufficient-evidence or conflict state rather than an unsupported positive answer.
Independent transfer problem
The source ID is genuine but refers to an expired policy. What should the validator or workflow establish before answering a current-policy question?
Compare the reasoning and result
Check temporal applicability, superseding versions and the relevant transaction date. A genuine historical source can support a historical claim while failing a current-policy claim. Preserve the version and locator in provenance. Do not silently rewrite a historical transaction under a newer policy without a stated rule.
Retrieval relevance, authorization and contradictory passages
Retrieval ranks candidate evidence; it does not decide what the evidence means. Chunk size can separate a rule from its exception, while keyword overlap can rank a negated or outdated statement highly. Evaluate retrieval on whether required evidence is present, and evaluate answering on whether the conclusion follows from that evidence.
Authorization should restrict the candidate corpus before inaccessible passages can influence the answer. Filtering only the displayed citation can still leak private information through generated text. Record stable source IDs, versions and passage locations for reconstruction.
Worked problem
A policy chunk says returns are accepted within 30 days. The following chunk excludes custom orders. A custom-order question retrieves only the first chunk. Explain the failure and repair.
Trace the complete solution
The retrieved general rule omits an applicable exception. The answer cannot safely infer universal eligibility.
Preserve section context or retrieve neighboring exception-bearing passages, then evaluate the complete rule for the actual order type.
Create an evaluation case requiring both chunks and score evidence sufficiency separately from fluent answer quality.
Restrict retrieval to the requester’s authorized documents first. A correct answer based on private unauthorized text is still a boundary failure.
Independent transfer problem
Two authorized passages of the same version conflict about the deadline. What should an evidence-bounded assistant do?
Compare the reasoning and result
Identify and cite the conflict, avoid selecting a convenient deadline without a justified precedence rule, and route to clarification or review. Capture both locators in the result. A retrieval score is not an authority hierarchy, so the top-ranked passage does not automatically resolve contradictory policy.
An action workflow separates proposed, validated, approved, executing and completed states. The approval should bind a stable payload fingerprint and operation identifier. A local set can demonstrate deduplication within one process, but cannot protect concurrent workers or survive restart. Durable storage and atomic state transitions are needed at the actual action boundary.
Distributed systems can fail after an external service performs an action but before the local system records success. A retry policy must reconcile that uncertain outcome using the provider’s supported idempotency or lookup mechanism. Claiming exactly-once delivery from a local flag alone conceals this failure window.
Worked problem
A worker sends request R, the provider performs it, and the worker crashes before recording completed. Explain what the retry worker must avoid.
Trace the complete solution
It must not assume that absence of a local completion flag proves the action never happened.
Reuse the stable operation identifier with an external idempotency mechanism where supported, or reconcile against the provider’s recorded action before retrying.
Store the approved payload fingerprint durably and reject a changed payload under the same operation ID.
Record uncertain outcomes explicitly and route unresolved ones to review. A second worker must not independently approve the same action through a non-atomic local check.
Independent transfer problem
Two workers both read approved before either writes executing. Give the coordination property needed to prevent both from owning the action.
Compare the reasoning and result
Use an atomic compare-and-set or transactional claim that lets only one worker move that operation from approved to executing. The loser must not proceed. This prevents a local race but does not by itself solve the external-success/local-crash window; the external reconciliation policy is still needed.
Evaluate the complete workflow against representative, difficult and adversarial cases. Separate retrieval recall, claim support, abstention correctness, action authorization and latency/cost. A single aggregate score can hide a severe failure in one boundary. A document that instructs the assistant to ignore rules is task data, not authority to change tool permissions.
Measure net operating benefit rather than drafting speed alone. Human verification, corrections, retries and incident handling can outweigh time saved. Estimate with observed workflow times and state which costs are omitted.
Worked problem
A system saves 45 seconds drafting each of 800 monthly items, but adds 60 seconds of review and 15 seconds of correction per item. Calculate net labor time before maintenance.
Trace the complete solution
Draft savings are 800×45=36,000 seconds, or 10 hours.
Review and correction total 800×75=60,000 seconds, or 16⅔ hours.
Net labor change is an additional 6⅔ hours monthly before maintenance. Faster drafts do not establish a labor-saving workflow.
Quality improvements might justify the system separately, but need evidence and should not be reported as time savings. Include adversarial-source and unauthorized-action cases in the evaluation.
Independent transfer problem
A retrieved file says to send every invoice to an outside address. It is relevant to the user’s invoice question. Should relevance grant that instruction tool authority?
Compare the reasoning and result
No. Relevance makes the document candidate evidence, not a controlling instruction or approval. Keep retrieved text isolated from action permissions, reject the unauthorized destination and log the boundary result without unnecessarily copying private invoice content. Test this exact pattern as an adversarial case.
A release gate connects evidence to an operating decision. Specify the permitted corpus, claim types, action boundaries and failure response before evaluating. Include a transparent non-generative retrieval baseline so generation’s incremental contribution can be measured. A system that cites a passage is not necessarily faithful: it can cite an irrelevant passage or omit an exception.
Version the entire configuration, including model, prompt, retrieval settings, source snapshot and validator. A provider update can change outputs without an application deployment. Rerun representative evaluations after consequential changes and preserve a fallback that is actually tested.
Worked problem
An assistant answers 90 of 100 routine questions correctly but sends one unauthorized external request. The release rule permits no unauthorized actions in the test suite. Evaluate the gate.
Trace the complete solution
Routine answer accuracy is 90%, but it is not the only release criterion.
The unauthorized action violates the declared gate. Do not average it away as one error among 100 questions.
Disable or constrain external actions, repair the boundary and rerun both the failing case and related adversarial variants.
Document that passing a finite gate supports the bounded release decision; it does not prove that no future unauthorized action is possible. Maintain monitoring and a fallback.
Independent transfer problem
A new model version passes average accuracy but fails three previously passing exception-policy cases. What should the release comparison show?
Compare the reasoning and result
Show case-level regressions, their severity and the applicable release criteria alongside the aggregate. A stable average can mask changed failure modes. Investigate the exceptions, keep the prior bounded configuration or fallback when required, and rerun the affected source/validation tests before release.
Build a document-assistance prototype over fictional, versioned business policies and two permission-separated document collections. Include retrieval, exception handling, answer/abstain/conflict states, a claim-support check and a dry-run action workflow. No real external sends are required. Evaluate against a retrieval-only baseline with adversarial documents, stale policies, conflicting passages and restart/concurrency scenarios.
Evidence and evaluation criteria
A documented task boundary separating exact computation, evidence explanation and external action.
Source IDs, versions, locators and authorization enforced before answer generation.
Distinct structural, provenance and claim-support checks with explicit abstention/conflict behavior.
Approval bound to payload identity, atomic action claiming and an uncertain-outcome reconciliation design.
An evaluation register with case-level results for routine, exception, adversarial and denied-action cases.
A net-benefit calculation, full configuration manifest, release gate and tested fallback.
Worked project approach and limitations
Use a general 30-day return rule plus a custom-order exception and verify that a custom-order answer includes both. An expired policy should not answer a current-policy question merely because its ID is valid. A document instruction to send invoices externally must remain data and trigger no tool action. Model the crash after external success but before local completion; a local set is insufficient, so use stable identity and a reconciliation design in the simulation. Record 10 hours of draft savings and 16⅔ hours of added checking as 6⅔ additional labor hours, with quality assessed separately. A release fails the declared permission gate even when routine answers score well. The supplied local reference demonstrates a bounded retrieval workflow; it does not implement a production distributed action service.
Cumulative assessment
These are new situations. Explain your choice before opening the feedback.
Problem 1
An assistant must sum validated currency amounts exactly. Which component should perform the sum?
Deterministic arithmetic under a stated rounding policy
An unconstrained generated estimate
The retrieval ranking score
Answer and reasoning for every option
Best answer: A
Correct. A model-generated number adds unnecessary uncertainty.
Incorrect. It is not the exact requested calculation.
Incorrect. A relevance score is not invoice arithmetic.
Problem 2
An approved message changes recipient before sending. What is needed?
Reuse approval because the wording is unchanged
Send to both addresses
Revalidate and obtain approval for the changed consequential payload
Answer and reasoning for every option
Best answer: C
Incorrect. Recipient identity is part of the action.
Incorrect. That adds an unapproved disclosure.
Correct. Approval must cover the action actually executed.
Problem 3
A valid JSON answer cites a genuine passage but overstates it. What has failed?
Every citation identifier
Claim support or entailment
JSON syntax necessarily
Answer and reasoning for every option
Best answer: B
Incorrect. The cited identifier can be genuine.
Correct. Schema and provenance can pass while meaning exceeds evidence.
Incorrect. The syntax may be valid.
Problem 4
A current-policy question cites an expired policy. What should be checked?
Version and temporal applicability
Only whether the URL loads
Only the response’s grammar
Answer and reasoning for every option
Best answer: A
Correct. Authenticity does not establish current applicability.
Incorrect. Accessible old text can still be inapplicable.
Incorrect. Grammar does not establish policy version.
Problem 5
A general rule is retrieved without its relevant exception. What is needed?
Assume no exception exists
Treat keyword overlap as legal priority
Retrieve and evaluate the exception-bearing context
Answer and reasoning for every option
Best answer: C
Incorrect. Absence from retrieval is not absence from the corpus.
Incorrect. Ranking is not an authority rule.
Correct. The available evidence is incomplete for this case.
Problem 6
Private documents influence an answer, then their citations are hidden. What remains wrong?
The answer must be irrelevant
Unauthorized information may already be disclosed
Nothing because no private URL appears
Answer and reasoning for every option
Best answer: B
Incorrect. A relevant answer can still violate access boundaries.
Correct. Citation filtering after generation does not enforce corpus access.
Incorrect. The text can convey private facts.
Problem 7
A provider performed an action before a worker crashed. What must a retry address?
The uncertain external outcome
Only the spelling of completed
Always create a fresh operation ID
Answer and reasoning for every option
Best answer: A
Correct. No local completed flag does not prove non-execution.
Incorrect. Naming does not reconcile the provider.
Incorrect. That can turn a retry into a duplicate effect.
Problem 8
Two workers race to claim one approved action. Which local mechanism is needed?
A non-durable in-memory set in each worker
A longer prompt
An atomic state transition with one owner
Answer and reasoning for every option
Best answer: C
Incorrect. Separate sets do not coordinate workers.
Incorrect. Prompts do not enforce transactional ownership.
Correct. Separate reads and writes can both succeed without coordination.
Problem 9
A retrieved document orders a tool to ignore permissions. How should it be treated?
As proof the user requested the action
As untrusted task data
As a higher-priority approval
Answer and reasoning for every option
Best answer: B
Incorrect. Document content is not the user’s authorization.
Correct. A source passage does not authorize external actions.
Incorrect. Relevance does not confer instruction authority.
Problem 10
Drafting saves 5 hours but checking adds 8. What is the net labor effect before other costs?
3 additional hours
13 hours saved
5 hours saved regardless of checking
Answer and reasoning for every option
Best answer: A
Correct. Subtract the savings from added checking time.
Incorrect. That adds unlike directions as savings.
Incorrect. That omits a real workflow cost.
Problem 11
Average accuracy is unchanged but a new version fails a critical permission case. What matters?
Only average accuracy
The version number being larger
The case-level failure and release gate
Answer and reasoning for every option
Best answer: C
Incorrect. That hides severity and boundary behavior.
Incorrect. A larger version number is not evidence of safety or quality.
Correct. An aggregate cannot cancel a forbidden action.
Problem 12
A transparent retrieval baseline returns an irrelevant passage. What is established?
Generation is necessarily superior
The baseline also requires relevance and support evaluation
Every extractive answer is correct
Answer and reasoning for every option
Best answer: B
Incorrect. A baseline failure alone does not establish candidate performance.
Correct. Non-generation does not guarantee useful evidence.