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

AI Engineering Roles and Problem Selection

Define a bounded user problem, a non-AI baseline, success criteria, and a budget.

60 minutes · Free lesson

What you will learn

  • Define a bounded application task, its users, inputs, permitted actions, and exclusions.
  • Compare an AI proposal with a non-AI baseline using explicit assumptions and a resource budget.
  • Write completion criteria that distinguish a working demonstration from evidence of useful performance.

A small equipment shop receives repeated questions about deliveries and returns. Someone proposes an assistant that can handle all customer service. That description sounds attractive, but it does not tell you what to build, what data you need, or how to know whether the result works. Your first engineering task is to turn that ambition into a task small enough to test.

Throughout this course, you develop an operations and support assistant using fictional documents and orders. You start with a narrow question-answering application and later add retrieval, tools, approval, persistence, and operational checks. This main lesson teaches how to choose the problem. The separate P01 practice asks you to write your project brief and produce the first working demonstration.

You need basic Python, Git, and HTTP knowledge. You do not need to train a foundation model before beginning. All volumes, costs, and performance figures in this lesson are invented planning assumptions. They demonstrate calculations and decisions; they are not claims about a real company or a current model provider.

Start with the user decision

Describe the situation in which someone would use the application. Who is asking, what information do they already have, and what decision should the response help them make? A task description such as explain whether an unopened item meets the published return conditions is more testable than provide excellent customer service.

For the fictional shop, a first task could accept a customer's question and an approved policy document, then return an answer with a reference to the relevant paragraph. When the policy does not cover the question, the application should say so and offer a support contact. It should not create refunds, invent delivery dates, or read unrelated customer records.

The exclusions belong in the brief. A customer who asks whether a damaged item qualifies for an exception may need a person. If the supplied policy contains no exception process, escalation is a successful bounded outcome. A fluent invented exception is a failure. Stating this before building prevents you from rewarding confident guesses during demonstrations.

Now distinguish the user's decision from your system's output. Producing a paragraph is an output. Helping the customer identify the next valid step is the task. You may need a question instead of a paragraph when the delivery date is missing. You may need a direct link to a policy section instead of generated prose when the answer already exists clearly on a page.

A useful problem statement names the audience and situation, the evidence available, the expected behavior, and the benefit being tested. For example: customers with standard-item return questions can receive a cited explanation from the approved policy, with clarification when required facts are missing. The initial benefit hypothesis is reduced time spent locating the correct policy paragraph.

Keep that benefit as a hypothesis. You have not measured it yet. A stakeholder interview can establish that people find the current workflow frustrating, but it does not establish that your application will improve it. Write down the observation you would need: perhaps completion time on the same tasks, or the fraction of customers who identify the correct next step.

Place AI inside an ordinary software system

An AI application still needs interfaces, identity, storage, error handling, and monitoring. The model is one component. It may interpret an unstructured question or draft an explanation, while ordinary code checks permissions and executes database operations. This division is useful because not every part of the task benefits from probabilistic generation.

LayerResponsibilityEvidence that it works
User interfaceCollect a question and display a usable resultA user can submit, recover from an error, and inspect citations
Application workflowDecide which permitted steps runA trace shows bounded execution and clear stopping
Evidence and dataSupply relevant authorized factsRetrieval and access-control tests pass
Model adapterRequest and validate generated textValid responses, controlled failures, and measured latency
Action serviceApply an authorized state changeApproval and duplicate-action tests pass
EvaluationCompare outcomes with the task contractPer-case results support the reported decision

AI engineering emphasizes choosing, adapting, evaluating, and operating model-based components within such a system. Machine-learning engineering can also involve these activities and may include training task-specific models. Full-stack engineering supplies much of the interface and application foundation. These are overlapping responsibilities, not rigid job boundaries that every employer uses identically.

The distinction helps you identify what you must learn. You can use a hosted model without implementing its training pipeline, but you still own whether your application sends the correct context and handles failure. You can use a retrieval library without inventing a search algorithm, but you still own whether customer A receives customer B's information.

Separate model capability from application authority. A model may be able to produce a plausible refund request. That does not make it authorized to refund an order. In this course, ordinary server code derives the user's identity, restricts available operations, and checks approval before creating a ticket. Model output is evidence to validate, not permission to bypass those checks.

Read the local reference application as an example of those boundaries, not as a completed solution to every practice. Its default mode is a deterministic teaching workflow. It can demonstrate persistence and approval without a paid model call. An optional live adapter adds text generation, but enabling that adapter does not automatically improve task success or complete the later labs.

