← Back to projectsNatural language to inspectable SQL

Conversational analysis of SAP Business One

A local AI-assisted application converts English and Arabic questions into T-SQL against a SAP Business One demo database, with queries and results available for inspection.

Evidence / statusWorking prototype against demo data
01

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.

02

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.

03

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.

04

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.

Explore related engineering work across our portfolio.

View projects ↗