Sub topic 1
Start with the user problem, not the technology
Prerequisites
This chapter assumes you know how software products and features are built, at the level of requirements, tickets, and releases. It assumes a general awareness of what machine learning models and large language models (LLMs) do. It also assumes you can read short Python snippets. You do not need to train or call a model to follow it.
Why the problem comes first
Many AI features start from a sentence like "we should add an AI assistant." That sentence names a technology. It does not name a user, a task, or a result. Teams that begin there tend to build something that demos well and then fails to change any number they care about.
Starting from the user problem reverses the order. You describe what is going wrong for a person, agree on what "better" looks like, and only then ask which technology is cheapest and safest at getting there. AI becomes one candidate among several. Often it is not the best one.
This chapter covers how to write a problem definition that can later be tested. The rest of the tutorial builds on it. Baselines, error cost, and evaluation all need a clear problem to measure against.
The parts of a problem definition
A usable problem definition has five parts.
- User. Who has the problem? "Support agents handling billing tickets" is a user. "Customers" is too broad to design for.
- Situation. When and where does the problem happen? What is the user trying to do, and what gets in the way?
- Current behavior. How do people cope today? This includes workarounds, manual steps, and the time they take.
- Success outcome. What changes for the user if the problem is solved? State it as an observable result, not as a feature.
- Constraints. What limits the solution: deadlines, budget, privacy rules, devices, and how wrong the result may be.
The success outcome is the part teams skip most often. "Add smart reply suggestions" is a solution. "Agents resolve a billing ticket in under four minutes instead of nine, without more reopened tickets" is an outcome.
Solution statements versus problem statements
A quick test: if your sentence mentions the mechanism, it is a solution statement. Rewrite it.
| Solution statement | Problem statement |
|---|---|
| Add an AI chatbot to the help page | Customers cannot find the refund policy and open tickets that the policy already answers |
| Use an LLM to summarize meetings | Attendees who miss a meeting spend about 30 minutes finding the decisions that affected them |
| Recommend products with machine learning | New shoppers leave the catalog page without adding anything to the cart |
| Auto-tag tickets with a model | Tickets sit in a shared queue for hours because someone must read each one to route it |
Each problem statement leaves room for several answers. The first row could be fixed by moving a link, rewriting a page, improving search, or adding a chatbot. You cannot compare those options until the problem is written without one of them baked in.
Success outcomes and metrics
A success outcome becomes useful when you attach a measurement to it. Separate three kinds of measures, because they answer different questions.
- User outcome. The thing the user cares about, such as time to resolve a ticket or the share of shoppers who find a product.
- Business outcome. The reason the company cares, such as lower support cost or higher conversion.
- Guardrail. Something that must not get worse while you improve the first two, such as refund errors, complaint rate, or latency.
Write each with a current value (the baseline), a target, and a way to measure it. If you cannot measure the current value, that is a finding. It means you cannot yet show that any solution helped.
A worked example
Suppose a product manager at a software company proposes: "Let's use AI to route support tickets."
First, turn it into a problem definition.
- User: The support operations team, and the customers waiting on tickets.
- Situation: Every new ticket lands in one queue. A team lead reads it and assigns it to billing, technical, or account staff.
- Current behavior: Two team leads spend roughly three hours a day routing. Median time to first assignment is 70 minutes.
- Success outcome: Median time to first assignment falls below 10 minutes, and the share of tickets reassigned because they were routed wrongly stays at or below the current 6 percent.
- Constraints: Tickets may contain customer personal data. Misrouted urgent tickets must reach a person within an hour.
Notice what this definition has done. It contains a target, a guardrail (the 6 percent reassignment rate), and a constraint that will matter later for risk and oversight. It does not say "AI" anywhere.
Now a short script can record the definition so the team can check it against measurements later. This keeps the definition in one place, in a form that a test or a dashboard job can read.
from dataclasses import dataclass
@dataclass
class Metric:
name: str
baseline: float
target: float
higher_is_better: bool
def met(self, observed: float) -> bool:
if self.higher_is_better:
return observed >= self.target
return observed <= self.target
@dataclass
class ProblemDefinition:
user: str
situation: str
outcome: Metric
guardrails: list
routing = ProblemDefinition(
user="support operations team",
situation="every new ticket is read and routed by hand",
outcome=Metric("median minutes to first assignment", 70, 10, False),
guardrails=[Metric("share of tickets rerouted", 0.06, 0.06, False)],
)
def evaluate(problem: ProblemDefinition, outcome_value: float, guardrail_values: list) -> str:
if not problem.outcome.met(outcome_value):
return "outcome not met"
for metric, value in zip(problem.guardrails, guardrail_values):
if not metric.met(value):
return f"guardrail broken: {metric.name}"
return "success"
print(evaluate(routing, 8, [0.05]))
print(evaluate(routing, 8, [0.09]))
print(evaluate(routing, 30, [0.05]))The script prints success, then guardrail broken: share of tickets rerouted, then outcome not met. The second case matters most. A solution that is fast but routes tickets wrongly fails, even though the headline number improved.
Where the problem definition goes wrong
Hiding a solution inside the problem
"Users need a conversational interface" is a solution. Ask "what are they trying to do that they cannot do now?" until the answer no longer names a mechanism.
Confusing the user with the buyer or the team
An executive may want a dashboard summary. The person doing the daily work may need something else. Name the person who experiences the problem, and talk to them.
Defining an outcome you cannot observe
"Users feel more productive" is hard to measure. Look for a behavior that stands in for it: time on task, number of steps, repeat contacts, or abandonment.
Skipping the current behavior
Without a measured baseline you cannot claim improvement. You also miss cheap fixes. A common discovery is that users already work around the problem in a way that suggests a simple design change.
Ignoring the segments
An average can hide a failing group. If the problem affects only one language, device, or customer tier, the best solution may be narrower than you think. Write down which segments you will check.
How this feeds the rest of the decision
A good problem definition is the input to every later step in this tutorial.
- It tells you what non-AI approach to try first, because the current behavior shows what a rule, a search change, or a design tweak could fix.
- It exposes the cost of errors, through the guardrails and constraints.
- It gives evaluation something to measure. Quality metrics for a model are only meaningful if they connect to the user outcome.
- It sets the bar for a pilot: the AI option must beat the baseline on your outcome, not merely work.
Notice that AI appears only at step F, as one of the candidates. Nothing before it assumes it.
A short checklist
Before moving to the next chapter, you should be able to answer each of these for a feature you are considering.
- Who exactly has the problem, and how do they cope today?
- What observable outcome would show it is solved?
- What is the current value of that outcome?
- What must not get worse?
- What limits apply to any solution?
- Is the statement free of the name of a technology?
If any answer is missing, collect that information first. It is cheaper than building the wrong feature.
Exercise
A team writes: "We want an LLM to generate product descriptions for our marketplace sellers." Rewrite this as a problem definition with a user, a situation, current behavior, a success outcome with a measurable target, and one guardrail. You may invent plausible numbers, but mark them as assumptions.
Show answer
One acceptable answer: User: small sellers listing products on the marketplace. Situation: a seller creating a new listing must write a description before it can be published. Current behavior: sellers spend about 12 minutes per listing, 35 percent of listings are published with fewer than 20 words, and short listings convert at half the rate of fuller ones (assumptions). Success outcome: the median time to publish a listing drops from 12 minutes to under 5, and the share of listings with a complete description rises from 65 percent to 90 percent. Guardrail: the rate of listings reported for inaccurate descriptions does not rise above its current 1 percent. The statement names no technology, so templates, guided forms, or an LLM are all still valid candidates to compare.
Exercise
Look at the Python example in this chapter. The routing run returns success for an outcome of 8 minutes and a rerouting rate of 0.05. Which input would you change to make it print guardrail broken: share of tickets rerouted while the outcome still passes, and why does the code check the outcome before the guardrails?
Show answer
Raise the rerouting rate above 0.06, for example evaluate(routing, 8, [0.09]). The outcome of 8 minutes still meets the target of 10, so the check reaches the guardrail and reports it. The code checks the outcome first and then the guardrails, so a result is only called a success when the headline target is met and nothing that must not get worse has gotten worse. A fast but inaccurate solution therefore fails.