TaraChat is a full-stack chatbot application that implements Retrieval-Augmented Generation (RAG) using CroissantLLM, a French-optimized language model. The application allows users to chat with an AI assistant that can retrieve and use information from uploaded documents.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ React │ ◄─────► │ FastAPI │ ◄─────► │ CroissantLLM│
│ Frontend │ REST │ Backend │ │ + │
│ TypeScript │ API │ Python │ │ FAISS │
└─────────────┘ └─────────────┘ └─────────────┘
localhost:5173 localhost:8000 Vector Store
OR for local development:
# Option A: Using Make
make build
make up
# Option B: Using Docker Compose directly
docker-compose up --build -d
The first startup takes 5-15 minutes to download the CroissantLLM model:
make logs
# or
docker-compose logs -f backend
Wait for: "RAG system initialized successfully"
Open your browser to:
Wait for the status bar to show “Ready” (green), then try:
The chatbot uses retrieved documents to provide accurate, contextual responses.
Click “Upload Document” to add new knowledge to the chatbot’s database.
Responses include expandable “Sources” showing which documents were used.
The status bar shows when the model is ready and vector store is loaded.
The chatbot maintains context throughout the conversation.
tarachat/
├── backend/ # FastAPI + Python
│ ├── app/
│ │ ├── main.py # API routes
│ │ ├── rag.py # RAG implementation
│ │ ├── models.py # Data models
│ │ └── config.py # Configuration
│ ├── scripts/
│ │ └── init_data.py # Initialize sample data
│ └── data/
│ └── sample_documents.txt
│
├── frontend/ # React + TypeScript
│ └── src/
│ ├── components/ # React components
│ ├── api.ts # API client
│ └── types.ts # TypeScript types
│
└── docker-compose.yml # Orchestration
# Start application
make up
# View logs
make logs
# Stop application
make down
# Clean everything (including data)
make clean
# Initialize sample data
make init-data
Send a message and get a response with sources.
Request:
{
"message": "Tell me about Paris",
"conversation_history": []
}
Response:
{
"response": "Paris is the capital of France...",
"sources": ["Paris is the capital...", "The city is located..."]
}
Upload a document to the knowledge base.
Request:
{
"content": "Document text here",
"metadata": {"title": "Example"}
}
Check system status.
Response:
{
"status": "healthy",
"model_loaded": true,
"vector_store_ready": true
}
MODEL_NAME=croissantllm/CroissantLLMChat-v0.1
EMBEDDING_MODEL=sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
CHUNK_SIZE=512
CHUNK_OVERLAP=50
TOP_K=3
VITE_API_URL=http://localhost:8000
docker-compose logsdocker-compose psFor issues or questions:
make logsThis project is provided as-is for educational and demonstration purposes.