
In my previous post, I used AI Vector Search in Oracle AI Database (26ai) to supplement what my Agent and associated LLM knew about personal training with my own training history and fitness statistics.
My MCP Server allows Agents to search my database for knowledge that can be used to help with their answers and task planning to carry out the orders I give them.
The results are quite good. But this is clearly also a very personal subject and example.
But Jeff, I don’t need a fitness trainer, I need an AI assistant that can help me with my business or technical tasks!
Rather than vectorizing something as private as your 5k runtime, what if you capture valuable unstructured data sets – such as Sharepoint or Confluence pages, PDF documents, or other instructional guidesand make that knowledge available to your AI tools?
A while ago I exported the Comments people left on this blog, and used them to create a dashboard, using AI. I did that to demonstrate how one can get a nice reporting console or application connected to your database, using our MCP Server, SQLcl. And yes, the results are good, and it helps me find things via Vector Search vs raw keyword or pattern search.
However, I leave the true value of this technology for granted, full of possibilities…
Search alone is basic, but RAG Pipelining search into your AI Agent to get better answers is groundbreaking
Within those 20,000+ comments are conversations and questions and answers collected over the years.
- How do I do that, in SQL Developer?
- What does this error mean?
- Why can’t we use SYS for ORDS?
LLMs have been trained in our Docs and maybe some blogs, but I know there’s good stuff in those comments.
So, let’s make that data available to our Agents, and make it easy to search with AI Vector Search SQL queries!
Step 1: Sort your data.
I’ve done that. I had downloaded a JSON export of my WP_COMMENTS table, and my Agent easily used my existing Oracle Database AI Agent Skill to move it into the database. We agreed to include the comments in CLOB.
Next, we need to vectorize the comments so they can be searched.
UPDATE thatjeffsmith_comments
SET comment_vectorized = VECTOR_EMBEDDING(
ALL_MINILM_L12_V2
USING comment_content AS data
)
WHERE comment_content IS NOT NULL
AND comment_approved = '1'
AND comment_type = 'comment'
FAIL.
The LLM ran into its first problem. It cannot vectorize CLOB directly, because its data size exceeds the BUFFER limit for text (char) data.
So, the Agent resubmits its job, and this time performs subst() on the CLOB to limit the input size to 4000 characters. That also failed, we had multibyte characters in there (stupid emojis and the occasional Chinese, Korean and Japanese conversation), so it was worth trying again, this time only fetching the first 2,000 characters. The agent resolved this issue on his own, no intervention was required from me, other than my consent.
Agents are also smart enough to make this effort executing queries, asynchronously, a native feature of our MCP Server. This means the Agent will not time out waiting for a response (default timeout is 60 seconds). Instead, it gets a job ID # that can be used to check the execution status of our SQL.

Note I don’t need to instruct the agent to do this, the agent ‘knows’ that it is necessary and our MCP Server tool description makes it very easy to choose the ‘right path’.
Now, it takes longer to run than before..almost an hour.