Compare with a credible baseline

Before asking which model to use, ask what a simple alternative can accomplish. A policy page with a search box, a decision table, a form, or a keyword lookup may already solve much of the problem. A baseline gives you something concrete against which to measure additional complexity.

For standard returns, a form can ask for item category, whether the packaging is unopened, and days since delivery. A decision table can apply an explicit policy. This may be more reliable than asking a model to infer those fields from a long message. Natural-language interpretation becomes useful when customers describe their situations in many different ways, but the final rule may still belong in code.

Use a baseline fairly. Do not give the AI system access to order records while forcing the baseline to guess from a short question, unless that difference is intentionally part of the system comparison. Record the available evidence for each candidate. Otherwise you cannot tell whether a gain came from the model or simply from better information.

A baseline also clarifies where AI adds value. You might retain deterministic eligibility rules and use a model only to extract the customer's stated facts and explain the result. You might discover that retrieval alone provides useful policy passages, making generated prose optional. Both are legitimate engineering outcomes.

A poor reason to reject a baseline is that it feels less impressive in a demonstration. A better reason is that it fails an important, observed task slice: perhaps customers express dates indirectly, or questions combine two policies. Preserve those failures as development examples. They identify the actual capability the more complex system must add.

Consider feasibility before expanding the scope. Do you have permission to use the documents? Can you obtain representative examples? Is there an answer key or a reviewer who can judge correctness? Can a failure be detected and recovered? A project with exciting capabilities but no way to evaluate the result is a weak first course project.

Make the resource assumptions visible

A project budget includes more than model tokens. Count preparation, implementation, evaluation, human review, hosting, and maintenance. For a learning project, hours and reproducibility may matter more than a tiny difference in request cost. For a deployed service, support load and failure recovery may dominate the economics.

Use a simple worksheet: expected volume, time per task today, time with the application, fraction needing review, review time, and incremental operating cost. Keep assumptions separate from observations. When the application is not built, every benefit estimate is provisional.

Worked example

Estimate the benefit of a bounded policy assistant

  1. Assume 800 eligible questions per month. The current process takes three staff minutes per question, so monthly staff time is 800 × 3 = 2,400 minutes, or 40 hours.
  2. Suppose a proposed workflow requires one staff minute for 600 routine questions and four minutes for 200 escalated questions. Total time is 600 × 1 + 200 × 4 = 1,400 minutes, or 23 hours and 20 minutes.
  3. Estimated time saved is 2,400 − 1,400 = 1,000 minutes, or 16 hours and 40 minutes per month. This assumes the volume and routing proportions remain unchanged.
  4. At an invented planning value of 24 dollars per staff hour, estimated time value is 1,000 / 60 × 24 = 400 dollars per month.
  5. Assume incremental hosting and inference cost 70 dollars monthly and maintenance takes four hours monthly at the same 24-dollar rate. Ongoing incremental cost is 70 + 4 × 24 = 166 dollars.
  6. Estimated monthly net value is 400 − 166 = 234 dollars. If initial development costs 1,170 dollars, simple payback is 1,170 / 234 = 5 months, provided every assumption holds.
  7. If only half the estimated time saving occurs, time value falls to 200 dollars and net value becomes 34 dollars monthly. Simple payback becomes approximately 34.4 months. This sensitivity makes measurement more valuable than a confident forecast.

The calculation does not mean the assistant should be built. It omits benefits such as faster self-service and costs such as organizational change. Its purpose is to expose which assumptions drive the decision. If the largest uncertainty is the escalation rate, prioritize an experiment that measures that rate before spending weeks polishing the interface.

Do not double-count a benefit. If the staff still spend the saved time correcting poor outputs, there may be little actual saving. If a system increases the number of questions customers ask, a per-question efficiency improvement does not necessarily reduce total workload. Define the unit of value and measure the entire workflow.

Turn the brief into staged evidence

Write milestones around capabilities that can be inspected. First, accept a question and return a fixed documented response. Next, retrieve an authorized policy passage. Then generate or assemble a supported answer. Later, propose a tool action, require approval, and persist its result. Each milestone should add a testable capability rather than merely a new library.

For the initial demonstration, use synthetic documents and orders. This reduces setup dependencies and makes expected answers inspectable. It does not prove the system will work on messy real documents. Record that limitation and identify the next validation step instead of quietly treating fictional data as representative production evidence.

