This project involves building an intelligent chatbot web app to analyze Amazon Fashion reviews. The chatbot provides a natural and intuitive conversational experience, allowing users to explore customer reviews, identify trends, and understand what makes a great customer experience.
The data used for this project can be found at this link. The interface allow you to upload multiple json
files up to a maximum of 200 mb.
-
Text Splitting: This initial step involves segmenting the input text into smaller, more manageable portions. Employing a character-based text splitter, the text is divided into coherent units, facilitating better processing.
-
Embedding with OpenAI: Once split, the text chunks undergo embedding using OpenAI's embedding techniques. These embeddings encapsulate the underlying semantic essence, converting the textual content into numerical representations that encapsulate both context and meaning.
-
Vector Store Creation: The embedded text chunks are aggregated and housed within a vector store. This data structure is meticulously designed for proficient similarity searches. Making use of the FAISS library, which specializes in similarity search and clustering, the vector store ensures optimized search operations.
-
User Input and OpenAI Embedding: When a user poses a question, the input is seamlessly embedded using OpenAI's embedding approach. This transformation prepares the user's query for further processing and analysis.
-
Semantic Search and Matching: The newly embedded user query is evaluated against the embedded text chunks previously stored in the vector store. A semantic search and matching process ensues, identifying the text chunks that most closely correspond to the user's query based on their embedded representations.
- Install Docker on your system if not already installed.
- Open a terminal and navigate to the root folder of the project.
- Create a
.env
file within thechatbot
directory and insert this line in it:OPENAI_API_KEY = <your_api>
. - Execute the command
docker-compose up
. - Access the chatbot in your web browser at
http://localhost:8501
.