When an owner types which customers owe us more than five lakh for over sixty days and gets an answer in seconds, several steps happen behind the screen. Understanding those steps helps you judge whether the answer can be trusted, and why some questions work better than others. This guide explains them without jargon.
Step one: understanding the question
The AI first works out what is being asked. In the example, it recognises a list of customers, a condition on the amount owed, a condition on how long it has been owed, and an implied date of today. It also has to understand business words: owe means outstanding receivables, over sixty days means ageing beyond sixty days from the due date or invoice date, depending on how your business measures it.
Good systems are taught the business's own vocabulary, such as what a party, a lot or a challan means in that company, so they understand questions the way staff would.
Step two: mapping to ERP records
Next, the AI maps the question to the ERP's data: the customer master, open invoices, payments and the ageing rules. In a well-designed system, the AI does not write arbitrary database queries. It uses defined tools, such as get receivables ageing with filters, that the ERP provides. This keeps answers consistent with the ERP's own reports and prevents the AI from reaching data it should not.
The safest AI does not invent its own way to the data. It uses the same doors as everyone else.
Step three: applying permissions
Before running anything, the system checks who is asking. A regional sales manager may see only customers in their region; a junior accountant may not see certain accounts. The query runs with the same restrictions the user has in the ERP, so the answer never contains anything they could not see on their own screens.
Step four: running the query and checking the result
The ERP runs the query and returns the data. The AI then checks whether the result makes sense for the question: if no customers match, it says so rather than inventing some; if the question was ambiguous, it may ask which date to measure from. Figures are not calculated by the language model; they come from the ERP.
Step five: explaining the answer
Finally, the AI presents the result in plain language, often with a short table, and links to the underlying records. It may add context, such as noting that three of the customers also have orders pending dispatch, if that is useful and permitted.
| Step | What happens | Why it matters |
|---|---|---|
| Understand | Intent and business terms identified | Answers the question actually asked |
| Map | Question matched to defined ERP tools | Consistent with reports |
| Permit | User's access rules applied | No data leaks |
| Run and check | ERP computes, AI checks sense | Accurate figures |
| Explain | Plain answer with source links | Easy to verify |
Questions that work well, and those that do not
Specific questions work best: which items, which customers, how much, since when, compared with what. Questions about things the ERP does not record, or that depend on judgement, work poorly. Asking which supplier is best will produce a comparison of recorded delivery and quality data, not a recommendation that accounts for relationships the ERP does not know about.
Works well
Overdue customers by amount and age; items below reorder level; orders due this week not yet in production.
Works with care
Comparisons across periods, where the definition of a period must be clear.
Works poorly
Opinions, predictions without data, or anything not recorded in the ERP.
Improving answers over time
As people use the system, common questions become clear. Saving them as shortcuts, adding business terms to the AI's vocabulary, and fixing the data problems that questions reveal all improve answers. Often the first benefit of natural-language queries is discovering which master data needs cleaning.
An example, end to end
Suppose a purchase manager asks: which raw materials will run out before the end of the month? The AI recognises a question about projected stock, maps it to the ERP's planning data, applies the manager's access to purchase information, and asks the ERP to project stock using open orders, planned production and incoming purchases. The ERP returns six items. The AI lists them with the date each runs out, the orders that need them and any purchase orders already placed, with links to each record. The manager can then ask a follow-up, such as which suppliers have these items, without starting again.
Follow-up questions
Good systems remember the context of a conversation, so follow-up questions such as and last month, or only for the Pune plant, refine the previous answer. This makes exploration natural: start broad, then narrow down, the way you would ask a knowledgeable colleague.
Key takeaways
- Natural-language queries understand the question, map it to ERP tools, apply permissions, run and explain.
- Using defined ERP tools keeps answers consistent and safe.
- Figures come from the ERP, not from the language model.
- Specific questions work best; opinions and unrecorded facts do not.
- Teaching the AI your business terms improves accuracy.


