Skip to main content

20 posts tagged with "machine learning"

View All Tags

Use Local LLMs with Oracle AI Vector Search

· 7 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

Oracle Database 23ai and Ollama logos together.

There a few reasons why we would want to perform "generative AI" tasks, such as generating embeddings, summary, and text, using local resources, rather than relying on external, third-party providers. Perhaps the most important ones are data privacy, costs, and the convenience of choosing what large language models (LLMs) to use. About four months ago, I wrote that with the Oracle Database 23ai 23.5.0.24.06 release on the Oracle Autonomous Database (ADB), it was possible to create the credentials to access these third-party LLMs through their REST APIs. Fast-forward, my ADB now has the upgraded version 23.6.0.24.10 that has support for "local" third-party REST providers, specifically, Ollama. In this article, I will demonstrate how you can utilise other Oracle Cloud Infrastructure (OCI) managed resources to quickly get started.

Build a Low Code RAG Application #JoelKallmanDay

· 14 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

A shelf full of encyclopedias

In previous blog posts, I described how you can create a question and answer application using LangChain and the Oracle Cloud Infrastructure (OCI) Generative AI service. With the Oracle Database 23ai release, we looked at the power of AI Vector Search. This no-cost, built-in database feature provides another alternative to create Retrieval Augmented Generation (RAG) applications using just PL/SQL. However, both solutions require a good amount of code. With the recent availability of the OCI Generative AI Agents service, you can rapidly create a RAG application using low code!

Resolved! Creating Credentials for AI Vector Search on Oracle Database 23ai ADB

· 3 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

Jigsaw puzzle pieces painted on a wall.

In my previous blog post on Get Started with Oracle Database 23ai AI Vector Search, I mentioned that it was not yet possible to use third-party REST APIs to perform tasks like generating embeddings and text.

This is only the tip of the iceberg. Next up is text generation but there is currently an issue that prohibits the adding of credentials required to work with third-party REST APIs using the DBMS_VECTOR and DBMS_VECTOR_CHAIN packages on the ADB. Hopefully, this will be fixed very soon.

I am happy to post that with the latest 23.5.0.24.06 database release update, this is no longer an issue!

Get Started with Oracle Database 23ai AI Vector Search

· 9 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

An enigma machine.

While preparing for my upcoming Kscope24 presentations, I thought I'd introduce a section on Oracle's recently announced AI Vector Search that is now generally available with the Oracle Database 23ai rebranding and release. At the time of writing, you can either provision the new version of the database on the Oracle Cloud Infrastructure (OCI), download the Oracle Autonomous Database (ADB) Free container image, or the Oracle Database 23ai Free. On the OCI, you can either provision an Always Free ADB, or an Oracle Base Database service instance.

The documentation provided by Oracle is comprehensive and should get you started. Here, I condensed everything that I have learned so far into a step-by-step guide to get you started quickly.

Querying the Database in LangChain Style

· 7 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

Robots communicating with a tin cans

Staring from langchain_community version 0.0.31, Oracle introduced a new LangChain document loader that allows you to load the results of an SQL query, against an Oracle Autonomous Database (ADB), as documents that your retrieval-augmented generation (RAG) application can use for text generation tasks. In a previous article, I described how the select ai feature available in ADBs combines the use of database metadata and large-language models (LLMs) to generate an SQL statement that answers a question asked in natural language. In this article, we will take a quick look at how we can load data from the ADB, generate embeddings, then use an LLM to respond to human questions.

Implement a Topic-specific Q&A Application with LangChain and Oracle GenAI

· 8 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

An Aedes mosquito resting on human skin, taking a blood meal.

Now that I caught your attention, I hope the image isn't too triggering. I grew up learning to fear these little black monsters that potentially carry a load of Dengue virus that could make you really sick. As recently reported, the disease continues to be an issue in Singapore. During my undergraduate years, I was deeply passionate about viral diseases, and spent a few months in the laboratory learning to characterize the structural components of the virus using cyrogenic electron microscopy. Hence, when Luc Demanche challenged me again to demonstrate retrieval-augmented generation (RAG), I decided to collect and use a few recent articles (PMIDs 38140548, 37478848, 37114191), and use them to create a quick proof-of-concept Oracle APEX application that allows the user to ask questions about the disease. These articles cover topics on the Dengue virus, its genomics and ultrastructure, and progress in vaccine development.

Don't GenAI Everything

· 11 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

A flagger stopping a truck on a remote dessert highway.

