Sub topic 1
Start with the user problem and the scope of the AI feature
Every later step in this tutorial depends on this one. You cannot write a testable requirement, choose a quality dimension, or build an evaluation set for a feature you have not defined. This chapter covers how to state the user problem, decide whether an AI model belongs in the solution, and draw a scope boundary that the rest of the work can rely on.
Prerequisites
This chapter assumes you have:
- Basic familiarity with product requirements or user stories, such as "As a support agent, I want X so that Y."
- A general idea of what a large language model (LLM) or other AI model does: it takes an input and produces a generated output.
- Comfort reading short Python and JSON snippets. This chapter uses only a few.
You do not need to have built an evaluation before.
Why framing comes first
Teams often start from a capability: "We have access to a model, so let's add a chat assistant." That produces a demo, but it does not produce a feature you can test. If nobody has said who the feature serves and what a good result looks like, any output can be defended as acceptable. Any failure can also be dismissed as "the model just does that."
Framing gives you three things the rest of the process uses:
- A reference point for quality. "Good" is defined by what helps the user finish their task, not by how impressive the output sounds.
- A boundary for evaluation. You can only build an evaluation set for inputs you have decided the feature should handle.
- A basis for severity. The harm of a failure depends on what the user does with the output. A wrong suggestion in a brainstorming tool costs little. A wrong refund deadline costs money and trust.
Describe the user problem
Write the problem without mentioning the model. If your description includes "using an LLM," you have started with the solution. A useful problem statement has five parts.
| Part | Question it answers | Example |
|---|---|---|
| User | Who has the problem? | Customer support agents handling refund tickets |
| Task | What are they trying to do? | Tell a customer whether an item can be returned |
| Current approach | How do they do it today? | Search the policy wiki and paste a reply |
| Pain | What is wrong with that? | Search takes about 6 minutes and agents sometimes quote outdated rules |
| Cost of error | What happens when the result is wrong? | Wrong refunds, escalations, or legal exposure |
The "current approach" row matters most for evaluation later. It is your baseline. A feature that is only slightly better than the current approach, but fails in new and surprising ways, may not be worth shipping. If you can, collect real examples of the task now: actual tickets, queries, or documents. They become the seed of your evaluation dataset, and they show you how users really phrase things, which is rarely how the team imagines they do.
Separate the user's goal from the feature's output
The user's goal is "answer this customer correctly and quickly." The feature's output is "a drafted reply." These are different, and quality can fail between them. A fluent draft that the agent must fully rewrite does not meet the goal. Keep both in view, because the evaluation will have to measure the output while the product is judged on the goal.
Decide whether AI is the right tool
Not every problem needs a model. Ask these questions before committing:
- Could fixed rules solve it? If refund eligibility is a lookup of purchase date plus product type, a function is cheaper, deterministic, and fully testable. Use a model only for the part that needs language understanding or generation.
- Is the input open-ended? Free-text questions, messy documents, and varied phrasing are where models help.
- Can a wrong answer be tolerated or caught? If a person reviews the output before it takes effect, you can accept more error than if it acts automatically.
- Is there a way to know the right answer? If no one can say what a correct output looks like, you will not be able to evaluate the feature. Resolve that disagreement first.
Often the best design is hybrid. Code decides eligibility from structured data, and the model explains the decision in the customer's words. This shrinks the part of the feature that has nondeterministic behavior, and so shrinks what you must evaluate.
Define the scope
A scope statement says what the feature does, what it does not do, and what it does at the boundary. Writing the third part is where most teams skip work and later regret it.
In scope
List the tasks and input types the feature must handle well. Be specific about categories, languages, and channels. "Answers questions about our refund policy, in English, from authenticated support agents" is a scope. "Helps with customer questions" is not.
Out of scope
List what the feature will not attempt, even if the model could. Examples: legal advice, questions about other companies' products, issuing refunds directly, handling payment card numbers. Out-of-scope items are not just exclusions. Each one implies behavior you must specify, because users will send those inputs anyway.
Boundary behavior
For each out-of-scope category, decide what the feature should do when it appears. Common choices:
- Decline politely and say why.
- Hand off to a human or another system.
- Answer with a limited, labeled caveat.
These decisions become requirements, and the inputs become evaluation cases. A feature that handles in-scope questions well but responds confidently to an out-of-scope legal question has a quality problem. You can only see that problem if you decided in advance what the correct behavior was.
Autonomy and human oversight
Decide how much the feature does on its own. Three levels are common:
- Suggest: the model proposes and a person decides.
- Act with confirmation: the model prepares an action and a person approves it.
- Act automatically: the model's output takes effect directly.
Higher autonomy raises the cost of every error and so tightens the quality bar. Choose the level deliberately, because severity ratings and thresholds later in this tutorial depend on it.
A worked scope brief
Here is a compact scope brief for the running example, a refund-policy assistant. Keeping it in a structured file next to your evaluation data makes it easy to review and to keep current.
{
"feature": "refund-policy-assistant",
"user": "customer support agents",
"user_goal": "give a customer a correct, policy-based answer about returns and refunds",
"baseline": "manual wiki search, about 6 minutes per ticket",
"autonomy": "suggest",
"in_scope": [
"return eligibility questions",
"refund timing questions",
"damaged or defective item questions"
],
"out_of_scope": {
"legal_advice": "decline and escalate to the legal contact",
"order_status": "hand off to the order lookup tool",
"abusive_input": "do not engage; flag the ticket"
},
"languages": ["en"]
}The autonomy field says an agent reads every draft before it is sent. That lowers the severity of some failures, but not all of them. An agent who trusts a plausible but wrong deadline may still pass it to the customer. You will see later how to rank those failures.
How the pieces connect
The framing work flows into the artifacts you build in later chapters.
Common errors
Starting from the model. Symptoms: the problem statement mentions a model, or the success measure is "users like the output." Fix it by rewriting the problem as a user task with a baseline.
Scope by adjectives. "Helpful," "smart," and "general-purpose" cannot be tested. Replace them with named task categories and input types.
Ignoring out-of-scope inputs. Users will send them. If you have not decided the correct response, the model will decide for you, and inconsistently.
Treating the demo as the scope. The five examples shown in a demo are a sample of what you hope users ask. The scope should come from real or realistically collected inputs, including messy ones.
Leaving autonomy implicit. Teams often discover late that a "suggestion" feature is being copied directly into customer messages. Check how the output is really used, not only how it was designed to be used.
One scope for everyone. If different user groups have different tasks or risk levels, such as new agents versus senior agents, write separate briefs or note the difference. Quality may need to be measured per group.
What to carry forward
By the end of this step you should have a short brief containing the user, the task, the baseline, the cost of errors, the autonomy level, and the in-scope and out-of-scope lists with boundary behavior. The next chapters build on it. Nondeterminism changes how you phrase requirements. Quality dimensions turn "good" into named properties. Failure modes and severity come from the cost-of-error row and the autonomy level. Evaluation cases come from your in-scope tasks and your boundary behaviors.
Exercise
A team writes this scope: "An assistant that helps customers with anything related to their account." List three problems with it for evaluation purposes, and rewrite it as a more testable scope for one concrete task of your choice. Include one out-of-scope category with its boundary behavior and an autonomy level.
Show answer
Problems: (1) "Anything related to their account" has no task categories, so you cannot decide which inputs to include in an evaluation set. (2) It names no user, baseline, or cost of error, so you cannot judge whether the feature is better than the current approach or how serious a failure is. (3) It defines no boundary or autonomy level, so the response to risky requests such as changing a password or giving legal advice is undefined. A sample rewrite: "For logged-in customers, answer questions about invoice contents and billing dates in English, using the billing documentation. Baseline: customers currently wait about one day for an email reply. Autonomy: the assistant replies directly, so the quality bar is high. Out of scope: requests to change payment details. Boundary behavior: decline and link to the secure account settings page. Any reasonable rewrite should name a user, a task category, a baseline, an autonomy level, and a defined response for at least one out-of-scope input."