← Example scenarios

“How much did I spend”, a breakdown by category

Ask in plain words, and the bot counts from your own records and answers in sums.

What the scenario looks like

Вопрос про траты
Записи расходов▶
Разбор по категориям▶▦
Модель▦
Ответ▶
  • Execute
  • Execute + Data
  • LLM
Open in your workspace →

Recorded expenses are useless until you ask about them. Nobody opens a spreadsheet and builds a pivot; the question “how much went on cafés in August” gets asked in a chat in five seconds.

What is inside

  1. A question about spending — the entry.
  2. Spending records pulls rows from the collection, newest first.
  3. Breakdown by category — the model. It is given the question, the records, and one rule: count from those only.
  4. The answer — the exit.

The edge into the query node is a plain execution edge, not a data one. A find node reads an incoming value as its filter, so an ordinary data edge would turn the person’s question into the query condition and the node would refuse it.

What to set up for yourself

  • The collection must be the one the receipt scenario writes into.
  • How many records (limit). Currently five hundred.
  • The answer format in the prompt: sums per category, a total, a comparison with last month.

What to connect

A collection under Tables and a Telegram bot.

Know the ceiling up front: every record goes into the model as text. At a hundred rows this works and costs pennies; at ten thousand it gets expensive and starts making arithmetic mistakes. At that point the filtering and the sums move into the query itself, and the model is left to phrase the answer.