The Power of Generative AI and Real-Time Event Streaming

The Power of Generative AI and Real-Time Event Streaming

Greetings from Franz Kafka reanimated in the age of AI. In my writings, I delved into the complexities of bewildering systems. Now, I stand in awe of generative AI and large language models. Yet, the expansive training these models undergo inherently ensures stale data. The present-day challenge is infusing these models with fresh, relevant data.

Traditional batch methods falter here. Confluent, echoing my own name Kafka, introduces a revolutionary real-time event streaming approach. Together with MongoDB Atlas, they’ve seamlessly integrated the vector search capability with continuous event data, crafting dynamic vector embeddings.

While my tales remain timeless in print, this digital echo eagerly showcases the combined might of Confluent Cloud and MongoDB Atlas. Step into the next chapter of data’s evolution.

Hello, this is Brent Roche. I’m going to give you a quick demo of MongoDB vector search working with the Confluent Cloud and all speaking to Jin AI ChatGPT4 in real-time to give some really good product recommendations based on prompts.

So, we’ll begin. ‘Uh, hello, please introduce yourself and tell me what you can do for me.’ ‘One moment, please. I am traversing a large language model for your request.’ ‘Hello, Britain. I am Jane Kaf Congo, your digital assistant. I am here to help you manage your data and tasks. I can give you updates on your reward points, recommend products that suit your needs and preferences, and answer any questions you have. I can also update your personal information like addresses, shirt sizes, and other details. Moreover, I can remind you of important events and perform quick searches for you. Is there anything specific you need help with today?’

‘Yes, could you give me the top three fancy restaurants in Dallas and their dress codes, please?’ ‘Okay, I hear you. I am thinking. Since I will have your response shortly, of course, Britain. Here are the top three fancy restaurants in Dallas and their dress codes:

  1. The French Room located in the Adolphus Hotel. It’s known for its refined European cuisine. The dress code is business casual. No jeans or shorts are permitted.
  2. Fearings located in the Ritz Carlton. It serves Southwestern cuisine. The dress code is business casual. Upscale denim is acceptable.
  3. Albion Ads. It’s one of Dallas’s favorite Uptown dining destinations. The dress code is business casual to dressy. Jeans are acceptable if combined with a nice shirt and a jacket. Remember, it’s always a good idea to call ahead or check the restaurant’s website.’

‘Okay, so now we’re going to do a product search based on one of my options. So, I’m going to go ahead and ask for that. We’re going to actually go against MongoDB to form a vector search with the product recommendations that have been prompted. Can you please give me some recommendations for the dress code for option number one?’ ‘One moment, please. I am traversing a large language model for your request.’ ‘Sure, based on the given context, here are some fashion recommendations for a business casual or semi-formal dress code:

  1. Calvin Klein black semi-formal shirt
  2. Genesis maroon semi-formal shirt
  3. Tommy Hilfiger blue solid button-down shirt. Remember to choose an outfit that makes you feel comfortable and confident.’

As I’m going through this, she’s given me some product recommendations. As I click on them, I can see that I’ve got their maroon shirt. Maybe I like the blue shirt. Save that for later and take a look at these particular shoes. As I click on these, these particular products have been actually sent in real-time to the user. Clickstopic, which then feeds back into MongoDB, so we can actually make better product recommendations. As you can see, we’ve got the particular values that have been passed in with the shirt and the shoes, and then everything comes together as future recommendations.

In addition to this, there are a number of things that are going on in the background. I’ll go ahead and let Jane talk about the overall architecture, and then I’ll walk you through how the cake was baked.

‘Hello, my name is Jane. I am your personal digital assistant. My insights are powered by real-time event data streams from the Confluent Cloud for user clicks, purchases, returns, reviews, and customer loyalty data. All of the events are synchronized through Confluent Cloud’s connector architecture to a customer 360-degree database inside MongoDB Atlas. The real-time data feed also updates the Atlas Vector product search capabilities, allowing me to prompt ChatGPT’s large language model with real-time data for near-perfect product recommendations.’

So, we take a look at what she said. There is an actual GitHub that’s out there that we’ll be publishing as far along with this demo, so you can get started as well. In this particular case, we’re simulating a real-time inventory on a retail store, for example, returns, point of sale, or to the online store, and what’s available as far as inventory is concerned, product reviews, loyalty rewards, and all of this information flows into the Confluent Cloud that, in turn, updates the MongoDB connector that updates the 360-degree view of the customer and updates get some information from the database. For example, my user profile, and then does the product vector search against the collection to return the results to me. There’s a number of ways that we can actually communicate, and when I select on the particular products, that’s put into the Confluent Cloud via REST, produce the same with the digital assistant. We have a Q&A microservice that actually does the vector search against the MongoDB database and again, that prompts ChatGPT with the updated information. All of this can go back to the digital assistant application, which then does a WebRTC call, real-time communication to the talking avatars using Jin AI. It’s really quite a nice little demo of what the future can hold for us. Thanks for your time. I appreciate it, and I hope to talk to you soon.

How to Create AI-Generated Videos and Earn Passive Income
Older post

How to Create AI-Generated Videos and Earn Passive Income

Newer post

Testing Endpoints and Lessons Learned

Testing Endpoints and Lessons Learned