TFG - Redesigning the User Experience with Artificial Intelligence: Fashion Industry Specialized Chatbot
A unimodal RAG (Retrieval-Augmented Generation) chatbot that processes and responds to text queries using external datasets without retraining large language models. Utilizes FAISS for fast semantic search over the Zara Sales dataset, and Cohereβs Command R+ LLM for multilingual conversational responses.
- Unimodal chatbot: text input and output only
- Semantic retrieval of documents using FAISS vector store
- Each dataset row processed as an individual document for embedding and indexing
- LLM-powered responses using Cohere Command R+
- Ready-to-use semantic search index
- Ready-to-run code with Poetry-managed environment
- Notebook experimentation and demos included
High-level structure of the application:

- User enters query (text) via Frontend.
- Frontend sends the query to the Backend.
- Backend retrieves relevant documents using Semantic Search (FAISS).
- Backend sends the query along with the retrieved documents to the LLM.
- LLM generates a response.
- Backend returns the generated response to Frontend.
- Frontend displays the generated response (text) to the user.
Backend
Frontend
Models
Infraestructure | Dev Tools
# 1. Install Poetry (required) - https://python-poetry.org/docs/#installing-with-the-official-installer
# Windows (PowerShell):
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
poetry --version
# 2. Clone the repository
git clone https://github.com/estelacode/poc_I_tfg_unimodal_rag_chatbot.git
cd poc_I_tfg_unimodal_rag_chatbot
# 3. Install dependencies
poetry install
# Check where the virtual environment is located (optional)
poetry env info# Run the project
poetry run python src/rag/main.pypoc_I_tfg_unimodal_rag_chatbot/
βββ data/ # Datasets and FAISS index
βββ demo/ # demo media
βββ docs/ # diagrams
βββ notebooks/ # Jupyter notebooks for experiments
βββ src/ # Source code
βββ .env # Environment variables (keep secret)
βββ .gitignore # Git ignore rules
βββ poetry.lock # Poetry dependency lock file
βββ pyproject.toml # Poetry configuration and dependencies
βββ README.md # Project README file
- Support multimodal inputs: Extend chatbot to handle images, CSVs, or PDFs alongside text.
- Add more datasets: Integrate additional datasets to broaden knowledge domain beyond Zara Sales.
- Improve retrieval accuracy: Experiment with different embeddings models and FAISS configurations.
- Add conversational memory: Maintain context across multiple turns for more natural dialogues.
- Reranking techniques: Implement reranking of retrieved documents to improve answer relevance.
- Guardrails / Topic filtering: Define rules to prevent the LLM from responding to unsafe or out-of-scope queries.
- Evaluation and metrics: Introduce automated and human evaluation (e.g., Recall@k, BLEU/ROUGE) to measure retrieval and response quality.
- Expose API endpoints: Provide HTTP services to query the chatbot programmatically.
- Automated testing: Implement unit and integration tests for retrieval and generation components.
- Cloud deployment: Make the chatbot accessible online via a cloud service or containerized solution.
Estela Madariaga


