How shiv0112/ai-interviewer works
Project type and purpose
• This is a full-stack AI Interviewer application.
• Frontend: Streamlit UI for users to select interview mode and upload files.
• Backend: FastAPI service exposing chat endpoints.
• Core logic: LangChain-based “chains” that drive conversations in four modes (role-based, JD-based, resume-based, hybrid).
• Data stores: Vector DB (Qdrant/FAISS/Chroma), file uploads, logs.
• External services: LLM API (e.g., OpenAI), PDF parsing.
File structure
• main.py: boots FastAPI, includes routers.
• app/
• chains/: definitions of the four ConversationChains.
• memory/: session managers that back each chain with message history or RAG contexts.
• prompts/: text templates for LLM inputs and evaluation.
• routers/: HTTP endpoints (/chat/role, /chat/jd, /chat/resume, /chat/hybrid, /status).
• schemas/: Pydantic request/response models.
• config/: settings loader for environment variables.
• utils/: logger setup and PDF loader.
• data/: persistent storage for uploaded files, logs, vectorstore.
• qdrant_db/: orchestrates the vector DB.
• frontend/streamlit_app.py: React-style Streamlit interface driving user interactions.
README for additional insights
• Clear user flows for four interview modes.
• Architectural notes: RAG for resume-based mode, pure prompt for role/JD modes, hybrid combines both.
• Dependencies: FastAPI, LangChain, Pydantic, Streamlit, vectorstore client.
Final pointers
• Call out major code modules by name (e.g., role_based_chain.py, hybrid_sessions.py).
• Special flows: RAG retrieval for resume/hybrid modes vs. direct prompting for role/JD modes.