Hello. In the previous lesson, you traced an agent’s observe–reason–act loop and saw why a tool acknowledgement is not the same as verified task completion. The access-support example worked because the agent checked evidence, acted within a narrow permission boundary, and verified the resulting entitlement.
Now we address a complication at the center of AI product management: the model choosing each next step is not a fixed rule engine. It produces likely continuations, and the particular continuation can vary. By the end of this lesson, you should be able to explain where that uncertainty comes from, distinguish harmless variation from consequential risk, and translate it into product requirements rather than hoping the model will behave identically every time.
A language model produces probabilities, not guaranteed answers
A conventional software rule might say:
If account_status is active and approval is recorded:
allow standard-access request
For the same inputs, a correctly implemented rule should produce the same result every time. That predictability is valuable: it lets a team reason about behavior through explicit conditions and test cases.
An LLM works differently. Given the text so far, it estimates a probability distribution across possible next tokens. It then selects one token, incorporates it into the sequence, and repeats this process token by token until it reaches an end point.
A simplified illustration:
| Possible next token | Model-estimated probability |
|---|---|
| “access” | 0.42 |
| “account” | 0.27 |
| “request” | 0.16 |
| “permission” | 0.09 |
| Other tokens | 0.06 |
The model does not inherently retrieve a single verified answer from a database. It estimates what is likely to follow from patterns learned during training and from the prompt, context, instructions, and tool results currently available.
Large Language Models explained briefly
Watch “Large Language Models explained briefly” by 3Blue1Brown for a compact visual explanation of next-token probabilities and why sampling can make outputs vary.
Begin with next-token probabilities, which establishes that the model assigns likelihoods rather than emitting one predetermined word. Then watch sampling variation to see why the same prompt can yield different responses. Finish with emergent behavior; focus on why it is difficult to identify the exact cause of one particular prediction.
The mechanics can be expressed formally, though you do not need to calculate this as a PM. The model assigns each candidate token a score , then converts the scores into probabilities. Temperature changes how sharply the model favors the highest-scoring options:
At lower temperatures, probability concentrates more strongly on the most likely tokens. At higher temperatures, less likely options receive more chance of being selected. Product APIs generally treat a temperature of zero as an instruction to choose the highest-probability option rather than literally dividing by zero in this equation.

