Review the prerequisites
Suitable for: Junior through senior AI application/Agent engineers; choose evidence requirements by responsibility.
- Evidence and conditional reasoning about project capabilities
- Proficiency testing checks whether the candidate can explain his or her decision-making within specific constraints and maintain the principles after changes in conditions. Source code, nouns, and pretty numbers are not the only evidence, and the lack of public materials does not mean a lack of ability.
How does the mechanism work?
Step-by-step explanation
- How can a candidate be fairly verified if he or she does not have publicly available source code?
Assess capability fairly under confidentiality constraints and limited evidence.
- What are the three most critical denominator issues for a 95% success rate?
The main question asks for actual metrics; examine the denominator to establish what those numbers mean.
- If you were to do it over again, which component would you delete first?
Understanding includes knowing when a component is unnecessary, rather than merely adding technology.
Foundation · Understand the concepts
Understand the principle · Evidence and conditional reasoning about project capabilities
Objectives of this level: Match project statements to evidence, distinguishing guided execution, independent changes and live integration.
Visual guide · Match a claim to its evidence
Guided runs, authored changes and production responsibility need different evidence. Six deterministic checks and an HTTP429 do not prove live-model success. Select the figure to open it at full size.
Classify five statements from fixed inputs
The local after-sales project has completed seven guided stages with a deterministic generator, six mechanical v2 checks, an unmodified hygiene assignment passing 3/9, and one live HTTP429 failure. Classify:
- “I ran the supplied route.” Commands and ledgers support guided practice, not authorship of the entire runtime.
- “I independently implemented hygiene policy.” The current 3/9 does not support this. Require a personal diff, 9/9 and negative controls, preserving the six original cases.
- “Model accuracy is 100%.” Six deterministic mechanical checks do not establish live model or semantic quality.
- “I completed a refund.” This project creates local return applications; receipts do not prove refunds or production customer scale.
- “429 proved the live tool loop.” It proves a request and classified failure, with no model response, tool continuation or final answer.
Prerequisites and fair evidence
This route targets junior through senior AI application and Agent candidates with backend foundations; choose the gate by responsibility. Independently handle Python JSON, parameterized SQL and HTTP errors/timeouts, and explain transactions, uniqueness and a concurrency race. Fill gaps first: this library does not teach Python, algorithms or the entire backend interview from zero. Add inference-serving or training-data engineering preparation when the target role requires it.
Candidates unable to publish work code can use a personal lab, redacted architecture and controlled fresh tasks. Do not disclose employer credentials, customer data or private code. Describe personal contributions and the simulated environment honestly.
Four fixed prerequisite diagnostics
Python 3.9+ and its standard library. These fixed public exercises diagnose prerequisites for the existing Agent route. They are not a complete Python/backend course, an unseen interview, or an official hiring threshold. Use an empty scratch directory and only run learner modules you trust; the grader imports local Python, not a sandbox for hostile code. No credentials, network or model requests are needed.
Download prerequisite_lab.py from https://ai.lwkjob.com/lab/interview-practice/prerequisite_lab.py. Save it with the filename unchanged. Read the contracts below, create a scaffold, implement the four functions, and keep the failing baseline, your diff, and your actual after report. The scaffold deliberately has no completed implementations. Existing output files are not proof of your execution; the report records the imported module SHA256.
python3 prerequisite_lab.py scaffold --out prerequisite_student.py
python3 prerequisite_lab.py grade --module prerequisite_student.py --out prerequisite-before.json
The initial grade exits 1; this is the expected incomplete starting point. Execute grading as its own command so a shell's stop-on-error setting does not prevent you from saving the baseline. After implementing your own functions:
python3 prerequisite_lab.py grade --module prerequisite_student.py --out prerequisite-after.json
Exit 0 requires all four skills to pass, not a majority of individual cases. A partial report gives the case and observed error to revisit. Python, module hash, source and case counts remain visible. Passing these public cases means this diagnostic contract passed; code review and a reviewer-chosen new condition remain separate.
1. JSON integer boundary
Implement parse_quantity(value) -> int. Accept only exact built-in int values from 1 through 100 inclusive. Return the unchanged integer. Boolean, string, float, None and list inputs raise TypeError; exact ints outside the range raise ValueError. Do not coerce inputs. The supplied cases include 1, 100, 7, True, False, "1", 1.0, None, [], 0, -1 and 101. In Python, Boolean values participate in the integer hierarchy; explicitly decide the JSON boundary rather than letting that fact grant a valid quantity.
If stuck, revisit the type validation and counterexamples in https://ai.lwkjob.com/learn/tool-contracts/?level=implementation. Explain the distinction in your own words and rerun your actual module.
2. Parameterized SQL and tenant isolation
Implement find_visible(conn, tenant, ids) -> list[str]. conn is an open in-memory SQLite connection. Inputs tenant and each ID are strings; ids is a list which may be empty. The grader supplies this schema: resources(id TEXT PRIMARY KEY, tenant TEXT NOT NULL, body TEXT NOT NULL). Return distinct IDs present in both the requested list and the exact tenant, sorted lexicographically. Return [] when no row matches. Never modify rows, expose body, close the caller's connection or broaden tenant scope. Bind values as query parameters; SQL syntax and bound values have different jobs.
The first fixture is (r1,t1,mine), (r2,t2,private), (r3,t1,other). t1 with [r2,r1] returns [r1]; t1 with [r3,r1,r1] returns [r1,r3]; t2 with [r3,r2] returns [r2]. Empty IDs return []. The literal tenant "t1' OR 1=1 --" and literal ID "x') OR 1=1 --" return [], without broadening the query. A second fixture changes all IDs and tenants: (z9,org-a,one), (a4,org-a,two), (b8,org-b,private); org-a requesting all three returns [a4,z9]. The grader checks database rows after each call, too.
If stuck, revisit https://ai.lwkjob.com/learn/memory-scopes/?level=implementation. Tenant is a trusted fixture argument here; this exercise does not implement production authentication.
3. HTTP observation and unknown writes
Implement next_action(observation) -> dict with exactly action and operation_key. The prevalidated fixture has kind=read/write, status=ok/timeout/rate_limited/invalid_arguments/forbidden, operation_key=None for reads or a nonempty string for writes, receipt=None or a trusted fixture business receipt, and positive integer attempts/max_attempts. attempts is calls already attempted; retries are permitted only while attempts < max_attempts. This is an authored conservative recovery policy, not a universal provider retry rule.
For a write receipt, require receipt.operation_key to match observation.operation_key; a mismatch raises ValueError. A matching receipt returns complete with the same operation key. Permanent invalid_arguments or forbidden returns stop, retaining the original write key (None for reads). Without a receipt, any nonpermanent write observation, including ok, returns reconcile_original with the original key. Hitting the retry limit does not make an unknown write uncommitted; retain the key for reconciliation/manual review. Read ok returns complete; a read timeout/rate_limited returns retry_read below the limit and stop at the limit. Never mutate the input, create a new operation key or issue any request from this function.
Examples: read timeout attempts=1/max_attempts=3 -> {action:retry_read, operation_key:null}; the same at 3/3 -> stop. write timeout with op-a -> reconcile_original/op-a. write ok without receipt -> reconcile_original/original key. write ok with matching trusted receipt -> complete/original key. stop means stop issuing a new call; it does not erase a prior effect or prove a remote rollback. No live HTTP service is used in this diagnostic.
If stuck, revisit https://ai.lwkjob.com/learn/agent-fault-injection/?level=implementation and the distinction between local status and an independently confirmed business receipt.
4. Durable unique claim under concurrent calls
Implement claim_once(db_path, operation_key) -> bool. The grader creates a disk SQLite database with claims(operation_key TEXT PRIMARY KEY, created_tag TEXT NOT NULL DEFAULT 'claimed'). Each invocation must open and close its own connection. Atomically insert exactly one row for a new key, commit it, return True only for that successful first claim, and return False for a previously claimed key. Preserve all older rows and their created_tag. Use a bounded SQLite lock timeout; the fixture permits 5 seconds. Inputs are valid nonempty strings, including an apostrophe in one key. Do not recreate/clear the table, rely on a process-local set, or report success without a durable row.
The grader launches six independent worker processes with the same key, checks exactly one True plus one persistent row, repeats with a different key while retaining the first, then opens another process for a replay which must return False. It reports facts from both function results and the database. This verifies a local durable claim only: it does not run an external business action or establish distributed exactly-once execution.
If stuck, revisit https://ai.lwkjob.com/learn/run-state-outbox/?level=implementation and its local transaction boundaries. Explain what the unique claim proves and which external commit still needs a separate contract.
Returning to the main route
Keep prerequisite-before.json, your source commit/diff, prerequisite-after.json and one short explanation per failed skill. Fix and rerun the indicated skill; then run all four together so one correction does not break another. If the fundamentals remain unclear, study Python types/exceptions, parameter binding, transactions and concurrency before the Agent capstone. Record the diagnostic as pending or mechanically_passed, separately from the main project's engineering, real API and mock-interview states. A reviewer selects a different input or requirement for live assessment and states tool permissions beforehand.
Choose your junior/intermediate/senior gate in the design track before collecting evidence. Learning tracks are not job ranks. Record production responsibility separately from local engineering, live integration and mock performance. Career paths / 岗位路径
code example
Changed constraint: the role asks for a live demonstration
The original case uses a local deterministic merchant lab. What changes when the target job requires live model integration?
Provide personally authorized multi-turn traces with matching call_id results, source-reviewed claims and failures, naming actual model/versions and unknown usage. Local business effects still require authoritative receipts. With no evidence, keep integration pending; mechanical green cannot substitute.
Acceptance task for this level
Classify the five evidence claims, implement the four prerequisite functions, keep the failed scaffold baseline and your source diff plus actual four-skill report, then list three requirements of your target job. A public diagnostic pass remains separate from live transfer.
Reading this browser’s record…
Hide the answer and check your understanding
How should a résumé describe six green cases?
Expand reference derivation
Describe a local deterministic Agent lab and six fixed task/boundary checks. Attribute only personal changes supported by before/after evidence. Do not advertise 100% model accuracy or production refunds.
Further explanations and practice
When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.
All linked explanations and exercises (1 )
Sources and verification scope
The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.
- Anthropic: Task final state, trial and evaluation evidence
- Anthropic: The trade-off between fixed workflow and autonomous agent
- NIST: Confidence intervals for proportion estimates
- Interview exit assessment
- Baidu graduate-role reference
- OpenAI official interview guide
- Prerequisite grader and empty learner scaffold
- Four prerequisite input and result contracts
- Independent practice and evidence protocol
- Six local learner practice harnesses
- Junior, intermediate and senior project paths
- Applied AI Engineer, Enterprise
- Applied AI Engineer — Sydney
- SFIA 9 levels of responsibility
- Extended practice index
- Extended source package
- Integrated project guide
- Role-specific delivery examples
- Independent integration assignment
- Author-designed assessment examples
- Project integration source ZIP
- Multiprocess resource and recovery lab
- Independent settlement assignment
- Migration, incident and ownership decisions
- Observed learner pilot and rubric calibration
- Source ZIP
- Review model trace evidence
- Blank provider observation worksheet
- Source ZIP
- Graduation evidence and scoring guide
- Cumulative assessment worksheet v2
- Offline worksheet consistency checker
- Enterprise ticket transfer: complete independent contracts
- Enterprise ticket transfer source package