Skip to content

Latest commit

Β 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TFG - Redesigning the User Experience with Artificial Intelligence: Fashion Industry Specialized Chatbot

Poc II: Multimodal RAG Chatbot

Overview

A multimodal RAG (Retrieval-Augmented Generation) chatbot that processes text queries and returns responses combining text and images. The system retrieves semantically relevant visual content from a multimodal vector store built from a custom dataset of 3D footwear images. Image and text embeddings are generated using OpenCLIP and Cohere, while multimodal reasoning is performed using LLaVA 1.6 and Llama 3.2 Vision. The application is implemented with LlamaIndex and a Gradio-based web interface.

Demo

Demo_PoC_II_Multimodal RAG Chatbot 1 Demo_PoC_II_Multimodal RAG Chatbot 2

Features

  • Multimodal chatbot: text input with text + image output
  • Multimodal RAG architecture with unified text–image embeddings
  • Semantic retrieval of images from text queries
  • MultiModalVectorStoreIndex for multimodal vector storage
  • Image embeddings using OpenCLIP
  • Text embeddings using Cohere embed-multilingual-v3.0
  • Large Multimodal Models: LLaVA 1.6 and Llama 3.2 Vision
  • Interactive web UI built with Gradio

Architecture

High-level structure of the application: PoC_II_High_level_Architecture_Diagram

Sequence Diagram

PoC_II_Sequence_Diagram

Sequence Flow:

  1. User submits a query (text) via the Frontend.
  2. Frontend sends the query to the Backend.
  3. Backend retrieves the most relevant documents and images from the Multimodal Vector Store using semantic search (Cohere embeddings for text + CLIP embeddings for images).
  4. Backend sends the query along with the retrieved context to the Ollama Multimodal LLM (llava:13b or llama3.2-vision:11b).
  5. LLM generates a multimodal response (text and/or image) based on the provided context.
  6. Backend returns the generated response to the Frontend.
  7. Frontend displays the generated response (text and image) to the user.

Tech Stack

Backend

Python 3.12.9 LlamaIndex 0.11.23

Multimodal / Embeddings

CLIP open--clip Cohere-Embeddings embed-multilingual-v3.0

Vector Database

ChromaDB 0.5.18

LLM

Ollama LLaVA-13B Llama3.2-Vision

Frontend

Gradio

Infrastructure | Dev Tools

Poetry Dependency-Management

Setup

# 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_II_tfg_multimodal_rag_chatbot.git
cd poc_II_tfg_multimodal_rag_chatbot

# 3. Select the Python interpreter for this project
poetry env use /full/path/to/python
# Example for Windows:
# poetry env use C:\Users\emada\AppData\Local\Programs\Python\Python312


# 4. Install dependencies
poetry install

# Check where the virtual environment is located (optional)
poetry env info

Usage

# Run the project
poetry run python src/poc_multimod_chatbot_chroma/main.py

Project Structure

poc_II_tfg_multimodal_rag_chatbot/
β”œβ”€β”€ data/                     # Data files
β”œβ”€β”€ datasets_chatbot/         # Chatbot datasets
β”œβ”€β”€ demo_interface/           # Demo interface or media
β”œβ”€β”€ notebooks/                # Jupyter notebooks for experiments
β”œβ”€β”€ src/                      # Source code 
β”œβ”€β”€ tests/                    # Test images used to evaluate multimodal capabilities
β”œβ”€β”€ vectorstore/              # Vector database storage 
β”œβ”€β”€ .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

Roadmap

  • Support multimodal queries (text + image input)
  • Expand dataset with more product images and descriptions
  • Improve retrieval accuracy with alternative multimodal embeddings
  • Implement reranking techniques for image retrieval
  • Add structured metadata extraction (brand, color, materials)
  • Apply prompt engineering techniques to improve response quality
  • Introduce evaluation methods and metrics for multimodal retrieval and generation
  • Replace in-memory vector store with scalable vector databases
  • Deploy the application as a cloud service

References

πŸ‘‹ Author

Estela Madariaga

About

Multimodal RAG-powered chatbot for fashion products πŸ€–πŸ‘ŸπŸ–ΌοΈβš‘

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages