Presentation Script — Oracle ERP RAG Chatbot
1. Project Overview
Good [morning/afternoon], everyone.
Today, I’ll be presenting an overview of our Oracle RAG (Retrieval-Augmented
Generation) Chatbot — an AI-driven solution that allows
business users to query Oracle data using natural language.
This system intelligently combines semantic search, intent classification, and AI-
powered SQL generation to provide accurate, context-aware responses to user
queries.
In simple terms, it bridges the gap between complex ERP data and business users —
enabling data access through plain English.
2. Background and Business Need
Before we get into the details, let me briefly explain why we initiated this.
As part of our modernization journey, we migrated from Oracle ERP On-Premises to
Oracle SaaS in 2022. During this migration, we retained five years of historical
data within the SaaS platform. Data older than that was moved to an Archive
(History) Database for compliance and audit purposes.
Now, our business partners — especially in finance and audit — still need access to
that older historical data for ongoing audit and reconciliation activities.
Previously, when we were on-prem, they could easily access this information using
Oracle Apps front-end screens or OBIEE reports.
But now, with that data residing in the Archive DB, they must depend on IT teams to
extract the data for them.
This manual process creates bottlenecks, increases turnaround time, and diverts IT
resources from higher-value work.
The RAG Chatbot solves this problem by providing a self-service interface where
business users can simply type their question — for example,
“Show me all invoices created in the US Business Unit in October 2025” —
and instantly get the required information, without needing IT intervention.
This not only improves agility but also reduces dependency and enhances data
accessibility across the organization.
3. Architecture and Data Flow
Now, let’s look at the technical architecture of the solution.
With that now lets looks at Technology Stack : as part of this solution
Frontend: Streamlit web application
Backend: FastAPI REST services
Vector Database: PostgreSQL with pgvector extension (for semantic search)
Source Database: Oracle Enterprise 21c
AI Models:
Azure OpenAI (GPT) – for SQL generation
SentenceTransformers – for embeddings
Lightweight rule-based intent classifier – for cost-effective intent detection
Authentication & Authorization:
SSO-based authentication (planned for enterprise integration)
Role-based access control (RBAC) by ERP module and Business Unit
SECURITY MODEL
We’ve designed a three-tier security model:
User Authentication: Secure login with SSO planned for production.
Module Authorization: Access limited to specific ERP modules such as AP, AR, GL, or
PO.
Business Unit Filtering(RBAC): Automatic row-level filtering of data based on
user’s BU access rights.
This ensures that users see only the data they are entitled to, maintaining both
compliance and security integrity.
4. Application Workflow
Let’s now walk through the complete application flow, divided into three main
phases.
Phase 1: Initialization
User launches the Streamlit web app.
FastAPI initializes with Oracle and PostgreSQL connection pools.
Schema chunks (metadata) are preloaded into PostgreSQL as vectors — this happens
only once.
User logs in and their module/BU access rights are fetched.
Phase 2: Query Processing
When a user enters a query such as:
“I need invoices created in the US BU in October 2025.”
Here’s what happens under the hood:
The request goes from Streamlit → FastAPI → /chat endpoint.
The system classifies the intent as DATA_QUERY with high confidence.
User authorization is validated for the AP module.
A semantic (vector) search retrieves relevant schema chunks related to invoices.
Contextual information — such as FINGAP.GENAI_INVPAYMENT_DETAIL_VIEW — is added.
Azure OpenAI (GPT) generates a SQL query dynamically.
A security validation step ensures SQL whitelisting and injects BU filters
automatically.
The SQL executes securely on the Oracle DB.
Results are returned to the user in an interactive table — along with the generated
SQL for transparency.
The system logs the entire interaction for auditing and traceability.
Phase 3: User Feedback and Continuous Learning
The user reviews both the SQL and the results.
If the output is correct, they can accept it — this logs positive feedback.
If not, they can reject it and provide comments — capturing valuable training data.
These logs are analyzed periodically to continuously improve query understanding
and SQL generation accuracy.
5. Business Impact and Next Steps
This project demonstrates how AI can modernize ERP data access — turning complex
database queries into simple conversational requests.
Key benefits include:
Self-service analytics for business users
Significant reduction in IT dependence
Faster audit and reporting cycles
Secure and role-aware data access
Scalable architecture, ready for enterprise deployment
Our next step is to move from local proof-of-concept to a secured enterprise
deployment on Azure AKS, integrated with SSO, TLS, and centralized monitoring.