Viscosity
logo-black
  • Data
    • Database Services
      • Performance Assessment
      • Proactive Healthcheck
      • Database Migration & Consolidation
      • Performance Tuning
    • Microsoft Services
      • Microsoft Azure Services
      • Microsoft SQL Server Services
      • Microsoft Gold Azure Partner
    • Oracle Services
      • Oracle Database 19c
      • Oracle Database 23ai
      • RAC
      • GoldenGate
      • Data Guard
      • Oracle & SQL Database
    • Viscosity Remote Services
  • Apps
    • App Dev Services
    • Oracle APEX
    • Viscosity AMP
    • Viscosity-ai
    • Shane-ai
  • Cloud
    • Cloud Services
    • Hybrid Cloud
    • Viscosity Edge Cloud
    • Virtualization & Cloud Expertise
    • Microsoft Azure Services
  • Infrastructure
    • Infrastructure Services
    • Exadata
      • Exadata Resale & Services
    • Oracle Database Appliance
      • Oracle Database Appliance Resale & Services
      • ODA Health Checks
    • Zero Data Loss Recovery Appliance
    • VMware to KVM Migration
  • Events
    • Upcoming Events
    • Virtual Training
    • 2025 Past Events
    • 2024 Past Events
    • 2023 Past Events
    • 2022 Past Events
  • About
    • About Us
    • News
    • Blogs
    • Publications
    • Contact
Hit enter to search or ESC to close
ENGAGE WITH US

Application Development , vector database , Oracle Database 23ai , semantic search

On the Eighth Day of 23ai, Viscosity Gave To Me…

By Javier Golon
December 17, 2024

Unlock the Power of Oracle 23ai Vector Search

Oracle is equipping developers with cutting-edge tools to explore the fascinating world of AI, and Oracle 23ai is no exception. Packed with features like support for large language models (LLMs), modern data types, and vector databases, it’s revolutionizing workflows—starting with search!

 

Let’s dive into how Oracle 23ai’s vector database can transform your search experience, allowing you to seamlessly search structured and unstructured data based on semantics or meaning.

 

Users rely on exact matches in traditional keyword searches (e.g., Oracle APEX grids). But what if you could enable semantic search, where users explore data based on intent or context? It’s like speaking naturally to your database—enabling more human-centric and meaningful interactions with your data.

 

How to Get Started

Setting up vector database search in Oracle 23ai is straightforward. Here’s an overview:

  1. Install Oracle 23ai
    Start with the free version in the cloud or on-premise.
  2. Create a Database User
    Connect as System and set up a dedicated user to manage your models and data.

    GRANT DB_DEVELOPER_ROLE TO DEMO_USER identified by password123;

     

    GRANT create mining model TO AI_DEMO;

  3. Load an Embedding Model
    Use a pre-built ONNX file for the embedding model provided by Oracle or upload your custom model.

    CREATE OR REPLACE DIRECTORY DM_DUMP as 'ONNX directory path>';

    GRANT WRITE ON DIRECTORY dm_dump TO DEMO_USER;

    GRANT READ ON DIRECTORY dm_dump TO DEMO_USER

     

    exec DBMS_VECTOR.DROP_ONNX_MODEL(model_name => 'DOC_MODEL', force => true);

     

    EXECUTE DBMS_VECTOR.LOAD_ONNX_MODEL(

    'DM_DUMP',

    'embedding_model.onyx',

    'doc_model');

  4. Vectorize Your Data
    For this example, we’ll vectorize a job listings table with fields like job title, required skills, location, and description.

       CREATE TABLE JOB_LISTINGS_VECTOR(

           JOB_LISTINGS_VECTOR_ID     NUMBER GENERATED BY DEFAULT AS IDENTITY,

           JOB_TITLE                   VARCHAR2(512),

           REQUIRED_SKILLS             VARCHAR2(512),

           LOCATION                   VARCHAR2(512),

           DESCRIPTION                 VARCHAR2(2000),

           VEC                         VECTOR,

           CONSTRAINT JOB_LISTINGS_VECTOR_PK PRIMARY KEY(JOB_LISTINGS_VECTOR_ID)

       );

      

       INSERT INTO JOB_LISTINGS_VECTOR        (JOB_TITLE,REQUIRED_SKILLS,LOCATION,DESCRIPTION,VEC)

       SELECT

           JOB_TITLE,

           REQUIRED_SKILLS,

           LOCATION,

           DESCRIPTION,

           TO_VECTOR(VECTOR_EMBEDDING(DOC_MODEL USING JOB_TITLE AS DATA, REQUIRED_SKILLS AS DATA1, LOCATION AS DATA2, DESCRIPTION AS DATA3))

       FROM JOB_LISTINGS_DUMP;

  5. Perform a Similarity Search
    Use the vector database to compare query vectors and retrieve the top matches based on proximity, rather than exact distance.

