AI ChatBot with RAG

An intelligent chatbot leveraging Retrieval-Augmented Generation (RAG) to provide accurate and context-aware responses. Built with a React frontend and FastAPI backend, it integrates seamlessly with AWS Bedrock to enhance conversational capabilities.

Features

  • Document Integration: Upload PDFs and Excel files containing product specifications and FAQs, which are then processed and stored in AWS Bedrock for enriched interactions.
  • Interactive Prompting: Users can input prompts through a React-based interface, which are sent to the backend for processing and response generation.
  • Contextual Responses: Utilizes AWS Bedrock's vector database to retrieve relevant data, combining it with user prompts to generate comprehensive answers via GPT-4.
  • Real-time Streaming: Delivers responses in real-time by streaming data from OpenAI, ensuring a smooth and responsive user experience.

Technology

  • Frontend: React with TypeScript and Vite to build a widget that able to implement easily to other website by importing the js and css.
  • Backend: FastAPI Python framework, providing a robust and scalable API for handling requests.
  • RAG Integration: AWS Bedrock for managing and querying the vector database.
  • Language Model: OpenAI GPT-4o / GPT-3.5 Turbo for generating high-quality, context-aware responses.
  • Deployment: Windows IIS with open source httpplatformhandlermodule version 2 for enhanced streaming capabilities.

Development Insights

  • CSS Overlapping Issues: Encountered overlapping CSS styles with the main website. Resolved by implementing CSS modules to encapsulate styles and prevent conflicts.
  • AWS Bedrock Account Configuration: Faced challenges in setting up AWS Bedrock, including creating IAM accounts and assigning appropriate permissions. Gained valuable experience in AWS account management and security configurations.
  • Streaming Limitations on Windows IIS: Initially, Windows IIS did not support streaming responses effectively. Overcame this by adopting the updated httpplatformhandlermodule_x64_en_v2_8.0.3 from GitHub communities, enabling seamless data streaming from the backend to the frontend.