Skip to content

We are going to showcase how to build a superhero character AI - where users can chat with their favourite superheroes.

License

Notifications You must be signed in to change notification settings

quamernasim/Superhero-Character-Based-On-RAG-AI-Using-Haystack-And-Qdrant

Repository files navigation

Superhero-Character-Based-On-RAG-AI-Using-Haystack-And-Qdrant

Superhero Character AI

We are going to showcase how to build a superhero character AI - where users can chat with their favorite superheroes.

Introduction

In this repository, we will explore how to build a superhero chatbot that can mimic the personalities of popular superheroes and engage in conversations with users. We will use the RAG-based chatbot model to generate responses in the style of popular superheroes. To build this RAG-based superhero chatbot, we will use Haystack, a framework that makes it easy to build end-to-end RAG-based chatbots. To store and retrieve the superhero dialogues, we will use the Qdrant Vector Database. To generate responses in the RAG-based chatbot, we will be using the Llama-3 model.

This blog post is divided into the following sections:

  1. Pre-processing the superhero dialogues
  2. Indexing the superhero dialogues using Qdrant
  3. Building the RAG-based superhero chatbot using Haystack

Pre-processing the superhero dialogues

To build the superhero chatbot, we need to pre-process the movie scripts of popular superhero movies. We will use the movie scripts of popular superhero movies and extract the dialogues of the superheroes. Then, we will save the dialogues of each superhero in a separate file.

Indexing the superhero dialogues using Qdrant

To store and retrieve the superhero dialogues, we will use the Qdrant Vector Database. Qdrant is an open-source vector database that allows you to store and retrieve vectors efficiently. We will index the superhero dialogues using Qdrant so that we can retrieve the dialogues of the superheroes based on the user's query.

Building the RAG-based superhero chatbot using Haystack

To build the RAG-based superhero chatbot, we will use Haystack, a framework that makes it easy to build end-to-end RAG-based chatbots. We will use the Llama-3 model to generate responses in the style of popular superheroes. We will build the superhero chatbot using Haystack and integrate it with Qdrant to retrieve the superhero dialogues.

Streamlit App

We will also create a Streamlit app where users can chat with their favorite superheroes. The Streamlit app will allow users to select their favorite superhero and start a conversation with the superhero chatbot. The superhero chatbot will generate responses in the style of the selected superhero.

To run the Streamlit app, you can use the following command:

streamlit run app.py

Conclusion

In this repository, we have explored how to build a superhero chatbot that can mimic the personalities of popular superheroes and engage in conversations with users. We have used the RAG-based chatbot model to generate responses in the style of popular superheroes. We have used Haystack to build the superhero chatbot and Qdrant to store and retrieve the superhero dialogues. We have also created a Streamlit app where users can chat with their favorite superheroes.

Original Blog

You can find the original blog for this repo published at medium: Create a Superhero Character Chatbot Using Haystack, Qdrant, Llama 3, and Streamlit

About

We are going to showcase how to build a superhero character AI - where users can chat with their favourite superheroes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published