No Code Retrieval-Augmented Generation (RAG) with OCI Generative AI Agents

No Code Retrieval-Augmented Generation (RAG) with OCI Generative AI Agents

For enterprise AI models to be truly useful, they often need access to background knowledge that they wouldn't have on their own. By allowing the model to search a background knowledge base and use that information to form responses, the accuracy and usefulness of the model can improve significantly. This method is known as Retrieval-Augmented Generation (RAG).

RAG has two key components:

  • Retrieval: Searching through a corpus of information relevant to responding to a user query.
  • Augmented Generation: Using the retrieved information to form a more informed response.

Anyone who has built a RAG system will tell you that it's not a trivial process. Key steps include:

  1. Breaking down the knowledge base (the "corpus" of documents) into smaller chunks of text, typically no more than a few hundred tokens.
  2. Using an embedding model to convert these chunks into vector embeddings that encode semantic meaning.
  3. Storing these embeddings in a vector database that enables semantic similarity searching.
  4. Retrieving the most relevant chunks from the vector database based on their similarity to a user query.
  5. Adding the relevant chunks to the prompt sent to the generative model.
  6. Generating a response based on this enriched prompt.

Building a RAG system demands significant coding, knowledge of APIs, and extensive testing for retrieval accuracy.

But with the OCI Generative AI Agents Service , all of this complexity is abstracted away. This new service offers a pure No-code approach to RAG, allowing you to build a system in just three simple steps.


A No-Code RAG System in Three Easy Steps

Here's how easy it is to get started with OCI Generative AI Agents:

Step 1: Create a Knowledge Base

To test the service, I uploaded transcripts from our OCI courses—covering topics like DevOps, Multicloud, Security, Data Science, Architecture, and Development—into an OCI Object Storage bucket. These transcripts span hundreds of pages and cover the depth and breadth of OCI services.

Course Transcripts
Course Transcripts (Data Source)
Knowledge Base with transcripts added as data source

Step 2: Create an Agent

Next, I created an agent for the knowledge base. This process takes some time, as the agent needs to ingest the data (adding files from OCI Object Storage to the data source).


Create Agent with the Knowledge Base created earlier

Step 3: Test Your Agent

Once the agent is ready, you can test its ability to generate insights and answer questions based on your data. I tested the chatbot across several levels:

Knowledge Recall: It performed well in recalling basic information. For example, I asked about the instructors for a specific course, and it returned the correct answer.

Knowledge recall

Understanding Concepts: I asked how to access OCI Object Storage without traversing the public internet, and it correctly provided information about OCI Storage Gateways and the Oracle Service Network. So far, so good. But could it apply concepts in more complex scenarios?

Understanding concepts

Applying Concepts: To push the limits, I presented a real-life troubleshooting question:

When trying to encrypt plaintext using the Command Line Interface (CLI), a developer gets a "Service Error" message. Here's the command they used:

oci kms crypto encrypt --key-id ocid1.key.oc1.iad.bbptfrr5aaeuk.abuwcljt32arg6e6xlswgluvc52lnrtk62jq7jenfejfxlhb46nkav3zhsta --plaintext foobar --endpoint https://bbptfrr5aaeuk-management.kms.us-ashburn-1.oraclecloud.com        

What is the most likely reason for the error?

A. The plaintext needs to be in JSON format.

B. The developer forgot to specify the region.

C. The developer has the wrong endpoint.

D. The developer should pass the key version OCID instead of the key OCID.

OCI Generative AI Agents response:

Applying concepts

Our courses typically don’t cover OCI CLI commands in depth, so the agent had to find the most relevant chunk of text, based on semantic similarity. Impressively, it not only gave the correct answer (the wrong endpoint was used), but it also provided a citation from a lesson on OCI Vault management and cryptographic operations. This is a perfect demonstration of how semantic similarity outperforms simple keyword searches.


Final Thoughts

While I haven’t fully tested the service, I’m very impressed with the retrieval accuracy of OCI Generative AI Agents. It’s worth noting that this service also integrates with Oracle Database 23ai vector search for even more precise and complex queries.

For users with limited technical expertise, this is a fantastic way to build and benefit from a RAG system—without writing a single line of code. We are truly democratizing RAG!

Give it a try and share your experience.

Thanks for reading!


Alden Do Rosario

CEO - CustomGPT.ai

1 个月

Good work -- and nice to see Oracle democratizing RAG -- but to be honest, can you please confirm the definition of "limited technical expertise" -- to be truly democratic, the lady in the support department needs to be able to build RAG agents without IT help .. is that possible?

回复
Hrijul Dey

AI Engineer| LLM Specialist| Python Developer|Tech Blogger

1 个月

Just discovered #RAGatouille – it's like having your own sous-chef for AI! Streamlining NLP tasks with ease, from Q&A to doc retrieval. https://www.artificialintelligenceupdate.com/retrieval-augmented-generation-ragatouille/riju/ #learnmore #AI&U

回复
Hrijul Dey

AI Engineer| LLM Specialist| Python Developer|Tech Blogger

1 个月

Excited about Retrieval Augmented Generation? Meet RAGatouille! It simplifies training AI models for NLP tasks like never before. Could this be a game-changer for your machine learning projects? #ML https://www.artificialintelligenceupdate.com/retrieval-augmented-generation-ragatouille/riju/ #learnmore #AI&U

回复
Ajay Solanki

oracle database performance tuning

1 个月

Very helpful

要查看或添加评论,请登录

Rohit Rahi的更多文章

  • Creating an Oracle Cloud Infrastructure AI Chatbot with OpenAI

    Creating an Oracle Cloud Infrastructure AI Chatbot with OpenAI

    Oracle Cloud Infrastructure (OCI) is a cloud computing platform that provides 100+ services, including compute…

    31 条评论
  • 100,000 OCI Certifications

    100,000 OCI Certifications

    Last week, we hit a major milestone: we crossed 100,000 OCI certifications! And the scale is truly global – we have OCI…

    134 条评论

社区洞察

其他会员也浏览了