How to deploy and run a RAG Chatbot with vLLM

In the ever-evolving field of artificial intelligence, the need for integrating external knowledge into AI systems is not just beneficial—it’s essential. This necessity becomes particularly patent when dealing with large language models (LLMs) tasked with generating reliable and contextually accurate information. Consider, for example, an advanced chatbot; we’d want it to pull not just from a fixed dataset learned during training but also from the latest information that could be scoured from the web or newer data inputs. This kind of flexibility in AI models is something akin to giving a car a real-time GPS instead of a fixed, outdated map.

This video is from OpenShift.

Today, I dug into a fascinating demonstration that showcased the practical use of Intel Xeon CPUs and Intel Gaudi accelerators within Red Hat OpenShift AI for deploying a Retrieval Augmented Generation (RAG) model enhanced by a vector Large Language Model (vLLM). It’s like turbocharging an engine with the latest tech to ensure maximum efficiency and performance.

First up, let’s talk about what RAG really is. It’s a technique that supercharges the capabilities of large language models by integrating them with external, real-time accessible databases. This means a chatbot can answers queries with a broader and updated context, minimizing errors or the ‘hallucinations’ typical of earlier AI models that tend to generate plausible yet incorrect information on the fly. Simply put, it helps the system to consult a reference book while writing an exam instead of relying solely on what was studied the night before.

The demo highlighted an intriguing modification to an existing Red Hat AI Quickstart project. The enhanced setup allows utilization of both Intel Xeon CPUs and Intel Gaudi accelerators, creating a dual-path that can be flexibly adjusted based on performance needs or budget constraints. So, depending on what the enterprise’s needs are—you might opt for the raw horsepower of Gaudi accelerators or the more cost-efficient, scalable solution using only the Xeon CPUs.

Let’s delve deeper with an example used in the demo. The scenario involved querying a chatbot about whether the Ansible Automation Platform 2.6 supports PostgreSQL 16 using an older model—Llama 3.1. Before RAG, the chatbot’s response could be inaccurate due to outdated training data. With RAG, the demo showed uploading the latest release notes into the vector database, and voilà—the chatbot delivered a precise answer when queried again.

Under the hood, this process kicks off when a user types a query into a UI. The query interacts with Llama Stack APIs, which serve as a bridge to the internal RAG components and the vLLM housing the deployed model. The added zest here is the ability to continue expanding the model’s knowledge by uploading new information into the system, such as documents, URLs, or git repositories, into a vector database.

For tech teams wanting to implement this, the demo stressed a quite straightforward setup using Red Hat OpenShift AI on Gaudi or Xeon-equipped systems. The versatility provided here—choice between the raw power of Gaudi or the ubiquitous Xeon, breadth of knowledge resources, and easy scalability—is invaluable for businesses aiming to leverage AI for real-time data analysis and response generation.

This technological synergy not only flaunts the sheer power of combining cutting-edge hardware like Intel Xeon and Gaudi accelerators with smart software solutions like RAG and vLLM but also underscores a larger trend. It’s a movement towards more adaptable, robust, and real-time responsive AI systems—the kind that businesses in our fast-paced world need.

For those of you keen to dive deeper or perhaps get your hands dirty with the code, you can head over to the Red Hat Quickstart RAG repository on GitHub. Whether it’s virtual or in a physical server environment, the potential applications are as expansive as they are exciting.

Frank

#DataScientist, #DataEngineer, Blogger, Vlogger, Podcaster at http://DataDriven.tv . Back @Microsoft to help customers leverage #AI Opinions mine. #武當派 fan. I blog to help you become a better data scientist/ML engineer Opinions are mine. All mine.