A FastAPI-based RAG (Retrieval-Augmented Generation) server designed for translation tasks, featuring vector-based similarity search and stammering detection.
- Retrieval-Augmented Generation: Uses ChromaDB to retrieve the top 4 similar translation pairs for better context.
- Stammering Detection: Advanced algorithm to detect character elongation and phrase repetition in translations.
- Dockerized: Fully containerized for consistent deployment and testing.
This project uses uv for lightning-fast dependency management.
- Setup:
uv sync - Run Server:
uv run uvicorn main:app --reload - Seed Data:
uv run seed_db.py(populates the DB with the provided JSONL pairs) - API Docs: Open
http://127.0.0.1:8000/docs
To run the fully containerized application:
docker build -t translation-rag .
docker run -p 8000:8000 translation-rag