How ankursingh10/zerocode-ml-assignment works
Project type and purpose
• This is a Python-based Retrieval-Augmented Generation (RAG) system with three main “tiers”:
a) A data/embedding pipeline that builds a FAISS index from a QA dataset
b) A model/service layer exposing a FastAPI “/chat” endpoint that retrieves similar docs and calls a HuggingFace LLM for answer generation
c) An evaluation pipeline to compare RAG vs. base model performance
• It’s Dockerized for reproducible deployment.
File structure
• Top-level:
• .env.example, requirements.txt, Dockerfile, docker-compose.yml – config and orchestration
• Embeddings/ – precomputed FAISS index, QA CSV and pickle data
• data/ – raw dataset and cleaning script
• app/ – source for index building, RAG logic, and FastAPI server
• Evaluation/ – evaluation report (and presumably evaluation code)
• Naming suggests a clear separation of concerns: data ingestion/cleaning, index building, model/service code, evaluation and deployment files.
README for additional insights
• Features call out RAG using HuggingFaceH4/zephyr-7b-beta, FAISS retrieval, FastAPI endpoint, evaluation pipeline, Docker support.
• Run instructions show three phases: build index, run server, run evaluation.
• The presence of hyperparameter.md and dataset.md indicates tuning and dataset documentation phases.
Details
• Docker Compose service block with environment variable injection (.env).
• That build_index.py is typically run once before deployment.