AI and MCP

Create categorisation rules by chatting: how to do it carefully

How to set categorisation rules by asking an AI assistant in chat, how to test them on past transactions and avoid rules that mislabel spending.

Editorial illustration for Create categorisation rules by chatting: how to do it carefully

You can create a categorisation rule by chat if your expense app is connected to an assistant and the scope allows changes. State the condition and the category, ask the assistant to show which past transactions the rule would match, and approve only after you have checked that list. SpendixAI applies your own rules first, ahead of history and AI, so a good rule is the most predictable thing you can add.

What is a rule, in plain words?

A rule says: when the merchant text contains this word, put the transaction in that category. It does not think. It matches. That is exactly why it is reliable when the pattern is narrow and wrong when it is loose.

How do you phrase a rule so it works?

  • Name the text to match, as it appears on statements, such as BIGBASKET.
  • Name the category and sub-category exactly as they appear in your list.
  • Say whether it should apply to old transactions too, or only new ones.
  • Ask for a preview of matches before anything is saved.

Worked example: a food-delivery rule

Say you want any merchant containing the word Swiggy to go to Food delivery. Ask the assistant to preview the last three months. It lists 14 matches averaging ₹420, so 14 × 420 = ₹5,880. Reading the list, two rows are for a grocery service from the same company, ₹640 and ₹560. Those belong in Groceries, so the rule is too broad. You refine it: Swiggy with the extra word Instamart goes to Groceries first, everything else to Food delivery. After the change, Food delivery has 12 rows and Groceries has 2, and the amounts add to ₹5,880 less ₹1,200, which is ₹4,680 in food delivery.

CategoryRowsAmount
Food delivery12₹4,680
Groceries2₹1,200
Total matched14₹5,880

What should you test before approving?

  1. Does the row count match what you expected?
  2. Does every merchant text on the list really belong in that category?
  3. Is there a more specific rule that must run first?
  4. Do refunds from the same merchant land sensibly?
  5. Does the rule change anything you already corrected by hand?

Why do rules beat repeated AI guesses?

AI is the last stage in SpendixAI, used only for what rules and history do not settle, and only if you leave AI switched on. You can turn it off for a feature, cap it with a monthly budget or switch it off entirely, in which case unmatched items wait for your review. Rules cost nothing per use and behave the same every time. Corrections you make are saved as history too, and merchant aliases help when one shop appears under several names.

What about privacy in chat?

The words you type go to your assistant provider. A rule needs only a merchant name and a category, never an account number or a full statement, so keep it to that. Connect with the smallest scope that lets the assistant do the task, and disconnect when you are finished.

When should you not make a rule?

Skip a rule when the same merchant genuinely serves two purposes. A large online marketplace can sell groceries on Monday and a laptop on Friday, so a rule would be right half the time. For those, leave the merchant uncategorised by rule and sort by amount or by hand. Likewise, avoid rules on person-to-person UPI names, because the same friend might be paid back for dinner one week and for a shared gift the next.

Close the loop

A week later, look at the uncategorised list. If it is shorter, the rule is working. If wrong rows appeared in the category, tighten the condition rather than adding exceptions around it, and write down the final wording of each rule so you can rebuild it if you ever change setup.

SPENDIXAI JOURNAL

Useful ideas start with a clearer picture of your own spending.

Explore your reports