LLMs, GenAI, RAG, agents, evaluation · insight-1523
Normalise locale-specific numbers and dates before the model reads them
- Evidence type
- practitioner heuristic
- Difficulty
- easy
- Roles
- Applied AI, ML engineer, Data analyst
- Industries
- aviation, banking
Summary: situation, action, reason, boundary
Situation
A Turkish fare notice lists 1.299,90 TL and 03.04.2025, and the model is asked to compare amounts and count days to departure.
Action
Parse locale formats in code into typed values, pass ISO dates and unambiguous decimals together with the original string for quoting, have the model return ISO values, and test decimal-comma, thousands-dot and day-first cases.
Reason
Decimal and date conventions differ by locale, and a model reading unmarked text has to guess which one applies, whereas code can use the locale known from the source.
Boundary
Extraction, comparison and arithmetic over multilingual or cross-border documents.
Symptom or risk
The amount is read as 1.299 or the date as 4 March, so sums and deadlines are off by orders of magnitude or by months, with no error raised.
Exceptions
Text where the locale is stated unambiguously next to each value, and values the model only copies.
Trade-offs
Locale detection and parsing code to maintain, and ambiguous values still need a flag for review.
Pitfalls
Normalising in the prompt by telling the model the locale, which is not a check on its arithmetic.
Example
Hypothetical: the string 03.04.2025 is 3 April under the Turkish day-first convention but 4 March if read month-first.