Let’s say a user is looking for jobs related to “Leadership and Management.”

 

Traditional keyword-based search limits results to exact matches or predefined synonyms. However, vector search unlocks a new level of intelligence by understanding the semantic meaning of the query.

 

Instead of rigid word matching, the vector database retrieves jobs conceptually related to leadership and management—even if those exact terms don’t appear in the data.

 

SELECT job_listings_vector_id,job_title,required_skills,location,description

FROM job_listings_vector

order by vector_distance(vec, TO_VECTOR(VECTOR_EMBEDDING(doc_model USING 'Leadership and Management' as data)), COSINE)

 

 

JOB_TITLE

DESCRIPTION

HR Manager

Oversee HR processes, recruitment, and employee relations.

Social Media Manager

Manage and grow the brand's presence on social media platforms.

IT Manager

Oversee IT infrastructure, manage team, and ensure network security.

Operations Manager

Oversee daily operations and manage logistics for efficiency and growth.

 

 

Semantic Search in Action

Imagine integrating this into an Oracle APEX component: users can search for jobs by meaning—like “roles requiring AI skills”—instead of exact keywords. The result? A smoother, more intuitive search experience.

 

For this example, we’ve paired Smart Filters with the Cards Region in Oracle APEX to showcase job listings. The magic lies in the SQL function that powers the data source, retrieving results based on vector distance.

 

Query = “I want to work with machine learning and artificial intelligence.”

 

 

Search = “I'm interested in marketing and content creation roles.”

 

 

With Oracle 23ai, semantic search powered by vector databases brings a revolutionary shift to how we interact with data. Moving beyond exact keyword matches, it enables context-driven, intuitive search experiences that cater to the user’s intent.

By integrating these advanced capabilities into your applications—like in Oracle APEX—you can unlock smarter, faster, and more human-centric data retrieval. Whether you're navigating job listings, exploring content, or analyzing complex datasets, Oracle 23ai is your gateway to a future where AI and data work seamlessly together.

Start your journey with Oracle 23ai today, and transform the way your users discover and interact with information!

Happy Holidays! 🎄

All posts
About Author
Javier Golon

Javier Golon is a systems engineer with extensive experience in development using Oracle APEX. He currently works as a software developer at Viscosity, where he leads and collaborates on significant projects, standing out for his adaptability, problem-solving skills, innovation in solutions, and creativity in his work. In his free time, he enjoys watching movies of various genres. He is also a sports enthusiast, regularly playing soccer and swimming to stay in shape. His greatest passion is volcano climbing, an activity that allows him to combine his adventurous spirit with the exploration of stunning and challenging natural landscapes.

You might also like
On the Sixth Day of 23ai, Viscosity Gave To Me…
On the Sixth Day of 23ai, Viscosity Gave To Me…
December 17, 2024
SUBMIT YOUR COMMENT
logo for footer

Viscosity's core expertise includes:

Data Transformation, Emerging Technology, High Availability & Scalability Solutions, Cloud Migrations, Performance Tuning, Data Integrations, Machine Learning, APEX Development, and Custom Application Development.


Solutions

Resources

Partnerships

Careers

Clients

 

Contact
Email: sales@viscosityna.com

Telephone:
(469) 444-1380

Address:
3016 Communications Pkwy Suite 200, Plano, TX 75093

Copyright 2025. All Rights Reserved by Viscosity North America.