RAG KI – Enrich language models with company data

Large language models (LLMs) already have a large number of application areas in e-commerce, but they have a decisive limitation: an LLM can only access the data on which it was trained; it does not have any additional knowledge.

Ecommerce IT ‐ 17. May 2024

AN LLM AND ITS LIMITS

If a Large Language Model (LLM) has only been trained once and companies do not want to bear the costs of training it again and again, at a certain point it becomes obsolete.

The solution: Retrieval Augmented Generation (RAG).

RAG – WHAT IS THIS?

RAG is a system that forwards an incoming question to the LLM. First, however, a specially prepared vector database is searched for all data relevant to this question. These are then transmitted to the LLM by means of prompts.

The LLM therefore not only has to rely exclusively on its trained knowledge, but also receives all the relevant data with the question.

RAG KI - Infografik

SAVE TIME, COSTS AND RESOURCES

By using a RAG, the LLM is no longer dependent on constant “training” and still works with all existing data. As soon as new data is available, it can be loaded into the vector database and is available for every new request via the RAG system. This saves effort at several ends in the long term, and the process is automated.

HOW? – TWO PROCESSES MAKE IT POSSIBLE

The data is prepared at the beginning. The data is stored in a vector database and, in most cases, normalized and split.
In most cases, it is also processed, normalized and split. In addition, data such as writing texts, program code, images or audio require their own processing.

In the second process, the user’s question is answered. Here, the RAG accesses the vector database and searches for the relevant data that can be found thanks to the previous preparation of the data. The data is then transformed once again to provide a meaningful context for the LLM.

WHAT DOES THE VECTOR DATABASE HAVE TO DO WITH IT?

The special feature of the RAG system is the vectorization of the data and the storage in a vector database. This contrasts with “normal” rational databases, which are stored in tabular form. While the queries here are based on the values of the entries themselves, a vector database is queried according to the number of data entries that resemble a data entry. This allows the RAG system to find the text passages in its vector database that are most relevant to the question. These relevant text passages in the documents are then forwarded by the RAG to the LLM.

PROMPT ENGINEERING

Prompt engineering refers to the input that is given to an LLM. In relation to a RAG system, this refers to the user’s question, the context and the instructions that are passed to the LLM to generate the response. A corresponding prompt is required so that each step of the implementation in the RAG is taken over by an LLM.

RAG FEATURED BY MEDIENWERFT

In order to always be able to offer our customers state-of-the-art solutions in e-commerce, the topic of AI with RAG was on our agenda early on. Even before the first customer inquiries, we started developing a RAG system for internal use. This enables us to use the extensive knowledge that we have accumulated over the years in the form of tickets. In essence, this enables structured access to our internal know-how.

Would you like to find out what benefits your company can gain from having its own RAG system?

Then let us advise you now!

    Get in touch with us




    All fields marked with * are required for ordering and processing. Your person-related data will be used by us solely for the purpose of processing your inquiry according to our privacy policy.

    MORE ABOUT US?

    Find out everything important about Medienwerft – experts in brands & ecommerce for over 25 years – here:

    About us
    Kontaktblock

    CONTACT

    „Behind every impressive online solution there is a well thought out technological concept. My team of system analysts, database experts, front-end developers, back-end professionals and experienced designers ensure that everything runs smoothly. Feel free to talk to us.“

    Frank Meier

    Managing Director
    FRANK MEIER

    Tel: +49 40 / 31 77 99-0
    Email: info@medienwerft.de