, but, for those interested, this enables your agent to answer questions from your own documents—policies, manuals, product descriptions, tickets—rather than relying on the LLM's general knowledge. Naturally, this greatly improves the relevance of the answers and ensures they cite current internal content. I cover the setup of the
and it's pre-requisites in a dedicated section below.
Here I can specify which schema, tables, views etc. to use.
A vector index is the searchable store RAG uses to find the most relevant pieces of your documents.
When you create it, PAF will do the following -
- Read your source documents.
- Split them into smaller chunks.
- Use the embedding model to turn each chunk into a vector—a numeric representation of its meaning.
- Store and index those vectors in the database.
How does this work at runtime?
Question → embedding vector → vector index finds similar chunks
→ RAG sends those chunks to the LLM → grounded answer
An example of leveraging such could be -
- Chat input - "How do I get a refund?"
- The index retrieves a policy section titled "Returns and reimbursements"
- The model answers, based on that content
Set this all up as follows -
Enabling RAG / Vector Indexes
Upload docs to Object Storage
Make your corporate docs available in an OCI Object Storage Bucket -
Create a new OCI Credential in PAF
This is to allow access to this bucket -
You can validate by executing the following SQL e.g. -
SELECT object_name, bytes
FROM DBMS_CLOUD.LIST_OBJECTS(
credential_name => 'OCI_OBJECT_STORAGE_CRED',
location_uri => 'https://objectstorage.us-phoenix-1.oraclecloud.com/n/NNNNNNNNN/b/niallc-orderProcessingDocs/o/'
);
Create a PAF Profile for RAG
This should specify the following values -
Now use this profile when creating the Vector Index.
Create Vector Index
Use the above values.
Please excuse the mismatch in the vector index names, between the screenshots.
You can also create the Vector index, using the following SQL -
BEGIN
DBMS_CLOUD_AI.CREATE_VECTOR_INDEX(
index_name => 'ORDER_PROCESSING_DOCS_RAG_INDEX',
wait_for_completion => FALSE,
attributes => '{
"vector_db_provider": "oracle",
"location": "https://objectstorage.us-phoenix-1.oraclecloud.com/n/nnn/b/niallc-orderProcessingDocs/o/",
"object_storage_credential_name": "OCI_OBJECT_STORAGE_CRED",
"profile_name": "OPENAI_EMBED_PROFILE",
"vector_dimension": 3072,
"vector_distance_metric": "cosine",
"chunk_size": 1024,
"chunk_overlap": 128,
"match_limit": 5,
"similarity_threshold": 0.6,
"refresh_rate": 60
}'
);
END;
/
Setup is complete, so let's use the Select AI components...
Using the Select AI Components
Select AI
In-Database Agent / Tasks
An In-Database Agent is a reusable, database-hosted AI agent definition. It runs in Oracle Database and uses a Select AI profile for its model, credentials, and data access.
Create new -
In-Database Tasks define what the agent can do -
To run this we need an I
n-Database Team -
An In-Database Team is an in-database orchestrator for one or more In-Database Agents.
It is the node that receives a user prompt and decides which attached agent(s) should handle it.
I also need an
In-Database Tool -
Tool type is set to SQL and the description I use is -
Run read-only SQL queries against the approved OrdersDB tables to answer order and customer questions.
I run in Playground -
Creating a Simple RAG Workflow
Step 1 is the ensure we have the relevant profile -
Mine is called
OPENAI_RAG_PROFILE.
The profile can be created via the UI or via the following SQL -
BEGIN
DBMS_CLOUD_AI.CREATE_PROFILE(
profile_name => 'OPENAI_RAG_PROFILE',
attributes => '{
"provider": "openai",
"credential_name": "OPENAI",
"model": "gpt-4.1",
"embedding_model": "text-embedding-3-large",
"vector_index_name": "ORDER_PROCESSING_DOCS_RAG_INDEX",
"temperature": 0.2,
"max_tokens": 1024
}'
);
END;
In the Workflow, drop the SELECT AI component -
FYI - here are my order guidelines -
So let's test the new workflow in
Playground -
I ask -
Can customers from Ireland order iBikes?
The response -
No, customers from Ireland cannot order iBikes. The order guidelines specifically state that there are no iBike sales to customers from Ireland.
Sources:
Summa Summarum
PAF is pretty powerful - rich in functionality, powered by the Oracle AI Database. Try it out, especially with OIC based MCP tools to interact with enterpise apps etc.
Cerevisia Aestiva
Today's beer is from Weissenofer Klosterbrauerei - an excellent companion to my Franconian "Sauerbraten".
This is an abbey brewery, located in the Fränkischen Schweiz, a place of natural beauty just north east of Nuremberg.
The abbey was founded in 1109, and I assumed that got brewing soon after that.
High attenuation and precise mashing meet classic Hersbrucker hops to strike the perfect balance between rich malt vibes and a smooth, crisp bitterness. Super refreshing and lively, it's brewed with pure spring water, local Franconian malt, and premium hops straight from the "Hersbrucker Gebirge" hills.
So what's with the high attenuation and precise mashing?
Attenuation refers to the percentage of sugars in the wort that the yeast successfully converts into alcohol and carbon dioxide during fermentation. What's the value-add of this? - net, net, the yeast ate almost all the sugar. This leaves very little residual sweetness behind, resulting in a dry, clean, and crisp finish rather than a heavy or sugary mouthfeel. Ant pray tellme, who doesn't want that?
Mashing is the hot-water soaking process at the very beginning of brewing that activates natural enzymes in the malt, turning starches into fermentable sugars.
Precise mashing means the Weissenhofer folks carefully controlled the temperature rests to get the exact sugar profile they wanted. This ensures the beer has a solid malt backbone and body to support the hop flavors, keeping it perfectly balanced instead of watery.
A beer with a smooth, crisp bitterness, powered by a solid malt backbone; and, at the restaurant price of 4 euros, a real steal.