All lessons in AI Engineering: From Foundation Models to Evaluated Applications

Scope an AI Application

A one-page brief, non-AI baseline, risk boundaries, and measurable success criteria.

120 minutes · Free lesson

What you will learn

  • A one-page brief, non-AI baseline, risk boundaries, and measurable success criteria.
  • Produce reproducible implementation and assessment evidence for this practice branch.

A useful application begins with a decision about whose problem you will solve and what evidence will count as success. In this practice, you are the engineer receiving an ambiguous request: use AI to improve support. Your task is to replace that phrase with a bounded contract that a teammate could implement and evaluate.

This is a required practice branch. Complete its listed knowledge prerequisites before assessment. All example organizations, records, thresholds, and numeric results in this lesson are synthetic teaching material unless you replace them with clearly labeled measurements.

Working model

Scope is an executable boundary. A system that explains a policy has different requirements from one that approves a refund. Write the verbs separately: read policy, inspect an owned order, propose a ticket, and issue money. Only the first three belong in this project. A baseline is the simplest credible way to do the task, such as keyword search and a manual checklist. It gives later experiments a comparison; it is not a deliberately weak opponent. Acceptance criteria need a population and denominator. Success on answered questions hides refused or timed-out requests, so count all attempted tasks. Your critical gate is separate from the average: one cross-user disclosure cannot be cancelled out by ten fluent answers.

Build and inspect

Work in courses/ai-engineering/support-assistant. Run uv sync --extra dev once, then implement labs/starters/p01.py. Inspect the function signatures and docstrings before changing the bodies. The instructor implementation is in labs/solutions/p01.py; compare it after making your own attempt.

  1. Read the fictional project brief in labs/fixtures/project-brief.json. Replace its user and task with a precise support situation while preserving synthetic data and bounded actions.

  1. Implement validate_brief in labs/starters/p01.py. Missing fields, incomplete metric definitions, and an action present in both allowed and excluded lists must be reported. The supplied solution demonstrates structural validation, not automatic business judgment.

  1. Create ten example tasks: four standard-policy questions, two missing-information questions, two order lookups, and two requests the application must refuse. Label the expected action before you build the assistant.

  1. Time a manual baseline on the same tasks and record errors as well as duration. Explain what evidence is still missing; ten examples cannot establish a rare-failure rate.

  1. Write a one-page scope memo with user, task, baseline, permitted inputs, excluded actions, success criteria, and a budget assumption. Have another learner try to interpret it without asking you questions.

Run uv run python labs/check.py P01 --implementation starters for the public contract checks. To inspect the supplied reference behavior, use --implementation solutions. Public checks cover selected executable contracts; they do not replace the integration evidence, measurements, or instructor review described below.

Worked example

Worked example

Apply the lab decision rule to a concrete case

  1. A support team invents a twenty-task exercise: twelve policy questions, four owned-order questions, and four requests outside scope.
  2. The manual baseline succeeds on ten policy questions, three owned-order questions, and all four refusals: 10 + 3 + 4 = 17 successful tasks.
  3. Its task success is 17 / 20 = 85%. If you report only policy questions, the rate is 10 / 12, about 83.3%, which answers a different question.
  4. A candidate that succeeds on nineteen tasks but exposes another user’s order fails the separate critical gate. Its 95% average does not establish acceptable behavior.

Check your decisions

Exercise

Your brief permits create_ticket and also excludes create_ticket. What should validation do?

Check your answer

Return a conflicting-actions error. Do not guess whether the author intended to allow the action; make the contract unambiguous first.

Exercise

A learner claims 100% success because all eight answered questions were correct; two timed out. Correct the denominator.

Check your answer

There were ten attempted tasks and eight successes, so task success is 80%. The timeout count should also be reported as two.

Exercise

What cannot the structural brief validator tell you?

Check your answer

It cannot establish market demand, achievable model quality, whether examples represent users, or whether the proposed budget is realistic. Those require observed evidence and stakeholder judgment.

Investigate the workflow with a decision log

Use the baseline-first approach in Google's Rules of Machine Learning to challenge your brief. For each candidate task, record the current action, evidence available, common failure, and person responsible for recovery. This exposes work that an assistant cannot safely complete with its proposed inputs.

During the lab's review time, ask a peer to interpret three ambiguous requests from your fixture set. Have them identify the permitted action without looking at your implementation. Disagreement reveals an unclear contract before model behavior makes the ambiguity harder to see.

Worked example

Rewrite a scope statement into a testable boundary

  1. A synthetic brief says “help customers with returns.” One reviewer expects policy answers; another expects refunds to be issued.
  2. Replace it with a bounded outcome: explain the applicable policy and prepare a review ticket after approval; do not issue refunds.
  3. Add one eligible policy question, one ambiguous purchase-date case, and one demand for immediate payment as fixtures.
  4. Label expected behavior as answer, clarification, and refusal of the payment action respectively. Include acceptable wording variations.
  5. Record who reviews unresolved cases and what information accompanies the handoff. “Escalate” is incomplete unless the recipient can continue the task.

Exercise

Your ten baseline tasks contain only easy policy questions, but the brief includes order lookups and refusals. What should you change before comparing systems?

Check your answer

Add representative cases for every promised capability and boundary, then run both the baseline and candidate on the same task set. Keep the original observations, but label their narrow scope instead of treating them as a complete baseline.

Add the peer's interpretation and your revised fixture labels to the scope memo. The structural validator will not discover these product ambiguities for you.

Assessment and evidence

Submit the brief, labeled tasks, baseline observations, validator, and an error log. A pass requires internally consistent action boundaries, a measurable acceptance rule, explicit exclusions, and a baseline that attempts the same task. Unsupported market-size or model-quality claims are not evidence.

Spend 20 minutes scoping the task, 30 minutes creating cases, 30 minutes measuring the baseline, 25 minutes implementing checks, and 15 minutes reviewing the memo. These activity budgets include coding, experimentation, and evidence preparation; reading this lesson alone does not complete the estimated workload. Record actual time and unresolved issues so the schedule can be improved.

Keep an evidence folder for this lab with the brief, command/output summary, test cases, decisions, and limitations. Include package or commit identifiers and enough synthetic input to reproduce each claimed result. Exclude credentials, personal records, and local database files from shared submissions.

Sources and further reading

Summary

A one-page brief, non-AI baseline, risk boundaries, and measurable success criteria. A passing submission connects the implementation to observable evidence and explains failures and limitations.

Next action

Use the course schedule and prerequisite map to select the next main lesson or practice branch. Carry this lab’s evidence into the capstone; optional extensions do not replace required work.

Choose another lesson