Building an “Ask My Document” Feature in Oracle APEX
AI-Powered RAG Using Oracle 23ai
At Oracle APEX UTSAV 2025, we explored how Oracle APEX applications can move from being form-driven systems to intelligent, context-aware platforms. One of the most practical examples discussed was building an “Ask My Document” feature using Retrieval-Augmented Generation (RAG) with Oracle 23ai .
This article walks through the concept, architecture, and the live demo applications showcased during the session.

Why “Ask My Document” Is a Real Enterprise Need
Enterprise systems are full of documents, but users still struggle to get answers.
Searching PDFs, opening multiple files, or relying on manual interpretation slows everyone down. What users really want is simple:
“Let me ask a question and get an answer from my documents.”
The “Ask My Document” feature solves this by combining:
- Oracle Database
- Oracle APEX
- AI capabilities from Oracle 23ai
All without breaking security or governance.
AI in Oracle APEX: A Practical Foundation
Oracle APEX already excels at rapid application development. With Oracle 23ai, it now supports intelligence natively.
From the session, AI in APEX enables :
- Automation of repetitive tasks
- Smarter user interactions
- AI-assisted reporting and insights
- Faster and more accurate decision-making
This is not about replacing logic. It is about enhancing applications where human input slows things down.
Understanding RAG in Simple Terms
Retrieval-Augmented Generation (RAG) works in two steps:
- Retrieve relevant information from your own data
- Generate an answer using only that retrieved content
For “Ask My Document”:
- AI does not invent answers
- Responses are grounded in your documents
- Data ownership stays with your database
This makes RAG ideal for enterprise APEX applications.
High-Level Architecture
The architecture demonstrated during the session is simple and production-ready :
- Document Storage Documents stored in Oracle Database or object storage.
- Content Processing Text is extracted and prepared for semantic search.
- Vector Search Using Oracle 23ai User questions are converted into vectors and matched with relevant document sections.
- AI Response Generation AI generates answers strictly from retrieved content.
- APEX User Interface Users interact through a clean, chat-style or search-driven UI.
Demo Applications Shown in the Session
To prove this works in real scenarios, multiple live demo applications were presented. Each demo focused on a different business use case, but all used the same core AI pattern .
1. General AI Integration Application
This demo showed how easily AI can be embedded into an Oracle APEX app.
What it demonstrated:
- Calling AI services using the APEX_AI package
- Accepting free-text user input
- Returning structured, readable AI responses
This app acted as the base for experimenting with AI before applying it to domain-specific use cases.
2. AI-Based Diet Suggestion Application
This demo focused on personalised recommendations.
Key highlights:
- User inputs basic health and diet preferences
- AI analyses the input
- Suggestions are generated instantly
This showed how AI can enhance decision support without complex UI or external systems.
3. Story Writing and Content Suggestion Application
Here, AI was used for content creation and enrichment.
What users could do:
- Generate short stories or content ideas
- Get suggestions based on topic or theme
- Improve existing content using AI assistance
This demo clearly showed that APEX is not limited to transactional systems. It can support creative workflows as well.
4. Knowledge Base Collaboration Application
This demo aligned closely with the “Ask My Document” concept.
Key capabilities:
- Centralised knowledge base
- AI-assisted search across documents
- Context-aware answers instead of keyword matches
This is the most direct example of how RAG fits naturally into enterprise APEX applications.
APEX_AI Package in Action
All demos relied on the APEX_AI package, which allows developers to:
- Call AI features from PL/SQL
- Control prompts and responses
- Integrate AI logic into normal APEX processes
The important takeaway is that AI feels like part of APEX, not an external add-on .
Where This Approach Fits Best
The “Ask My Document” and related AI demos are ideal for:
- HR and policy portals
- Compliance and audit systems
- Internal knowledge bases
- Support and helpdesk tools
- Training and documentation platforms
Instead of training users to search better, we let the application understand questions better.
Key Takeaways
- Oracle APEX is AI-ready today.
- RAG provides safe, reliable AI responses.
- Oracle 23ai enables powerful vector search inside the database.
- Demo applications prove this works in real scenarios.
- AI + reporting creates even more value in enterprise systems.

Final Thoughts
AI in Oracle APEX is no longer experimental.
It is practical, controlled, and ready for real-world use.
The demos shown at Oracle APEX UTSAV 2025 clearly demonstrated that features like Ask My Document are achievable today using Oracle APEX and Oracle 23ai.