Define three levels of completion. A demonstration runs one documented scenario. A tested prototype passes an explicit suite including failures. A controlled deployment adds operational ownership, access restrictions, and recovery procedures. The course aims at the third within a bounded teaching environment; it does not certify professional competence across all AI engineering tasks.

Your brief should fit on a page or two. Include the task, audience, inputs, permitted outputs and actions, exclusions, baseline, evidence source, acceptance criteria, workload budget, and unresolved assumptions. Add one concrete stop rule, such as declining to answer when no supporting policy is available. Another engineer should be able to challenge the proposal without having watched your demo.

Use three initial checks: supported explanations on known-policy questions, clarification on incomplete questions, and escalation on unavailable-policy questions. Keep prohibited actions separate from average quality. A system that answers nineteen questions well and exposes one unrelated order has not earned a pass by averaging those outcomes.

Exercise

A stakeholder asks for an assistant that handles every complaint and automatically fixes orders. Rewrite this as a first-release task. Name two permitted operations, two exclusions, and a stopping condition.

Check your answer

A suitable task is explaining published delivery and return policies and locating the authenticated customer's order status. Exclude refund execution and changing delivery addresses. Stop and hand off when the policy lacks a relevant rule or an order cannot be verified. Other answers can pass if the operations are bounded, observable, and supported by available data; merely saying use a powerful model does not define a task.

Exercise

A proposed assistant handles 300 routine questions in two minutes each and 100 escalations in six minutes each. The current process handles all 400 questions in four minutes each. Calculate monthly time saved. At 30 dollars per hour and 140 dollars of incremental monthly costs, calculate estimated net monthly value.

Check your answer

Current time is 400 × 4 = 1,600 minutes. Proposed time is 300 × 2 + 100 × 6 = 1,200 minutes. The saving is 400 minutes, or six hours and forty minutes. Estimated time value is 400 / 60 × 30 = 200 dollars; estimated net value is 200 − 140 = 60 dollars. The conclusion depends on the assumed times, routing mix, and whether the saved staff time has usable value.

Exercise

A developer demonstrates three correct answers and declares the assistant ready for customers. Specify the missing evidence and a feasible next milestone, without adding new capabilities.

Check your answer

The missing evidence includes representative task coverage, expected answers, failures and clarification cases, access boundaries, and measured outcomes across a defined sample. A feasible next milestone is a versioned twenty-case synthetic evaluation containing routine, ambiguous, unavailable-policy, and prohibited-action cases, with an answer key and recorded results. Passing it supports a tested teaching prototype, not unrestricted production readiness.

Check whether the bottleneck needs a model

Google's Rules of Machine Learning recommends establishing useful metrics and a simple baseline before investing in model complexity. Apply that discipline to the whole support process: faster drafting has little value if most time is spent waiting for information the assistant cannot access.

Separate elapsed time from active work. A customer may wait a day for a five-minute review; removing two minutes of typing does not remove the queue. Interview the operator, observe several tasks, and locate the step your proposed system can actually change. Record assumptions as ranges until you have measurements.

Worked example

Locate the benefit before selecting a model

  1. In a synthetic support process, 100 cases each require 2 minutes finding policy, 3 minutes checking records, and 1 minute composing a response: 600 active minutes.
  2. A drafting assistant saves half the composition time: 100 × 0.5 = 50 minutes.
  3. A policy-search improvement saves 1.5 minutes per case: 150 minutes. It has three times the gross time opportunity in this scenario.
  4. If reviewing either system adds 0.4 minutes per case, net savings are 10 and 110 minutes respectively, before maintenance effort.
  5. Run a small observed comparison. Do not treat the invented savings as a forecast or assume every case can use automation.

Exercise

A proposal promises a 40% reduction in handling time. The step it changes occupies 25% of current active time, and all other steps stay constant. Can the promise hold even if that step becomes instantaneous?

Check your answer

No. The maximum reduction under those assumptions is 25%, before review or operating overhead. Revisit the process boundary or the claim, then measure the relevant steps.

Sources and further reading

Summary

Choose the user's decision before choosing a model. Define inputs, authority, exclusions, and stopping behavior. Compare against a feasible non-AI baseline, make resource assumptions visible, and use staged evidence to distinguish a demonstration from a tested application. Your project brief is a testable proposal whose assumptions can change when evidence arrives.

Next action

Complete P01, Scope an AI Application. Then continue to Foundation Models and Their Limits to learn which model properties affect your design and which responsibilities remain in the surrounding application.

Choose another lesson