In case you missed it, for the last few blogs posts, I had been using Stability AI's Stable Diffusion model to generate the banner images, and I have been mostly successful. Did I really need to? Perhaps not. For this post, I spent almost 30 minutes trying to figure out the "right" prompt to generate the image I wanted: "A car stopped in front a stop sign."

GenAI Made Easy

· 13 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

Photo of a robot ruling the planet.

A new year, a new product! Yesterday, Oracle announced the general availability of the OCI Generative AI (GenAI) service. In my final blog post last year, I briefly looked at the beta information that was available to the public, and suggested how you can quite easily add powerful GenAI capability in Oracle APEX applications by calling the REST APIs using APEX_WEB_SERVICE. With the service in GA, I am now finally able to take a deeper dive and hopefully, help you get started.

A Yearful of AI But What's Next?

· 13 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

A beautiful winter sunrise in Whitehorse, Yukon, Canada.

In the last one year since OpenAI popularised generative AI, a lot of the excitement and intrigue have been centred on the generative power of large language models (LLMs) or foundational models. Understandably so. However, the generative power of this models only cover a segment of business needs. The underlying promise of these frontier models is in its ability to "understand" natural language, and that to me, is where we will find more utility.

For the last few years at Insum, we've had an almost biannual tradition of reviewing what's been going on in the AI/ML space, in particular, around what Oracle has been doing to provide innovative solutions and tools. If you missed those, I have provided the links below. In the absence of an updated review, I am hoping that this final 2023 blog post would serve somewhat as a stopgap.

Generate Art Using Latent Diffusion Models and NFC Tags

· 11 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

Photo of a bird perched on a tree, generated using a Stability Diffusion model.

In my previous post, you read about how I performed fine-tuning and deployed a large language model (LLM) on the Oracle Cloud Infrastructure (OCI) Data Science service. Here, I was hoping to do the same with the Stable Diffusion XL, a Latent Diffusion Model (LDM), but unfortunately, the platform currently does not support a Hugging Face pipeline using this model. I found an alternative, and you will read about it later in this article.

To demonstrate its utility, I create a simple Oracle APEX application that reads NFC tags using the experimental Web NFC API, and then displays an image generated by the deployed machine learning (ML) model.

Deploy and Use Fine-Tuned LLMs in Oracle APEX

· 10 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

LLMs for analyzing customer reviews.

In my previous post, I wrote about how a scikit-learn machine learning (ML) could be trained and deployed on the Oracle Cloud Infrastructure (OCI) Data Science service. The model is deployed on the service's managed infrastructure, allowing developers to simply call a HTTP endpoint to perform ML model inference on the submitted data. In my latest adventure, I built an Oracle APEX application that takes product reviews and then automatically ranks the review using a fine-tuned large language model (LLM) available through Hugging Face.

Predict the Rugby World Cup 2023 Winner

· 4 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

Woman in a crystal ball

This has been one of those weeks where I couldn't wait to wake up and get to work. Just last week, Luc Demanche threw me a challenge and asked that I help develop an Oracle APEX application that could be used to predict the winner of the Rugby World Cup 2023 (RWC2023). I couldn't resist the challenge!

Speaking AI to Your Oracle Database

· 7 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

A woman speaking to an Oracle.

One of the key highlights at Oracle Cloudworld 2023 is general availability of Select AI feature that allows anyone to query the Oracle Database using natural language. This is likely made possible with a template wrapping the database metadata with the prompt, and then calling either the OpenAI or Cohere APIs to generate the intended text.

Train an AI Model to Recognize Oracle APEX Challenge Coins

· 8 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

Black Star Line Stock Certificate

Doug Gault had suggested a while ago that I could bring more awareness to the Oracle APEX Challenge Coin project if I had an Oracle APEX application that plots the location of each sponsored coin on a world map. I agree. However, aside from a lack of time, I had also wanted to find interesting ways for awardees to submit their claim of ownership. Over the last week, I had worked on making this dream of a "claims" map a reality with the use of the Oracle Cloud Infrastructure (OCI) Vision AI service, more specifically, its custom model training feature.

Here's an early preview of the claims process in the Claim My Oracle APEX Challenge Coin application.

Revolutionising Language Learning: How AI and Oracle APEX Transform Everyday Challenges

· 11 min read
Adrian Png
Director of Innovation, AI and Cloud Solutions @ Insum, a Talan Company

I'm finally finding more time, post-conference, to catch up on my writing. In this latest post, I'd like to talk about a presentation that I did at Kscope23, "Solving Everyday Problems with the Oracle Cloud". During the session, I had described and demonstrated how we can use the Oracle Cloud Infrastructure (OCI) AI services and Oracle APEX to build compelling solutions, even for personal life challenges.