Problem
For recurring questions, the model composes the retrieval logic from scratch each time. This causes (a) extra round-trips (schema diagnosis + retry) and (b) subtle correctness errors. Observed failure patterns in production:
- Reading a convenient but empty custom field instead of computing a value from the ledger.
- Under-counting list results when a filter must go through a linked table (e.g. address/city via Dynamic Link).
- Searching the wrong field for an entity name and then giving up instead of falling back.
Proposal
- A mechanism to register curated, parametrized functions as first-class LLM tools (function calling), e.g.
bank_balance(company), units_of_property(property), suppliers_by_city(cities). The query is written and tested once by a human.
- Additionally/alternatively: let the chat execute whitelisted Query Reports and read their rows (today it can only list/link to reports). This turns ERPNext's existing, tested reports into a callable API.
Benefit
Deterministic, correct results in 1–2 instead of 3–5 round-trips. It also makes a faster/cheaper model reliable for the hard questions, reducing the need for a strong (slower) model.
Context
Feedback from production use with ERPNext v15 + Aakvatech PropMS. In an A/B test a smaller model was ~2.7x faster but failed exactly the questions that required composing retrieval logic; curated tools would remove that class of error.
Problem
For recurring questions, the model composes the retrieval logic from scratch each time. This causes (a) extra round-trips (schema diagnosis + retry) and (b) subtle correctness errors. Observed failure patterns in production:
Proposal
bank_balance(company),units_of_property(property),suppliers_by_city(cities). The query is written and tested once by a human.Benefit
Deterministic, correct results in 1–2 instead of 3–5 round-trips. It also makes a faster/cheaper model reliable for the hard questions, reducing the need for a strong (slower) model.
Context
Feedback from production use with ERPNext v15 + Aakvatech PropMS. In an A/B test a smaller model was ~2.7x faster but failed exactly the questions that required composing retrieval logic; curated tools would remove that class of error.