RAG versus AI Agents and SQL

RAG versus AI Agents and SQL

RAG translates to Retrieval Augmented Generation and allows you to do "fuzzy matching" into your data. Fuzzy matching allows you to find training data that's relevant to a question, without the question being an exact match to your training data. For a general purpose AI chatbot RAG is amazing. But every now and then it simply doesn't solve the task.

A week ago we onboarded a new client that sells training courses for certifications related to safety for industrial workers. They wanted an AI chatbot that allows their users to ask questions such as for instance.

  • What courses are there in Denver?
  • When is the next course related to construction safety?

Doing "fuzzy matching" and RAG on the above will never give an exact answer. The reason is because fuzzy matching will return all training snippets that for some reasons matches "courses", "safety", etc. With an AI Agent, we can transpile questions such as the above into SQL, that looks up courses from an SQL database, resulting in that these prompts would end up being transpiled into for instance.

select * from courses where location = 'Denver'

This allows us to have ChatGPT and OpenAI work with our entire dataset related to the question at hand, instead of partial data filled with "noise" because of fuzzy matching pulling in irrelevant RAG training data as it searches your database. As far as we know, we're the only shop in town capable of doing this out of the box.

In the video below I am demonstrating how to create an AI Agent SaaS company, based upon our white labelling options, AI Expert System, tied together using our AI Agent technology. The process is based upon a CSV file I found at Kaggle, but you can use any CSV file you happen to have laying around. If you prefer reading text, you might want to read my previous article about turning your CSV files into an AI Agent, since this article is just a continuation of that one.

SaaS AI out of the box

By combining this with our white labelling options, allowing you to create an AI SaaS company with no-code and low-code, you can actually create an AI Agent SaaS company based upon your CSV files - And you can do it in some few minutes, without coding.

This allows you to use natural language to "query" your CSV files, and even charge users to do the same. For the record, you can also easily combine these two different axioms, by combining RAG with good old fashion SQL lookups based upon our AI Agent technology - Or to explain it according to Winnie the Pooh's words ...

Yes please, both!

Have a Custom AI Solution

At AINIRO we specialise in delivering custom AI solutions and AI chatbots with AI agent features. If you want to talk to us about how we can help you implement your next custom AI solution, you can reach out to us below.

Thomas Hansen

Thomas Hansen I am the CEO and Founder of AINIRO.IO, Ltd. I am a software developer with more than 25 years of experience. I write about Machine Learning, AI, and how to help organizations adopt said technologies. You can follow me on LinkedIn if you want to read more of what I write.

Published 12. Dec 2024

Turn your CSV file into an AI Agent

In this article I am going to explain how you can turn your CSV file into an AI Agent in 5 minutes using Low-Code, No-Code, and AINIRO's Magic Cloud.

Read More

AI Chatbot Engagement Numbers

How many website visitors are using your AI chatbot, and what can you do to increase the figures.

Read More

AI Agents the New Apps

AI Agents are growing exponentially these days. What does this imply for your company, and the way you deliver software. We'll try to answer that question in this article.

Read More