CoolFace
Apppublic

korayercan/data-science-interview-coach

sourceHugging Faceupdated 11mo agoView on Hugging Face
1likes
App README

๐Ÿง  Data Science Interview Coach

A Generative AI App for Data Science Interview Practice


๐Ÿš€ Overview

Data Science Interview Coach is a Retrieval-Augmented Generation (RAG) based application designed to help learners practice and understand data science interview concepts interactively. It uses LangChain, Chroma, and Google Gemini 2.0 Flash to retrieve and generate precise, context-aware answers to user questions about machine learning, statistics, and related topics.

This project was developed as part of the GAIH Generative AI Bootcamp (2025).


๐Ÿงฉ Features

  • โ€”๐Ÿงพ RAG-based Q&A system using your custom dataset of 1,000+ questionโ€“answer pairs
  • โ€”๐Ÿ’ฌ Conversational Streamlit UI with contextual retrieval
  • โ€”๐Ÿ” Semantic search powered by bge-small-en-v1.5 embeddings
  • โ€”โš™๏ธ Hybrid retrieval strategy (threshold + MMR for diverse results)
  • โ€”๐ŸŒ Deployed on Hugging Face Spaces for easy access
  • โ€”๐Ÿ“š Context sources shown transparently under each answer

๐Ÿ“‚ Project Architecture

User
 โ”‚
 โ–ผ
Streamlit UI  โ†’  Retriever (MMR + threshold)
 โ”‚
 โ–ผ
Chroma Vector Store (local persist)
 โ”‚
 โ–ผ
Gemini 2.0 Flash Model  โ†’  Response Generation

Key Components:

  • โ€”Embeddings: BAAI/bge-small-en-v1.5
  • โ€”LLM: Google Gemini 2.0 Flash (via langchain-google-genai)
  • โ€”Vector DB: Chroma (persistent local store)
  • โ€”Framework: LangChain + Streamlit

๐Ÿงฎ Dataset Preparation

All questions and answers were collected and merged from multiple public sources:

SourceTypeDescription
Mridul-Dixit (Kaggle)CSVCore ML and AI interview Q&A
Yessica (Kaggle)CSVData Science basics and EDA concepts
Team Bay (Hugging Face)CSVModel evaluation and metrics
MJP Hayes (Parquet)ParquetAdvanced ML theory and optimization
Google ML GlossaryScrapedDefinitions from official documentation

Data cleaning and merging were handled in data_collecting.ipynb:

  • โ€”Removed duplicates and empty rows
  • โ€”Unified column names (question, answer, source)
  • โ€”Added source labels for traceability
  • โ€”Final dataset: 1,082 cleaned Q&A entries

Saved as:

data/df_all_qa.csv

โš™๏ธ How It Works

  1. 1.User asks a question via Streamlit chat.
  2. 2.The app retrieves semantically similar passages using Chroma and MMR retriever.
  3. 3.If no relevant context is found, a fallback prompt (Gemini only) generates an answer.
  4. 4.The modelโ€™s response and source metadata are displayed in the chat interface.

๐Ÿ’ป Setup & Run Locally

1๏ธโƒฃ Clone the repository

bash
git clone https://github.com/<your-username>/data-science-interview-coach.git
cd data-science-interview-coach

2๏ธโƒฃ Create a virtual environment

bash
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

3๏ธโƒฃ Install dependencies

bash
pip install -r requirements.txt

4๏ธโƒฃ Create .env file

bash
GOOGLE_API_KEY=your_google_api_key_here

5๏ธโƒฃ Run the app

bash
streamlit run App.py

The app will start at http://localhost:8501


๐ŸŒ Online Demo

You can try the deployed version directly on Hugging Face Spaces:

๐Ÿ‘‰ [Data Science Interview Coach โ€“ Live Demo](https://huggingface.co/spaces/korayercan/data-science-interview-coach)


๐Ÿ“ฆ Repository Structure

Data Science Interview Coach/
โ”œโ”€ App.py                     # Streamlit RAG app
โ”œโ”€ data_collecting.ipynb      # Data cleaning & merging
โ”œโ”€ data/
โ”‚   โ””โ”€ df_all_qa.csv          # Final merged dataset
โ”‚   โ””โ”€ glossary.csv    
โ”‚   โ””โ”€ Mridul-Dixit.csv    
โ”‚   โ””โ”€ team-bay.csv    
โ”‚   โ””โ”€ Yessica.csv    
โ”‚   โ””โ”€ mjphayes.parquet
โ”œโ”€ chroma_genai_qa/           # Local vector store (ignored in Git)
โ”œโ”€ requirements.txt
โ”œโ”€ .env
โ”œโ”€ README.md
โ””โ”€ .gitignore

๐Ÿ“š Tech Stack

CategoryTools
LanguagePython 3.12
FrameworksLangChain, Streamlit
Vector DBChroma
ModelGemini 2.0 Flash
Embeddingsbge-small-en-v1.5
Librariespandas, numpy, sentence-transformers

๐Ÿง  Example Use Cases

  • โ€”AI interview preparation
  • โ€”Interactive data science learning assistant
  • โ€”Internal corporate Q&A bots with company knowledge base

โš–๏ธ License

MIT License ยฉ 2025 โ€“ Developed by Koray Ercan This project was created for educational purposes as part of the GAIH Generative AI Bootcamp.


๐Ÿ™Œ Acknowledgements

Special thanks to:

  • โ€”Global AI Hub (GAIH) mentors for guidance
  • โ€”Open-source datasets (Kaggle, Hugging Face)
  • โ€”Google for Gemini API access
  • โ€”Hugging Face for deployment infrastructure