Delivery, material and finance data lived in three separate systems across several plants: an ERP, a warehouse system and an order-management system. A simple question such as which orders will miss dispatch this week took three people most of a day, passed through spreadsheets, and was stale by the time it reached the manager who asked. People learned to stop asking.
Most failures we had seen in this space were not wrong SQL. They were a word that meant two things in two departments, or a join that looked valid and was not. So before any model was chosen we sat with the people who answer these questions today and wrote the rulebook down: the business glossary, the metrics, and the only joins that are allowed. The assistant reads that rulebook. It does not invent one.
Nine stages, three early exits. Out of scope stops. A vague question gets a clarifying prompt instead of a confident guess. A close match in the semantic cache replays a known-good query, still executed fresh and still validated.
Three live business systems feed an hourly incremental ingest into a layered warehouse. A separate control-plane database holds what makes the assistant trustworthy: the table catalogue, the business glossary, the join registry, curated examples, users and feedback.