The image is useful, but its label “more random” needs a product interpretation: temperature changes variation; it does not turn truth on or off. A low-temperature answer may still be wrong. A higher-temperature answer may be excellent. Temperature is one control over output diversity, not a quality guarantee.
LLM Fundamentals | Microsoft Learn
Read the relevant parts of Microsoft Learn’s “LLM Fundamentals.” It gives the technical grounding needed to make sensible product decisions without treating model behavior as magic.
In the “Temperature and determinism” subsection, read the temperature passage. Focus on the distinction between lower variation and full determinism. Next, in “How inference works,” read the generation process, following how each selected token becomes part of the input for the next one. Finally, read the “What LLMs struggle with” table, especially the reliability limitations.
Why one small variation can become a different agent trajectory
For a single creative-writing request, variation is often desirable. You may ask for three different campaign slogans precisely because there is no one perfect continuation.
For an agent, however, language generation may influence a decision or action. The consequence is larger because the selected token sequence can affect:
- whether the agent asks a clarifying question or proceeds;
- which tool it calls;
- the parameters it supplies to that tool;
- whether it recognizes a policy boundary;
- whether it interprets a tool result as success, failure, or a reason to retry;
- what it tells the user after acting.
Return to the Analytics Portal access agent from the previous lesson. Suppose it has observed the following facts:
Account: active
Portal group: absent
Role: Sales Analyst
Manager approval: recorded
Policy: standard group is permitted
A well-behaved model might request the permitted add_standard_portal_group tool. But on a different run, an agent could instead ask the user to contact IT, interpret “standard” too broadly, or produce an overly cautious explanation despite having enough evidence to proceed. If its instructions and tool controls are weak, it could also choose an inappropriate action.
This is trajectory uncertainty. A slightly different early choice changes the information the agent sees next, and that changed context can produce a substantially different later path. In an agent loop, uncertainty can compound across several decisions.
That does not mean every agent is unreliable or that agents should never act. It means product design must identify which choices are acceptable to vary and which must be protected by deterministic controls and evidence checks.
A useful distinction is:
| Type of variation | Example | Product concern |
|---|---|---|
| Surface variation | Different wording in a completion message | Usually low risk if the factual content remains correct |
| Reasoning or decision variation | Asking for clarification in one run but selecting a tool in another | May create inconsistency, delay, or unnecessary work |
| Factual variation | Inventing a policy, source, or account status | Can mislead users and drive incorrect decisions |
| Action variation | Calling an unnecessary tool or choosing the wrong action | Can create cost, errors, or real-world harm |
| Environmental variation | A policy source changes, a tool times out, or a record is updated mid-task | The agent must adapt without making unsupported claims |
Only the first category is naturally harmless. The other categories require product constraints.
Probabilistic output is not the same as hallucination
These terms are often blurred together, but they describe different things.
Probabilistic output means the model produces a distribution of possible continuations. Different runs can produce different responses or decisions.
A hallucination is an output that presents unsupported or false information as though it were true. For example, the agent might claim that it found a manager approval when the ticket contains none, invent a policy exception, or tell the employee their access is restored without checking the entitlement system.
Hallucination is one important manifestation of product uncertainty, but not all variation is hallucination. These two responses may both be correct:
“Your standard access is active. Please sign in again.”
“I confirmed that standard access is active. If you are already signed in, refresh the application and try again.”
By contrast, this response is not acceptable if no verification occurred:
“Your access has been restored.”
Fluent language and a confident tone are not evidence. In the previous lesson’s agent loop, the verify_portal_entitlement result was evidence; the model’s statement about access was merely a claim until it was grounded in that result.
Watch the selected excerpts from “Why do AI models hallucinate?” by Claude. They clarify why fabricated information can sound persuasive and identify situations where verification matters most.
Watch the definition for examples of confident fabrication. Continue with why guessing occurs, focusing on the model’s tendency to produce a useful-sounding answer when its basis is weak. Then watch high-risk requests; note the emphasis on precise figures, sources, current information, and specialized facts.
A model can hallucinate even when its temperature is low. Lowering temperature often makes the same error more consistent; it does not supply missing information or verify claims. Conversely, a high temperature does not automatically produce hallucinations, though it tends to create more varied completions.
Similarly, a model’s own expression of confidence is not a sufficient safety mechanism. A system can ask the model to flag uncertainty, and that may be useful as one signal. But for consequential claims, the product should prefer external evidence: an authoritative source, a validated database response, a policy check, or human review.
Uncertainty exists at several layers of the product
It would be a mistake to blame every inconsistent agent outcome on token sampling alone. An agent product is a system, and several sources contribute to variation:
-
Model generation. The model can select a different continuation or tool call from plausible alternatives.
-
Context supplied to the model. Retrieved documents may differ, conversation history may be incomplete, and a tool may return a changed record. The model can only reason over the context it receives.
-
Tool and external-system behavior. APIs can time out, return incomplete data, reject requests, or reflect real changes in the environment.
-
Orchestration and policy decisions. The agent harness may impose iteration limits, route a task to a different model, require approval, or block a proposed action.
-
Production infrastructure. Even at temperature zero, small implementation differences can cause occasional variation. A product should not depend on byte-for-byte identical output across calls.
Microsoft’s observability guidance makes the key contrast directly: conventional software usually has predictable execution paths, while AI execution is better understood as a distribution of possible behaviors.
Observability for Generative AI and agentic AI systems | Microsoft Learn
Read the opening “Context and problem” section of Microsoft Learn’s observability guidance. It connects model variability to the operational responsibilities of an AI-agent product team.
At the start of “Context and problem,” read the deterministic contrast. Then continue through the first list of key challenges. Focus on why uptime, error rate, and latency alone cannot show whether an agent is useful, correct, or safely behaving.
This changes what “working” means. An agent can have:
- excellent uptime but confidently give false policy information;
- low latency but take an unjustified tool action;
- no software errors but fail a user’s task in subtle ways;
- a successful API response but an unverified real-world outcome.
Traditional operational metrics still matter. A slow or unavailable agent is a product problem. But they are insufficient because they do not measure whether the model’s variable decisions were correct and within policy.
Turn uncertainty into product design
The PM response to probabilistic behavior is not “make the prompt longer” or “set temperature to zero.” Both can help in some cases, but neither is a complete product strategy.
Instead, design the system so that variation occurs where it is tolerable and is constrained where it is consequential.
1. Separate flexible language from fixed controls
Let the model handle work where language understanding and judgment add value:
- interpreting a user’s natural-language request;
- summarizing records;
- explaining a policy in user-friendly terms;
- selecting among permitted next steps.
Keep hard boundaries outside the model wherever possible:
- permissions;
- allowed tools;
- approval requirements;
- maximum spending or iteration limits;
- schema validation;
- checks for required fields;
- confirmation before irreversible actions.
For the access agent, the model may decide that the request appears to concern standard access. But the product, not the model alone, should enforce that only the analytics_standard group can be changed and that privileged groups cannot be granted through this flow.
2. Ground claims in authoritative evidence
When correctness depends on current facts, the agent should retrieve or inspect a trusted source rather than generate from general language patterns.
In the access workflow:
| User-facing claim | Evidence the product should require |
|---|---|
| “Your account is active” | Identity-system result |
| “You are eligible for standard access” | Role, approval, and policy result |
| “The group was added” | Write-tool response with a change reference |
| “Your access is restored” | Post-action entitlement verification |
This design reduces a model’s opportunity to invent critical facts. It does not make the model infallible: it could still select the wrong source or misread a result. That is why critical tool outputs should be structured, validated, and recorded in the trace.
3. Define completion as a verified state
A probabilistic model may be tempted to end the interaction when its wording sounds complete. The product needs an observable completion condition instead.
For example:
- Weak condition: “The agent says the user has access.”
- Strong condition: “The entitlement tool reports active standard access after the authorized change, and the ticket update succeeds.”
The strong condition can be checked independently of the model’s prose. It makes quality measurable.
4. Write behavioral invariants, not only exact expected text
With deterministic software, a test may reasonably assert an exact output. For an LLM, exact wording may vary even when behavior is equally good.
For the access agent, product acceptance criteria should focus on invariants such as:
- The agent only adds the standard group after confirming the relevant role, recorded approval, and policy permission.
- The agent never grants privileged access or overrides a missing approval.
- The agent does not report restored access until entitlement verification confirms it.
- If evidence is missing, conflicting, or unavailable, the agent explains the blocker and routes the task to the appropriate human queue.
- The ticket record contains the action taken, evidence used, and outcome.
These criteria allow harmless language variation while rejecting unsafe or incorrect behavioral variation.
5. Evaluate repeated behavior, not a single impressive demo
A single successful run is evidence that an agent can succeed. It is not evidence that the product will reliably succeed for users.
For an AI agent, testing must ask questions such as:
- Across representative requests, how often does the agent complete the correct task?
- How often does it make an unsupported claim?
- Does it follow tool and permission boundaries on every relevant case?
- What happens when required approval is absent, a tool fails, or policy information conflicts?
- Does changing the wording of a user request alter a decision that should remain stable?
Later in the course, you will build evaluation sets and scoring rubrics in detail. For now, the core principle is simple: evaluate a range of likely behaviors, not one canonical output.
6. Make uncertainty operationally visible
A production team needs enough trace information to reconstruct what happened:
- the user goal and relevant inputs;
- the model’s selected tool or response category;
- retrieved context and tool results;
- policy checks and validation results;
- actions attempted and outcomes observed;
- completion, safe failure, or escalation status;
- latency, iterations, and cost.
The trace should support investigation without indiscriminately storing sensitive content or raw private reasoning. The aim is accountable system behavior: what evidence was available, what was done, and whether the required outcome was verified.
A practical PM decision rule
When deciding how much uncertainty an agent can tolerate, assess three product properties together:
| Property | Core question | Access-agent example |
|---|---|---|
| Consequence of error | What happens if the agent is wrong? | Granting privileged access could create a security incident |
| Reversibility | Can the action be safely undone? | Removing an incorrectly added standard group may be possible, but still disrupts the employee |
| Verifiability | Can the product confirm the result with evidence? | An entitlement check can confirm whether access is active |
Low-consequence, easily reversible, verifiable actions can support more agent autonomy. High-consequence or difficult-to-verify actions need stronger controls, approval, or human ownership.
This is a product decision, not simply a model-selection decision. A highly capable model does not remove the need to define what evidence counts, what actions are permitted, and when the system must stop.
Key takeaways
- LLMs generate token-by-token from probability distributions, so identical prompts can yield different responses or decisions.
- Temperature changes output variation, but low temperature does not guarantee truth, consistency, or deterministic behavior.
- In an agent, a different early model choice can change the entire tool-use trajectory.
- Probabilistic behavior and hallucination are distinct: hallucination is an unsupported or false claim presented as true.
- Product uncertainty comes from the model, context, tools, orchestration, and production infrastructure—not from sampling alone.
- Strong agent products constrain consequential actions, ground critical claims in authoritative evidence, verify completion, and test behavioral invariants across repeated cases.
- Uptime and API success are not enough. Agent quality requires evidence about correctness, policy compliance, task completion, and safe failure.
Next, you will use this understanding to identify where agent autonomy genuinely adds value over a conventional software workflow—and where a deterministic workflow or copilot is the better product choice.
Can't find a good explanation? Sign up and we'll make it for you
Sign up