Building RAG Chatbot for Movie Recommendations with Qdrant and OpenAI

This workflow builds an intelligent movie recommendation chatbot that utilizes Retrieval-Augmented Generation (RAG) technology, combining the Qdrant vector database and OpenAI language model to provide personalized movie recommendations for users. By importing rich IMDb data, it generates text vectors and conducts efficient similarity searches, allowing for a deep understanding of users' movie preferences, optimizing recommendation results, and enhancing user interaction experience. It is particularly suitable for online film platforms and movie review communities.

Workflow Diagram
Building RAG Chatbot for Movie Recommendations with Qdrant and OpenAI Workflow diagram

Workflow Name

Building RAG Chatbot for Movie Recommendations with Qdrant and OpenAI

Key Features and Highlights

This workflow constructs an intelligent movie recommendation chatbot based on Retrieval-Augmented Generation (RAG) technology. By integrating the Qdrant vector database with OpenAI’s language and embedding models, it achieves precise understanding of user movie preferences and delivers personalized recommendations. Core highlights include importing rich movie data from publicly available GitHub sources, generating high-quality text embeddings with OpenAI, performing efficient vector similarity searches via Qdrant, and leveraging an AI agent to intelligently filter and rank recommendation results.

Core Problems Addressed

Traditional movie recommendation systems struggle to comprehend users’ complex natural language preferences, often resulting in recommendations that lack personalization and semantic depth. This workflow utilizes semantic embedding techniques and a vector database to deeply understand both positive and negative user preference examples, effectively addressing issues of low recommendation accuracy and poor user interaction experience.

Application Scenarios

  • Online video streaming platforms or applications seeking to enhance personalized recommendation experiences
  • Movie enthusiasts or film review communities requiring intelligent conversational recommendation services
  • Any scenario that demands content recommendation based on textual descriptions

Main Workflow Steps

  1. Data Import: Download a CSV file containing the Top 1000 IMDb movies dataset via a GitHub node.
  2. Text Extraction and Processing: Extract movie descriptions from the file and generate text vectors using OpenAI’s embedding model.
  3. Vector Storage: Upload movie vectors along with metadata into the Qdrant vector database.
  4. User Interaction Trigger: Listen for chat message events to receive users’ positive and negative movie description examples.
  5. Semantic Embedding Generation: Compute OpenAI embeddings for user input examples, converting them into vector representations.
  6. Vector Query and Recommendation: Use Qdrant’s recommendation API to retrieve similar movies based on user preference vectors.
  7. Result Processing and Aggregation: Obtain detailed metadata of recommended movies, filter, and consolidate them into a user-friendly recommendation list.
  8. Intelligent Response Generation: Utilize OpenAI’s chat model and AI agent to generate natural language replies presenting the top 3 movie recommendations to the user.

Involved Systems and Services

  • GitHub: Source of movie data, providing the IMDb movies CSV file.
  • OpenAI: Provides text embedding generation (text-embedding-3-small model) and conversational language model (gpt-4o-mini) services.
  • Qdrant: High-performance vector database responsible for storing movie vectors and executing similarity-based recommendation queries.
  • n8n: Workflow automation platform orchestrating nodes to implement the overall business logic.

Target Users and Value

  • Developers of video content platforms aiming to rapidly build intelligent recommendation chatbots.
  • Product managers and data scientists prototyping recommendation systems combining vector databases and large language models.
  • Movie enthusiasts and community operators looking to enhance user engagement and recommendation accuracy.
  • Various applications seeking to improve user experience and content personalization.

By seamlessly integrating multiple advanced AI technologies, this workflow significantly lowers the barrier to building semantic recommendation systems, delivering efficient, intelligent, and personalized movie recommendation services.