The business question
Enterprise information is often locked behind schemas, reports and specialist SQL knowledge. The prototype explores how an analyst can ask a business question in natural language and inspect the database query produced to answer it.
Actual demo architecture
The application uses SAP Business One SBODemoGB on Microsoft SQL Server 2022 in a container. A Streamlit/Python front end uses pymssql and pandas, with local Ollama inference including qwen2.5-coder:7b. English and Arabic prompts are translated into T-SQL.
Schema awareness and traceability
Automatic schema discovery and relevant-table selection were developed to reduce irrelevant context. For sales analysis, the work specifically considered OINV, INV1 and OITM. Generated SQL and returned results are inspectable rather than presented only as a conversational answer.
Status and next boundary
This is a working prototype on demo data, not a confirmed production SAP integration. Evaluations encountered long runtimes and model/API errors. Strong read-only enforcement, per-user permissions and query-validation controls must not be assumed without code evidence. Documents, CSV and Excel files outside SAP were discussed as future integration needs; a lakehouse was considered but not built as part of this demo.