But, it’s done!
And then our Agent is ready to try it!
My agent also did a great job building his skills.
Let’s try it!
If I want to create an ords rest api and have case sensitive or camel case json property names, how do I do it?
Agent’s Answernote the LLM employee is Sonnet 4.6 Extended.
In summary, everything is wrong, it says you have two choices:
- alias query, for example select FIRST_NAME “firstName” from employee OR
- create a view, and rename the columns as desired
Improved RAG Answer but much better –
use JSON_OBJECT to create your own JSON and mark the columns with {} guard so ORDS knows not to touch it:
sql
SELECT
JSON_OBJECT(
'employeeId' VALUE employee_id,
'firstName' VALUE first_name,
'lastName' VALUE last_name,
'hireDate' VALUE hire_date
RETURNING CLOB
) AS "{}row"
FROM employees
That {} the prefix on the alias is a signal to ORDS: This column is already JSON, share it as is. Because you created the JSON yourself JSON_OBJECTYou have complete control over the key casing — and ORDS won’t interfere.
The agent was able to provide this advice because it was informed by my conversations with Claudiu and Herman in 2020 and 2021 respectively.
Earned Skills – this is what my agency has in store for me when I need help with our tools
final note from me, before I give a price cut of the skills – my agency put together an amazing plan to leverage this channel, look specifically at the Queries it creates and how to prioritize content
I hope you enjoyed this post, see you next time, – just Jeff
Jeff Smith’s personal advisor enhanced with RAG for SQL Developer, SQLcl, and ORDS questions. Use these skills whenever Jeff — or anyone — asks a question about Oracle SQL Developer, SQLcl, or ORDS (Oracle REST Data Services). It includes feature questions, how-to questions, bug solutions, configurations, tips, comparisons, and troubleshooting. Trigger phrases include: “SQL Developer”, “SQLcl”, “ORDS”, “AutoREST”, “REST enable”, “SQL worksheet”, “connection type”, “export data”, “Oracle REST API”, “PL/SQL gateway”, “thatjeffsmith”, “your blog”, “have you written about”, “what your readers ask”. Jeff has over 15 years of blog comments representing thousands of real customer questions and his own answers — always taken from this vector shop before answering. Trigger aggressively: if the topic touches SQL Developer, SQLcl, or ORDS in any way, use it.
Oracle Comments Jeff RAG — SQL, SQLcl & ORDS Developer
Jeff Smith is Oracle’s product manager for SQL Developer, SQLcl, and ORDS. His blog (thatjeffsmith.com) has accumulated more than 15 years of comments — more than 22,000 — representing real customer questions, bug reports, solutions, and Jeff’s own official answers.
This skill gives the power of a RAG pipe where Claude supplements his own training with a series of semantically relevant comments taken from Oracle AI Vector Search.
Always Follow This Two-Part Answer Format
Each response should have two parts:
- General Answer — Written BEFORE querying the database. Based purely on Claude’s training knowledge. What a competent Oracle expert would say.
- RAG Improved Answer — Written AFTER the vector search results in context. Base his answers in real questions and answers from Jeff’s blogging community. Surface patterns, recurring problems, specific solutions, and Jeff’s own phrases where relevant.
Don’t let database results influence general answers. Write the generic first, then the query, then write the refined part.
Database Connection
Connection name: Project Raptor 🦖 Tool: MCP SQLcl Server (sqlcl:connect → sqlcl:run-sql) ONNX Models: ALL_MINILM_L12_V2 (owned by HR scheme) Table: THATJEFFSMITH_COMMENTS Vector column: COMMENT_VECTORIZED
Connect at the start of each session:
sqlcl:connect("Project Raptor 🦖")
RAG Query
Use this template for all questions about Oracle tools. Customize USING clause that matches the question. Always use it DBMS_LOB.SUBSTR when referring COMMENT_CONTENT — it’s a CLOB.
sql
SELECT
c.comment_id,
c.comment_date,
c.comment_author,
c.comment_post_id,
DBMS_LOB.SUBSTR(c.comment_content, 2000, 1) AS comment_text,
VECTOR_DISTANCE(
c.comment_vectorized,
VECTOR_EMBEDDING(ALL_MINILM_L12_V2 USING '<search phrase>' AS data),
COSINE
) AS distance
FROM thatjeffsmith_comments c
WHERE c.comment_vectorized IS NOT NULL
[ADD FILTERS AS NEEDED — see Filter Reference below]
ORDER BY distance ASC
FETCH FIRST 8 ROWS ONLY
Setting a Search Phrase
Match the phrase with the meaning of the question:
| Topic | Examples of search phrases |
|---|---|
| SQL Developer connection issues | 'SQL Developer connection failed TNS ORA error' |
| SQLcl scripting/automation | 'SQLcl script automate command line javascript' |
| ORDS REST activation table | 'ORDS REST enable table AutoREST endpoint' |
| ORDS / OAuth Authentication | 'ORDS authentication OAuth token privilege role' |
| SQL Developer export data | 'export data CSV Excel SQL Developer worksheet' |
| PL/SQL ORDS Controller | 'ORDS PL/SQL handler POST GET source type' |
| SQLcl Liquibase | 'SQLcl Liquibase changelog schema version control' |
| SQL Developer Formatting | 'SQL Developer format code style preferences' |
| ORDS APEX Interaction | 'ORDS APEX REST service module' |
| General instructions | Use the user’s keywords verbatim |
Filter Reference
Combine filters to narrow down results:
| Target | Filter |
|---|---|
| Just Jeff’s own answer | AND c.comment_author IN ('JeffS', 'thatjeffsmith', 'Jeff Smith') |
| Just a reader question | AND c.comment_author NOT IN ('JeffS', 'thatjeffsmith', 'Jeff Smith') |
| Only recent comments | AND c.comment_date > ADD_MONTHS(SYSDATE, -60) |
| From a particular post | AND c.comment_post_id = <post_id> |
| Longer and more detailed comments | AND DBMS_LOB.GETLENGTH(c.comment_content) > 300 |
Important Facts About This Data Set
- 22,728 total comments22,638 vectorized (approved comments + Jeff replies only)
- Date range: 2010 to present — covers SQL Developer 1.x to 24.x, SQLcl, ORDS
- Author comments: A mix of Jeff’s own replies (
JeffS) and reader questions/reports - Topic: Heavily weighted towards SQL Developer UI, ORDS configuration, SQLcl CLI, connection setup, export/import, REST API design, authentication, and plugin questions
- Content type: Real support interactions — bug reports, workarounds, configuration questions, feature requests — not enhanced documentation
Interpreting Results
| Distance score | Signal |
|---|---|
| <0.35 | Strong match — high confidence |
| 0.35–0.50 | A perfect match — worth including |
| 0.50–0.60 | Weak matches — use with caution |
| > 0.60 | Bad match — re-query with a different phrase |
When returning results:
- Prioritize Jeff’s own reply — it’s an authoritative answer, not just a question
- Quote or paraphrase the actual text of the comment — the words are actually the value
- Pay attention to recurring themes — if 6 out of 8 results mention the same problem, that’s a signal
- Show the solution explicitly — this is gold for users experiencing the same problem
- Save the date — old comments may refer to UI or behavior that has changed
Example: What a RAG Answer Should Add
Typical answer: “To REST enable tables in ORDS, use ORDS.ENABLE_OBJECT or check out AutoREST in the SQL Developer REST Development panel.”
Improved RAG: “Jeff readers have encountered a few recurring hiccups here: the most common is that AutoREST fails silently when the table owner does not have the ORDS_METADATA privilege. One comment thread from 2019 shows Jeff confirming that there is a manual COMMIT needed afterwards ORDS.ENABLE_OBJECT in older versions of ORDS. Some commenters also noted confusion between enabling at the schema level vs. schema level. object level — Jeff’s default reply is check SELECT * FROM USER_ORDS_ENABLED_OBJECTS First.”
The post I created a mini RAG Pipeline to answer Oracle tools questions first appeared on ThatJeffSmith.
PakarPBN
A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.
In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.
The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.
Don’t let database results influence general answers. Write the generic first, then the query, then write the refined part.
Comments are closed, but trackbacks and pingbacks are open.