A user writes "I need a quote for Standard." and never says how many units. If your Copilot Studio agent answers with a total, it has made up the quantity. The arithmetic can be exact, and the answer is still wrong.
This article assumes that an agent flow does all the math and returns one finished text, Result, while the agent only fills the flow's inputs and words the answer. That takes the arithmetic away from the language model, but the model still fills the inputs, and that is where a guess gets in.
The example is invented. Standard costs 12.50 EUR and Premium 24.85 EUR per unit, orders of 100 units or more get 10% off, and VAT is 20%.
The flow is added to the agent as a tool named Quote, with the inputs Product (Text) and Quantity (Number), and the agent uses generative orchestration. For 240 units of Standard, the flow returns a net total of 2,700.00 EUR and a gross total of 3,240.00 EUR.
On the tool's page, each input has a Fill using setting. The default is Dynamically fill with AI: the agent tries to take the value from the available context, and if it finds none, it generates a question for the user. Use Custom value with a Power Fx formula only when a rule, not language, decides the value; the agent then does not ask the user for that input.
The available context is wider than the last message: Microsoft documents that agents use recent conversation history when they fill input values.
| The quantity comes from | Is it a guess? |
|---|---|
| The current message: "240 units", "two hundred forty" | No |
| An earlier message in the same conversation | No: documented behavior |
| Nowhere | Yes |
The last row is the one to stop. The five numbered sections are layers of defense. None is a guarantee; each has a limit.
The input description steers what the AI extracts. State the format, the valid values and what the agent must not do:
Product description: Product name: Standard or Premium. Pass any other name unchanged.
Quantity description: Number of units, as a whole number. Never assume a quantity.
The limit: a description steers the model, which can still slip.
To set the question the agent asks when a required value is missing, open the input's settings and, under Prompt, select Customize:
Product prompt: Which product do you need: Standard or Premium?
Quantity prompt: How many units do you need?
The limit is in Microsoft's guidance on generative orchestration: "The generated question can appear before configured tool-input prompt wording is reached." So the agent may still ask in its own words first. If the generated question reads badly, Microsoft's advice is to refine the input's name or description.
The flow cannot see where a number came from, but it can refuse values that cannot be right. Check the inputs in a Condition before any math. If the price list has no row for the product, or the quantity is below 1 or not whole (mod(…, 1) is greater than 0), end that branch with its own Respond to the agent, whose Result names the wrong input, for example:
Quantity must be a whole number of 1 or more.
Do all the math in the other branch. Two details:
Result.
AFTER THE QUOTE TOOL RUNS
- If the Result says an input is missing or wrong, ask for it. Do not guess.
The limit: the check is a rule, so the same input always takes the same branch, but it sees only what the agent passes. An invented 1 or 100 is a valid whole number, and the flow will quote it.
For wording that must be the same every time, Microsoft's guidance is an authored Question node that collects the input before the tool runs. That means calling the flow from a topic:
Collect the quantity with the Question node, not with a topic input: for a missing topic input, the agent generates the question, as it does for a tool input.
When the node asks, it uses the text you wrote. The node's Skip behavior setting (Allow question to be skipped or Ask every time) applies when its variable already has a value. Test a message that already contains the quantity, and check whether the question still appears. The cost: one more topic to maintain.
An agent that invents a quantity passes every test that gives one. A row without a quantity can catch it. On the agent's Evaluation page, select New evaluation, then Single responses, switch the toggle to Import and upload a CSV:
Question,Expected response
"How much for 240 units of Standard?","240 x Standard at 12.50 EUR = 3,000.00 EUR. Volume discount 10%: 300.00 EUR. Net total: 2,700.00 EUR. VAT 20%: 540.00 EUR. Gross total: 3,240.00 EUR."
"I need a quote for Standard.","How many units do you need?"
Use the Keyword match test method, set to All. It does not read the expected response, so open each test case and add its keywords: 2,700.00 and 3,240.00 for the first row (the answer must then state both totals) and How many units for the second. Remove General quality, the default method, which does not compare the answer with your expected response.
When the second row fails, read the answer:
| The answer is | It means | What to do |
|---|---|---|
| A question in other words | The agent asked | Change the keyword, or use the Question node |
| A quote | The agent guessed | Send the same message in the test panel and check the tool's inputs in the activity map. Tighten the Quantity description and rerun |
Two limits. A pass shows that the agent asked on this run, for this wording; rerun the set after every change to the flow, the instructions, a description or the model. And a single-response test has no earlier message: try "And for Premium?" after a 240-unit quote, in a conversation test set or the test panel. An agent that takes 240 from the earlier message is using conversation history as documented.
| Layer | You can rely on | You cannot rely on |
|---|---|---|
| Input description | Steering what the model extracts | The model never filling in a value |
| Customize prompt | Your question, once the configured prompt is reached | Fixed wording |
| Flow check | The same input taking the same branch | Catching a plausible invented number |
| Question node | The wording you wrote | Knowing when it is skipped, until you test it |
| Test row | Seeing whether the agent asked on this run | Proof for other wordings or later runs |
Where do you draw the line in your agents: does a quantity from an earlier message count as context, or as a guess?
The price list and all figures in this article are invented. The article was generated with AI under my direction. The interface labels and limits were checked against Microsoft Learn on 15 November 2026, and the figures were verified by calculation; the example as a whole has not been run end to end in a tenant, so test it before you rely on it.
References (Microsoft Learn)