Architecture
User questionOracle APEX UISelect AI (DBMS_CLOUD_AI)LLM → SQLAutonomous DB
The problem
Business users depended on engineers for every ad-hoc report. The data already lived in Oracle — the goal was safe self-service querying on top of it.
Approach
- Built on Oracle APEX with Oracle Select AI (DBMS_CLOUD_AI) on OCI Autonomous Database.
- Used OpenAI GPT-4o-mini as the SQL-generation model, scoped to an approved schema.
- Delivered two architectures: a pure PL/SQL APEX region and a FastAPI backend for use outside APEX.
Outcome
- Users get answers and the generated SQL side by side, so results can be checked.
- Two deployment options, so the same capability can serve APEX apps and external front ends.