In recent times we have been hearing nonstop about things like «AI agent», «Generative AI», «...", "...", "...", "...", "..." and "...".«ChatGPT»and how it is revolutionizing the world, but in many cases we only have very vague information that does not explain in detail how we can use all the tools we have at our disposal. In this article we are going to focus on a very specific use case, as well as quite useful in many companies, especially those that are starting to have a considerable size.
Today we are going to talk about how to create an AI agent that helps us to know, find and manage information about our company. Sounds simple, doesn't it? But what happens when over time we have been accumulating countless documents, spread in turn in countless folders and with, to top it off, different versions on different dates. Many of us have found ourselves in this situation in which simply finding this information becomes a bit of a chimera. Let's see how we can solve this using AI.
AI agent with RAG, what does it consist of?
In order to create the system we have to manage two very important concepts:
- Knowledge base -> The knowledge base will be composed of our company's information, which may consist of all these documents, applications with documentation such as Confluence, our web site, etc... But the knowledge base goes further, What we will create will be a vector database, a concept that we will explain on another occasion, which will unify and relate all this information. And don't worry, the AI agent will manage it automatically, a great point to start with, isn't it?
- RAG (Retrieved Augmented Generation) -> This concept is the most important to manage precisely our knowledge base. To explain it better let's see a scheme:

As we can see in this scheme we have, on the left, our messy set of hundreds of documents, documentation, websites, processes, etc... from here, we have our vector DB, which will contain “pieces” of all these documents, etc, together with the embeedings generated by the model we have chosen to feed this database. So much for the knowledge base.
The other very important element within our system will be the model that we have chosen to search in our DB, there are already many LLMs (Large Language Models) that perform this function, this will be, so to speak, the brain of our AI agent, The one who is going to process our requests.
From this point on, the process is quite simple
- The user makes a query, for example, something related to a procedure for contacting a potential customer and verifying if he/she is already a customer or has been a customer at some point in time.
- The agent IA will act as intermediary between the user, translating their request into a search in the knowledge base
- The result of this search will be communicated to the user., Similarly, in natural language, here several things can happen
- No information found about the query
- Information is found and transferred to the user
- The user does not have permission to access this information -> The user is notified
This could end here, but this is where the magic of RAG comes in. The user, from that answer, can start a conversation, in which the IA agent maintains the context of previous queries. Not only that, these responses are also processed by the AI agent and added to the Vector DB with their embeedings The database is fed and improved through interaction with the users, even if the user provides relevant information, it will be added to the knowledge base, and will be used in future interactions with other users.
Advantages of the RAG knowledge base
As you can see, the advantages are enormous, let's highlight some of them:
- Speed in finding information. The use of Vector DBs and AI agents minimizes the time it takes to obtain the information. This alone is worth its implementation.
- Improved decision making. By having quick access to information, the decisions made by employees will be much better documented.
- Consistent knowledge base. A centralized and self-managed knowledge base prevents, to a large extent, information from being dispersed or left out of our control.
- Scalability. Using RAG and AI agents, the amount of information that we can store and, above all, manage, grows exponentially, which means that the growth of the company does not pose a problem in terms of keeping the information under control.
- Very cost effective. We can significantly reduce the cost of personnel associated with maintaining information, classifying it, etc. In the long run, the savings can be very significant by maintaining an AI-managed system to maintain our company's knowledge base and information.
Conclusion
Creating a knowledge base using RAG is a very good idea and, in addition, a very good approach to the world of Artificial Intelligence applied to companies. Combining the power of generative AI models and vector databases we will provide our company with a very powerful tool for find information quickly and efficiently, It is especially useful in companies that are starting to have a relatively important size.
Lastly, we invite you to explore our article on technology events for 2024, where you will find information on relevant conferences and events that can help you keep up to date with the latest trends in artificial intelligence and business technology.

