Academy · Platform · Agents
Analytic models
In one line. An analytic model is a small program that works out one number or one plan the same way every time — a forecast, a best schedule, a loan payment — and your agents can ask it for the answer instead of guessing. You’ll be able to. Say what an analytic model is and when to use one, have Piper write and test one from a sentence, read what it tells you, and let an agent use it. Where this lives.
Studio ▸ Agents ▸ Classic ML ▸ Analytic Models.
What is an analytic model?
Think of a calculator that knows one job very well. You give it the facts — last year’s sales, the drivers you have, the size of a loan — and it gives back the answer, plus a short note on how it got there.
An agent is good at reading, writing and deciding what to do next. It is not the right thing to trust with arithmetic that must come out exactly right. An analytic model is. The agent decides when a number is needed; the model decides what the number is.
There are a few kinds, and the screen asks you which one you are making:
| Kind | What it does | Everyday example |
|---|---|---|
| Forecast | Guesses a future value from past values | Next month’s sales |
| Regression | Finds how one thing moves with others | How price changes with size |
| Classifier | Sorts a case into a group, with a score | Is this customer likely to leave? |
| Optimizer | Finds the best plan within limits | Which jobs fit the budget, who works which shift |
| Simulator | Tries thousands of “what ifs” | How long the queue might get on a busy day |
| Calculator | Applies a fixed formula | A monthly loan payment |
| Rules | Checks a list of rules in order | Which discount applies |
Why use one?
- Same answer every time. Give it the same facts and you get the same result — today, next week, for every person who asks.
- It shows its work. Every answer comes with a note: how far off the forecast was on months it had not seen, which rule fired, which limit stopped the plan from being better.
- Every run is kept. The model’s Runs tab lists what went in, what came out, which version ran and who asked — a person, a workflow step or an agent.
- You can change it safely. A model keeps its older versions. Try a new one, compare, and switch back if you like the old one better.
How to make one — just say the problem
You do not need to write code. Open Analytic Models, and in the box at the top write what you want in your own words, then ask:
“Forecast next month’s sales from the last 24 months, and tell me how sure you are.”
Piper then:
- Writes the model — what goes in, what comes out, and the code that does the work.
- Makes three test cases — two ordinary ones and one tricky one, like a history with only one month in it.
- Tests it before saving. These practice runs are not saved anywhere and do not show on the Runs tab. If a case fails, Piper fixes the code and tests again until every case passes.
- Saves it as a new version. A first version is used straight away; a later version is only switched on when you say so.
- Runs it once for real, so the run appears on the Runs tab.
- Explains it in plain words: what went in, the answer, and how sure the model is.
You can also open a model and ask Piper things like “Explain this model in plain words”, “Fix the failing run” or “Add a version that also reports how sure it is.” If you prefer to write the code yourself, the screen lets you do that too.
Good to know. A model only does sums. It never reaches out to the internet, never holds passwords or keys, and is not allowed to talk to outside cloud services. Code that tries is turned away before it runs.
Letting an agent use a model
Ask Piper: “Add the monthly sales forecast to the Sales helper agent.” Piper gives that agent the model and adds a line to its instructions: when someone asks a question the model answers, run the model and quote its answer — never work the number out on its own.
You can also do it yourself: open the agent, go to its Capabilities tab, and under Analytic models tick the models it may use. Tick none and nothing changes.
You choose which models each agent may use. An agent only sees the models you ticked; if it asks for any other one, it is told no, along with the names it is allowed. The choice travels with the agent when you package your solution.
To check it works, ask the agent a question the model answers, then open the model’s Runs tab: the newest run should say an agent started it.
Three short examples
A sales forecast. You say: “Forecast next month’s sales from the last 24 months.” The model looks at the trend, holds back the last few months to see how close it would have been, and answers: next month about 4,100, usually within 6 % on months it had not seen. Ask it again tomorrow with the same numbers and you get exactly the same answer.
A delivery-route or shift optimizer. You say: “Give each driver a set of stops so nobody drives more than 8 hours and the total distance is as short as possible.” — or, for a shift plan, “Cover every shift with the fewest overtime hours.” The model returns the plan and tells you which limit was tight: the 8-hour limit decided it; there is 40 minutes of room left on Tuesday. If no plan fits, it says so plainly instead of making one up.
A loan-payment calculator. You say: “Work out the monthly payment for a loan.” It takes the amount, the yearly interest rate and the number of months, and uses the standard formula: payment = amount × r ÷ (1 − (1 + r)^−months), where r is the yearly rate ÷ 12. For 20,000 at 6 % over 60 months the answer is 386.66 a month, and the note shows each part of the sum.
Where to go next
- A9 · Trained models (Classic ML) — the other models under Classic ML, which learn to read documents from your corrections.
- A5 · Tools & functions — the other things an agent can call.
- E9 · About Piper — what else the assistant can build for you.
Prefer learning inside the product? The same academy lives in the platform's Learn menu — every screen links to the chapter that explains it.
See the platform live