Lawfare Group → Knowledge Institute → Lawfare Academy
← Digital Business and AI Applications
Unit 2
AI outputs and verification
Learning objectives
- Explain ai outputs and verification in your own words.
- Apply the principle to the worked business case.
- Evaluate the answer and identify an assumption that could change it.
AI outputs and verification
Generative systems produce plausible outputs and can be wrong. Use approved sources, test representative cases, and require verification for consequential claims. Fluency is not evidence of accuracy.
Worked example
A generated contract summary omits a material exclusion.
Current on-site learning
Required teaching and complete optional models are supplied on LawfareGroup.com. Publisher and primary links are optional provenance or further reading. Florida is the contemporary state-law default; federal rules and explicitly comparative material are distinguished. Independent subject review and observed human learner testing remain pending.
Work through the reasoning
Define the business workflow, data, users, system boundary, and failure consequences. For this unit, connect the explanation of ai outputs and verification to the worked example before answering the practice question.
Check the limits
Test a representative case and identify controls, exceptions, recovery, and the accountable human owner. If the source model and the practical example use different assumptions, state the difference rather than applying the formula or rule mechanically.
Apply it independently
What is required before relying on it? Write an answer before opening the model response. Show the calculation or explain the causal or logical steps. Change one material assumption and say whether your conclusion changes. This practice is optional; you can read every part of the course without submitting work.
Advanced investigation: Selective prediction, base rates and the cost of being confidently wrong
Accuracy compresses a confusion matrix into one number and can conceal the most consequential mistakes. Define the positive state, the unit of evaluation and the real outcome used as a reference. For a triage system, a false negative misses a case needing escalation; a false positive escalates a case that did not need it. Their operational costs need not be equal. A dataset with very few positive cases can make an always-negative classifier appear highly accurate while failing the intended purpose.
Sensitivity is true positives divided by all actual positives. Precision is true positives divided by all predicted positives. The denominators condition on different events. Base rates matter: a system can retain sensitivity and specificity while the practical reliability of a positive alert changes as prevalence changes. A confidence score also needs calibration evidence; fluent language or a numerical score is not proof that a stated probability matches observed frequencies.
Selective prediction permits abstention. Evaluate coverage, the fraction of eligible cases answered automatically, together with error among answered cases and the cost of the review queue. High precision on a small easy subset does not describe performance on all tasks. An abstention is not free if review consumes time or delays service. An always-abstaining system should not receive a perfect usefulness grade simply because it makes no automated assertions.
A reference answer can itself be uncertain. Use an explicit rubric, source-bounded adjudication and a way to retain disagreement rather than forcing every case into an overconfident label. For a factual answer, verify source identity, authorization, date and actual support for each material claim. A real citation can still be irrelevant, stale or contradicted by another authoritative record. Evaluate the claim-source relation, not only whether the link resolves.
Choose thresholds on development data and preserve an untouched evaluation set matched to deployment. If threshold selection follows inspection of test errors, the test is no longer an independent final check. Repeated tuning against one fixed benchmark can also overfit its peculiarities. Keep a versioned decision record so a favorable result cannot silently migrate to a changed model, prompt or source collection.
Worked investigation
In a fictional 1,000-case evaluation, 100 truly need escalation. A policy produces 80 true positives, 90 false positives, 20 false negatives and 810 true negatives. Sensitivity is 80%; precision is 80/170 = 47.06%; accuracy is 89%. If a false negative costs 50 units and a false positive costs 2, error cost is 20×50+90×2 = 1,180. A second policy produces 90 true positives, 180 false positives, 10 false negatives and 720 true negatives. Its accuracy falls to 81%, but error cost falls to 860. The preferred policy depends on a defended loss model and capacity to process the additional alerts.
Independent transfer
Raise false-positive cost to 10 while retaining false-negative cost 50. Compare the two policies. Then explain why the comparison may still fail if human escalation capacity is only 200 cases per period.
Transfer reasoning
The first costs 20×50+90×10 = 1,900; the second 10×50+180×10 = 2,300, so the ranking reverses. The policies generate 170 and 270 alerts. A 200-case review limit makes the second policy operationally infeasible without a queuing or prioritization plan; nominal classification cost omits delay and overflow.
Original Academy investigation: verify claims, not confidence
A fluent output can be useful without being correct. Evaluation must be tied to the task's required facts, constraints, and consequences. For extraction, compare named fields against a specified reference. For summarization, check whether material claims are supported and whether important qualifications were omitted. For a numerical answer, independently reproduce the calculation. A model's statement that it is confident is not an independent verification method.
Separate generation, retrieval, and verification. Retrieval can supply relevant documents, but a retrieved document may be stale, irrelevant, or internally wrong. A citation can point to a real source that does not support the asserted claim. Verification therefore checks the relationship between the claim and the cited evidence, including the relevant date and scope. A list of plausible links does not by itself establish grounded reasoning.
Worked investigation: measure two kinds of classification error
Suppose a fictional invoice triage system flags 12 records. Eight are genuinely problematic and four are false alarms. Of eight unflagged records, two are problematic and six are clear. True positives are 8, false positives 4, false negatives 2, and true negatives 6. Precision is 8/(8+4), approximately 66.67%. Recall is 8/(8+2) = 80%. Accuracy is (8+6)/20 = 70%. These metrics answer different questions: how often flags are correct, how many problems are found, and how often the overall classification matches the reference.
Suppose a missed problem costs $100 and a false alarm costs $10 in investigation time. The modeled classification error cost is 2($100) + 4($10) = $240. A second system may have lower accuracy but lower cost if it misses fewer expensive problems. Choose a threshold using the decision's loss structure and evaluate on a held-out population. Costs are scenario assumptions here; a real deployment needs estimates and sensitivity analysis.
Reference labels also need scrutiny. A reviewer disagreement can signal ambiguity in the task or inconsistency in the rubric. Define what counts as an error before judging model performance, record uncertain cases, and assess reviewer agreement where material. Do not count a dispute over an unspecified rule as a confidently measured failure or success. A robust evaluation distinguishes objective checks, rubric judgments, and unresolved interpretations.
Progressive practice and reasoning
- Reconstruct the four confusion-matrix counts and calculate precision, recall, and accuracy independently.
- Compare a system with TP=9, FP=8, FN=1, TN=2. Its accuracy is 55%, but its stipulated error cost is $180, lower than $240.
- Explain why the more sensitive system can burden reviewers even while reducing the modeled missed-error cost. Review capacity and delay may require additional costs in the decision model.
- Build a five-item factual-answer rubric with claim, evidence locator, date, support verdict, and materiality. A correct response distinguishes an actual supporting source from a merely relevant-looking citation.
Open the complete investigations and runnable laboratory
Complete current conceptual preparation
Put the AI workflow on an infrastructure whose limits you can explain
Preserve the verification problem while adding its missing infrastructure preparation
The existing unit's two independent classification investigations, claim/source rubric, selective prediction and review-capacity limits remain intact. Infrastructure does not make a generated claim true. This studio supplies the hybrid/multicloud and infrastructure-as-a-service preparation formerly assigned outside the site. Its new **Cypress Source Service** cost and failure examples are fictional and independent of the original 1000-case and 20-record classifiers. Prices are stipulated teaching assumptions, not current vendor quotations.
Cloud computing supplies configurable computing resources through a service arrangement. On-demand provisioning, network access, pooled resources, capacity adjustment and measured use can change the way a business obtains infrastructure. They do not promise unlimited capacity, unlimited budgets or instantaneous scaling. Quotas, regional shortages, request limits, startup time, dependencies and staff capacity still matter. A demand forecast and tested capacity plan remain necessary even when a service has a scale button.
Separate the **service model** from the **deployment arrangement**. IaaS provides underlying compute, storage and network capabilities while the customer normally manages substantial operating-system, application, identity and data work. PaaS manages more runtime and development infrastructure, leaving the customer responsible for application behavior, data, configuration and permitted use under the actual contract. SaaS supplies a more complete application. These boundaries vary by product; the label alone does not establish a precise shared-responsibility contract.
A public cloud offers provider-operated services to multiple customers with defined isolation controls. A private cloud serves an organization under its own controlled arrangement. A hybrid design connects distinct environments under a particular integration and management plan. Multicloud uses more than one cloud provider. An application may be both hybrid and multicloud. Merely buying two subscriptions does not establish integrated failover, while keeping a database in an office does not automatically make its security or recovery better.
Draw the actual flow of documents and decisions
Cypress keeps authoritative documents in a controlled private repository, sends only permitted excerpts to a public inference service, and stores an application audit record separately. The useful architectural question is not whether the diagram contains a cloud symbol. Identify the identity authority, source-permission check, retrieval query, excerpt transformation, model request, generated claim, review and final action. Add caches, logs, backups and support access; a hidden logging path can defeat an otherwise careful data-flow account.
Keep control plane and data plane distinct. A control-plane operation changes configuration, resources or permissions; a data-plane operation reads a document or processes a request. They need different privileges and monitoring. An account permitted to retrieve an approved excerpt should not thereby be able to make the entire repository public. Define trusted service identities, resource scope, revocation and recovery before connecting the systems. A user-supplied client label or generated instruction is not a credential at either boundary.
A cloud mashup combines services through interfaces, such as document storage, OCR, search, language inference and messaging. Composition adds failure paths as well as capabilities. A valid response from OCR can contain a wrong number; search can return a stale document; a language service can omit a qualification; a messaging API can accept an operation without delivering it. Carry source and operation identities through the chain and specify what each response establishes. A pipeline of individually successful HTTP calls is not proof of a supported final answer.
For an interface contract record request/response schema, version, authentication, permitted scope, units, size limits, timeout, retry and cancellation behavior. A retried read can increase cost and expose a changed source version; a retried write can duplicate an effect without a stable operation identity. Validate data and authority at the appropriate trusted boundary rather than asking the language component to repair whatever it receives. Reconcile uncertain outcomes separately from definite rejection.
Choose storage according to access and recovery needs
Object storage associates an object with a key, content and metadata; it commonly suits original documents, images and versioned artifacts. A hierarchical-looking key does not necessarily provide a traditional filesystem's rename or transaction semantics. Block storage exposes storage units to a compute instance, often for an operating system or database; formatting, filesystem and database durability have their own rules. File services expose shared file-oriented access. An application can legitimately use all three, but their access, locking, consistency and backup contracts are different.
Distinguish authoritative content, derived embeddings, generated summaries, temporary work and audit evidence. An embedding index can be rebuilt from source only if the original data, transform version and permission metadata survive. A generated summary is not a replacement for the supporting document when the decision requires its qualification and date. Retaining every prompt and excerpt indefinitely is not a free observability strategy; define purpose, access, retention and recovery under the actual setting.
Storage replication and backup address different problems. A replicated accidental deletion can propagate; a backup may preserve an older state but require restoration and reconciliation. A snapshot is not necessarily a consistent application-level backup across several volumes or services. Define which records constitute a usable recovery point, how identities/configuration/keys return, and who accepts restored service. The existing course's governance and permission examples remain the governing business questions.
Compute, networking and container services
A virtual machine offers an operating-system environment over virtualized hardware. Its image, patching, service identity, storage and network exposure need management. A container packages an application and dependencies while normally sharing a host kernel; it is not inherently an independent security guarantee or a complete operational service. An orchestrator schedules containers, handles desired state and can restart work, but restart and rescheduling do not prove a task is safe to repeat. Persistent data must survive an instance's replacement under an explicit design.
An image is a reproducible input only when versions, dependencies and provenance are controlled. A mutable latest tag can produce a different application on a later restart. Keep deployment configuration and secrets separate, limit runtime permissions and plan updates/rollback. A serverless function shifts more operations to a provider but still has execution duration, concurrency, cold-start, event retry and dependency boundaries. A function that times out after committing a result needs the same uncertain-outcome reasoning as any other service.
Networks connect these components under intended paths. A virtual network, subnet, route, firewall rule and load balancer serve different purposes. Routing determines where traffic can go; filtering limits permitted traffic; a load balancer distributes accepted requests and evaluates configured health signals. A green process-health endpoint does not establish that a source-permission dependency or final business task works. A CDN can accelerate permitted public or properly scoped content, but shared caching of a client-specific answer needs a correct identity/version contract. DNS, certificates, time synchronization and identity services are operational dependencies too.
Managed database services reduce some administrative work but do not define the business schema, permissions or authorized data use for the customer. Choose relational, document, key-value, graph or analytical services by required facts and operations; detailed original on-site preparation is included in the next studio. Distinguish an operational transaction store from a historical reporting store and a derived search index. A vector similarity score is not evidence of document permission, current applicability or claim support.
Worked operational-cost file
Cypress stipulates two virtual machines used for 720 hours each at .06 per machine-hour: 86.40. It also stipulates 500 GB of objects at .02 = 10; 100 GB of block storage at .08 = 8; two million requests at .40 per million = .80; 120 GB outward transfer at .09 = 10.80; 250 GB of backup at .015 = 3.75; and 50 GB of log ingestion at .50 = 25. These components total 144.75 for the stated month. Eight administration hours at an opportunity value of 40 add 320, giving 464.75 of combined modeled resource and administration cost. Keep the 144.75 cash-style infrastructure ledger separate from the conditional labor valuation.
An independent stipulated PaaS alternative costs 200 for the base platform, .003 for each of 20000 requests = 60, plus 10 storage, 10.80 outward transfer and three administration hours worth 120. Its combined modeled cost is 400.80. The resulting 63.95 difference does not establish equivalent quality, security or service scope. Verify response behavior, workload, recovery, limits, staffing and exit before selecting on cost. Tax, contracts and actual vendor billing are outside this fictional file.
Changed fact: each virtual machine is required for only 80 hours and can really be stopped without losing required service or state. Compute becomes 2 × 80 × .06 = 9.60. With all other components unchanged, the first model falls by 76.80 to 387.95, becoming 12.85 cheaper than the PaaS model on this stipulated scale. Keeping storage allocated can still incur storage cost after compute stops. A billing comparison must follow actual resource lifetime, not a claim that every cloud cost vanishes when the user closes a browser.
Failure and exit as architectural questions
Two serial indispensable dependencies with modeled availability .999 and .995 have joint availability .999 × .995 = .994005 if their failures are independent and the definitions/time windows match. That is about 99.4005%, below either individual availability. This arithmetic is a teaching model, not an actual SLA calculation; shared identity, networking or administration can make failures dependent. Putting copies with two providers does not create independent failover if both still require the same unavailable credential service or stale data feed.
Test an exit with a bounded synthetic fixture: export documents, metadata, identifiers, permissions, history and relationships; reconstruct the promised service elsewhere; verify what is missing. A portable container does not make a proprietary database interface or model behavior portable. Include transfer cost, contractual access, deletion/retention decisions and recovery authority. For a real deployment those decisions require current applicable terms and law; Florida is the default for state-law examples, with federal and explicit comparative requirements distinguished.
Complete optional models and unit rubric
Guided model: a service boundary is not a correctness certificate
Cypress's private repository, public inference and separate audit path form a hybrid service design; using two public providers would add a multicloud dimension. Apply verified scope before excerpts enter model context. Object storage, a vector index and a generated summary have distinct authority and reconstruction roles. Changed fact: an OCR service returns a syntactically valid but wrong amount. A successful request did not verify the amount; compare with authoritative evidence and route unresolved discrepancies to the review process. Infrastructure availability and factual accuracy remain separate claims.
Independent model: reconstruct costs and the changed usage
The first infrastructure ledger is 86.40 + 10 + 8 + .80 + 10.80 + 3.75 + 25 = 144.75. Eight administration hours add 320, for 464.75 combined modeled cost. PaaS gives 200 + 60 + 10 + 10.80 + 120 = 400.80, lower by 63.95. At 80 hours per virtual machine, compute falls to 9.60, reducing the first model to 387.95, lower than PaaS by 12.85. Changed fact: stopping the machines also prevents timely review during required hours. The cheap candidate then fails the operating requirement; do not preserve its price advantage by silently changing service scope.
Transfer model and 20-point rubric
Award 0–4 points each for service/deployment/responsibility boundaries; data and identity flow; compute/storage/network/container interpretation; comparable cost and failure calculations; and a justified changed-fact/exit decision. Zero is absent, one names features without usable evidence, two omits a consequential condition, three is reproducible with stated limits, and four tests a material alternative and revises the decision. The independent serial-availability model gives .994005, but shared dependencies can invalidate independence. Changed fact: a second provider's source snapshot cannot include recent revocations. A failover that discloses revoked material is not an accepted recovery. Restore the permission and source-consistency promise or restrict the affected service. This is optional written study, not a production cloud or cybersecurity assessment.
Optional source summaries
OpenStax hybrid/multicloud was consulted for deployment/integration scope; IaaS capabilities for compute, storage, containers and supporting services. The Cypress design, costs, failures and complete models above are original Academy teaching. Those links are optional provenance; no external service or vendor account is needed.
Apply the idea
A generated contract summary omits a material exclusion.
What is required before relying on it? Explain your reasoning, then identify one changed fact that could alter the conclusion.
Advanced worked record — a separate fictional scenario: In a fictional 1,000-case evaluation, 100 truly need escalation. A policy produces 80 true positives, 90 false positives, 20 false negatives and 810 true negatives. Sensitivity is 80%; precision is 80/170 = 47.06%; accuracy is 89%. If a false negative costs 50 units and a false positive costs 2, error cost is 20×50+90×2 = 1,180. A second policy produces 90 true positives, 180 false positives, 10 false negatives and 720 true negatives. Its accuracy falls to 81%, but error cost falls to 860. The preferred policy depends on a defended loss model and capacity to process the additional alerts.
Independent transfer: Raise false-positive cost to 10 while retaining false-negative cost 50. Compare the two policies. Then explain why the comparison may still fail if human escalation capacity is only 200 cases per period.
Expanded transfer: System B has lower accuracy but fewer missed expensive problems. How should selection proceed? Explain the decision using the stated information and distinguish the measured result from the assumption. Then complete the four progressive tasks in the Learn stage.
Read the worked reasoning
Check the original contract and relevant details. The underlying source remains authoritative. In an independent response, state the given facts, identify the governing relationship, work through the calculation or comparison, and distinguish the conclusion from assumptions that still need evidence.
Advanced transfer reasoning: The first costs 20×50+90×10 = 1,900; the second 10×50+180×10 = 2,300, so the ranking reverses. The policies generate 170 and 270 alerts. A 200-case review limit makes the second policy operationally infeasible without a queuing or prioritization plan; nominal classification cost omits delay and overflow.
Expanded transfer reasoning: The decision requires an explicit loss model and operating constraints, not one universal metric.
Progressive case reasoning: 1. Reconstruct the four confusion-matrix counts and calculate precision, recall, and accuracy independently. 2. Compare a system with TP=9, FP=8, FN=1, TN=2. Its accuracy is 55%, but its stipulated error cost is $180, lower than $240. 3. Explain why the more sensitive system can burden reviewers even while reducing the modeled missed-error cost. Review capacity and delay may require additional costs in the decision model. 4. Build a five-item factual-answer rubric with claim, evidence locator, date, support verdict, and materiality. A correct response distinguishes an actual supporting source from a merely relevant-looking citation.
Check understanding
The system has TP=8,FP=4,FN=2,TN=6. What is precision?
- 8/10, or 80%
Feedback
Incorrect. This is recall, the fraction of actual problems found.
- 14/20, or 70%
Feedback
Incorrect. This is overall accuracy.
- 8/12, about 66.67%
Feedback
Correct. Precision asks how many flagged cases are truly problematic.
Further reading
Required teaching and complete optional models are supplied on LawfareGroup.com. Publisher and primary links are optional provenance or further reading. Florida is the contemporary state-law default; federal rules and explicitly comparative material are distinguished. Independent subject review and observed human learner testing remain pending.
- Complete on-site teaching — Put the AI workflow on an infrastructure whose limits you can explain
- Academy — Digital Business and AI original investigations and runnable lab
- NIST — Generative AI Profile
- Introduction to Computer Science — 13.1 Hybrid Multicloud Solutions and Cloud Mashups
- Introduction to Computer Science — 13.2 Big Cloud IaaS Mainstream Capabilities
- Academy — quantitative investigations and independent transfer
- Academy — executable quantitative laboratory and failure tests