Dependable service and AI evaluation
Learn six connected subjects through a bounded order-review case. The browser form sends nothing and stores nothing. Python fixtures evaluate synthetic scores and permission decisions. There is no trained model, live authentication, cloud account or production backend.
Learning sequence
Prerequisites: basic percentages and familiarity with files. Read the Python foundation before running the lab. Suggested effort: three to five study sessions, depending on prior knowledge; this is guidance, not a measured duration.
- Web programming: input, validation and response
- HCI and accessibility: tasks and barriers
- Security: assets and trusted permissions
- Cloud: responsibility, cost and recovery
- AI: task, representation and oversight
- ML evaluation: errors, costs and capacity
1. Try the local form
Enter only an invented order reference. This demonstration creates a text summary locally. Its checks are browser feedback, not trusted server enforcement.
No submission yet. Nothing is stored or sent.
Walk through the controls using a keyboard. Inspect labels, instructions, focus and error recovery. Try a missing reference, zero quantity, 2.5 quantity and angle brackets in the reference. Confirm that the reference appears as text. These patterns and automated checks do not establish complete accessibility conformance; assistive-technology and user testing remain required.
2. Predict permission decisions
| Actor fixture | Action/resource | Expected |
|---|---|---|
| Alice, customer | View O1 owned by Alice | Allow |
| Alice, customer | View O2 owned by Bob | Deny |
| Worker, operator | Approve O1 | Deny |
| Manager, approver | Approve O1 | Allow |
| Unknown actor | View O1 | Deny |
The fixture actor names are not authenticated identities. A real service must establish identity and ownership through trusted mechanisms and enforce permissions at every relevant operation. No network probing is part of this exercise.
3. Separate cloud responsibility from arithmetic
Write a table for infrastructure operation, application validation, access policy, data ownership, cost review and recovery. Assign an accountable party for each task and explain which details depend on the chosen service. With fictional rates of 0.001 units/request, storage 2 and transfer 3, 1,000 requests cost 6 units; 2,000 cost 7 if the other components remain fixed. These are invented numbers, not provider prices or free-tier claims.
Define an RPO and RTO, then describe a synthetic restore test that could inspect data loss and restoration time. Objectives are not guarantees. A download called “backup” does not establish that restored records and application behaviour are usable.
4. Inspect synthetic review scores
Positive labels mean review is needed in this invented fixture. Scores are supplied directly; no algorithm or probability estimate is claimed.
| Case | Label | Score |
|---|---|---|
| A | 1 | 0.9 |
| B | 0 | 0.8 |
| C | 1 | 0.7 |
| D | 0 | 0.6 |
| E | 1 | 0.4 |
| F | 0 | 0.3 |
| G | 0 | 0.2 |
| H | 0 | 0.1 |
At threshold 0.5, flag scores at least 0.5: TP=2, FP=2, FN=1, TN=3. Accuracy=5/8=62.5%; precision=2/4=50%; recall=2/3≈66.7%. With invented costs FP=10 and FN=50, loss=70 units. Always negative also achieves 62.5% accuracy but recall is zero; precision is undefined because nothing is flagged.
At threshold 0.4, TP=3, FP=2, FN=0, TN=3; loss=20 and five cases are flagged. At threshold 0.75, loss=110 and two are flagged. If staff can review only four cases, the lower-loss candidate exceeds capacity. Define prioritisation or additional capacity; do not claim every flag can be acted upon.
This exploration uses one synthetic fixture for candidate comparison. It is not an independent test set and does not identify a best production policy. Threshold selection and model fitting need suitable development evidence before frozen evaluation on untouched evidence.
5. Run local practice
Download the Python fixture and tests together, or use the cumulative package. Only the Python standard library is required.
cd "$HOME/Documents/amit-study/amit-study/public/labs"
python3 service_quality.py
python3 -m unittest -v service_quality_testThirteen tests cover confusion counts, threshold changes, undefined metrics, invalid labels and scores, duplicate identifiers, policy allow/deny decisions and fictional cost arithmetic. Passing these checks does not establish secure deployment or predictive generalisation.
Portfolio and human involvement
- Form contract and state-transition explanation.
- Keyboard walkthrough, barrier log and assistive-technology test plan.
- Permission table and trusted-boundary map.
- Cloud responsibility, cost boundary and recovery plan.
- Confusion table, baseline and feature-time/leakage audit.
- Managerial review-capacity and oversight memo.
Explain who decides, whom an error affects, whose identity and labels are trusted, what the score means, where authority is enforced, when features become available, why the action helps, which alternative is compared and how corrections feed into learning. Coordinate sales, operations, finance, HR and IT; preserve customer understanding and employee wellbeing.
Further reading and connections
- MDN form validation
- W3C WAI forms
- OWASP authorisation
- AWS shared responsibility
- scikit-learn metrics and evaluation pitfalls
Validated order processing · Customer and commercial decisions · Durable request teaching. Each chapter supplies questions and new revision cards; the remaining generic assessments are still queued.