How AI works
You can use Tunori without knowing any of this. A rough picture still pays off: it explains why an agent is so good at some things, why it is sometimes wrong, what you are charged for, and why a very long chat behaves differently from a short one.
This page covers the four ideas behind all of that: the model, tokens, the context window and summarizing. You can try each of them out as you read.
What an AI model is
Every chat and every agent in Tunori is driven by an AI model, also called a large language model or LLM. A model has read an enormous amount of text and learned from it how words, facts and arguments usually follow one another.
It does one thing: given some text, it works out what should come next. That is how it writes an answer too. It looks at everything written so far, weighs what could follow, writes one small piece, and starts over.
Write a short thank-you to a customer for their order.
The model's reply so far
Thank you for your
What could come next?
- order52%
- purchase23%
- business14%
- recent11%
Much of how AI behaves follows from this:
- It writes well about almost anything. Emails, summaries, translations, plans, tables: it has seen countless examples of each.
- It can be wrong and sound sure. A model writes what is likely, not what it has checked. When it lacks a fact, it may fill the gap with something that only sounds right. Give it the real data to work from, and read what matters before it goes out.
- The same question can get a different answer. There is a little chance in every word it picks, so two runs rarely match word for word.
What a model knows
A model has two sources of knowledge, and nothing else:
- What it learned in training. This is general knowledge up to a certain date. It includes nothing that happened later and nothing about your company, your customers or your inbox.
- What is in front of it right now. The instructions it was given, the conversation, the files you attached and whatever it looked up.
A model does not learn from your chats and remembers nothing between them by itself. Everything it should take into account has to be put in front of it each time. Tunori does that for you: an agent's instructions and skills come along with every chat, memory brings back facts from earlier chats, and web search covers what happened after the model was trained.
From a model to an agent
On its own a model only reads and writes text. It cannot open your mailbox or save a file. An agent is a model that has been given a job and tools for it: the accounts you connected and the abilities you switched on.
When the model needs something, it asks for a tool to be used. Tunori runs the tool and hands the result back, and the model reads it and decides what to do next.
A task arrives
Your message, a schedule or a trigger.
Repeats until the job is done
The model decides
It reads everything in front of it and picks the next step.
A tool does it
Find an email, read a file, save a record. The result goes back to the model.
The answer
Once it has what it needs, the model writes its reply.
This is why an agent can work with facts instead of guessing: it looks things up in your real data. It is also why you stay in control. You choose the tools, and you can have an agent ask for your approval before a tool runs.
Tokens
Models do not read letters or whole words. They read tokens: small pieces of text. A short, common word is one token. A long or unusual word is cut into several, and so are numbers. Type something to see it happen:
How a model sees it
Hi Anna, thank you for the quick reply. I have attached the signed contract and the invoice for October.
- Characters
- 104
- Words
- 19
- Tokens
- 22
Some rules of thumb for English:
- One token is about four characters, or three quarters of a word.
- Other languages usually take more tokens for the same content.
- Codes, long numbers and unusual names take more tokens than ordinary words.
| Text | About |
|---|---|
| A short email | 200 tokens |
| One page of a document | 500 tokens |
| A 20-page contract | 10,000 tokens |
| A 300-page book | 150,000 tokens |
Tokens matter to you for two reasons:
- They are what you pay for. Model usage is charged per token: input tokens for everything the model reads, and output tokens for what it writes. Writing costs more per token than reading. Each model's prices are listed in models and pricing, and billing and credits explains the charges.
- They limit how much a model can take in at once. That limit is the context window.
The context window
The context window is everything a model can see at one time, measured in tokens. Think of it as a desk: whatever is on the desk, the model can work with. What is not on it does not exist for the model.
More is on that desk than your last message. Fill it up and see what takes the room:
Context window
24,000 of 400,000 tokens · 6%
Instructions4,000
The agent’s brief and the skills it works with.
Tools14,000
What each tool does, so the agent knows what it can reach for.
Conversation6,000
Every message and reply of this chat, from the first one on.
Files and tool results0
Attachments, and what the agent looked up: emails, documents, search results.
Room left376,000
For whatever comes next, including the reply the model is about to write.
Add to the chat
Press a button and watch what takes the room.
The models in Tunori have windows of several hundred thousand to a million tokens. Each model's window is listed in models and pricing.
Every reply starts from the top
A model keeps nothing in mind between two replies. To answer your tenth message, it reads the instructions and all nine earlier messages and replies again, then yours.
- 1st reply20,000 tokens
- 5th reply28,000 tokens
- 20th reply58,000 tokens
- 50th reply118,000 tokens
- Instructions and tools
- The conversation so far
Two things follow:
- A long chat costs more per message than a short one, because every reply rereads the whole conversation. Models charge less for text they have read a moment ago, which softens this, but it does not go away.
- A chat about many things at once gets less sharp. Everything on the desk competes for the model's attention. Old topics that no longer matter still sit there.
Summarizing long conversations
A chat that keeps growing would fill its window sooner or later. Before that happens, Tunori summarizes the earlier part of the conversation: the older messages are replaced, for the agent, by a short summary, and the recent ones stay as they are. You may also meet this under the names context compression or compaction.
Keep the conversation going and watch it happen:
Context window
Summarizing starts at the mark
- Instructions and tools
- Exchanges
- Summary
24% full
The chat
- 1+4%
We need 40 office chairs, budget €12,000. Compare the offers we got.
Found three offers: Nordwind, Sedia and Kontor.
- 2+15%
Here is our current price list.
Read the 60-page PDF: Kontor is 6% below today’s prices.
What this means in practice:
- It happens on its own. There is nothing to switch on. A line in the chat, Earlier messages were summarized, shows where it happened.
- Nothing disappears for you. You can scroll up and read every message. Only what the agent reads has changed.
- The summary keeps what the work needs: what you asked for, the decisions made, names, numbers and your preferences.
- Exact details from early on may be gone. A summary is shorter than the original, so the precise wording of an old message or the full content of a file read long ago is no longer in front of the agent. If it needs one again, say so, or attach the file again.
See long conversations for how this looks in a chat.
Getting better results
A few habits follow from all of the above:
- Start a new chat for a new topic. The agent gets a clean desk: sharper answers, and less to reread with every reply.
- Put lasting rules into instructions or a skill, not into a chat. An agent's instructions and skills are in front of it every time and are never summarized away. A preference mentioned once in a long chat is easy to lose.
- Give it the facts. Attach the document or let the agent look the thing up through an integration, instead of asking it to recall something from general knowledge.
- Attach what is needed, not everything. A large file takes far more room than a long conversation.
- Check what matters. Read numbers, names and dates before they go out, and use approvals for anything an agent sends, changes or deletes.
- Match the model to the job. Larger models reason further through long, multi-step work and cost more per token; smaller ones are quick and cheap for simple, well-defined tasks. See models and pricing.