How karthik-333/ai-interview-simulation works
AI Interview Simulation is a FastAPI backend that accepts resume PDFs, indexes their content for retrieval, and answers interview questions using resume context and a local LLM. The main workflows run through the API and services: resume upload proceeds through PDF extraction, chunking, embedding, and vector storage; question answering proceeds through embedding, semantic retrieval, prompt construction, and generation. Interview sessions are also persisted through SQLAlchemy. The graph reflects the README and shown source references; unsampled implementations and runtime details are not inferred.
Main entry points: pipeline.py RAG Pipeline · interview_service.py Interview Service · interviews.py Interview API · main.py FastAPI App
Components 19
API and Services
- FastAPI App
backend/app/main.py - Resume API
backend/app/api/resume.py - Interview API
backend/app/api/interviews.py - Interview Schemas
backend/app/schemas/interview.py - Resume Service
backend/app/services/resume_service.py - Interview Service
backend/app/services/interview_service.py
Resume Ingestion
- PDF Extraction
backend/app/rag/pdf_loader.py - Text Chunking
backend/app/rag/chunker.py - Embeddings
backend/app/rag/embedding.py - Resume Vector Store
backend/app/rag/vector_store.py
Question Answering
- RAG Pipeline
backend/app/rag/pipeline.py - Prompt Builder
backend/app/rag/prompt_builder.py - Answer Generation
backend/app/rag/llm.py
Data and Configuration
- Runtime Settings
backend/app/core/settings.py - Database Session
backend/app/core/database.py - Interview Model
backend/app/models/interview.py
Other components
- Candidate
- Ollama LLM
- PostgreSQL
Connections 23
- Candidate → FastAPI App: sends requests
README.md - FastAPI App → Resume API: registers router
backend/app/main.py - FastAPI App → Interview API: registers router
backend/app/main.py - Candidate → Resume API: uploads PDF
README.md - Resume API → Resume Service: calls
backend/app/api/resume.py - Resume Service → PDF Extraction: ingests file
backend/app/services/resume_service.py - PDF Extraction → Text Chunking: extracts text for
backend/app/rag/ingest_resume.py - Text Chunking → Embeddings: embeds chunks
backend/app/rag/ingest_resume.py - Embeddings → Resume Vector Store: stores vectors via
backend/app/rag/ingest_resume.py - Candidate → Interview API: asks question
backend/app/api/interviews.py - Interview API → Interview Schemas: validates with
backend/app/api/interviews.py - Interview API → Interview Service: calls
backend/app/api/interviews.py - Interview Service → RAG Pipeline: runs
backend/app/services/interview_service.py - RAG Pipeline → Embeddings: embeds query
backend/app/rag/pipeline.py - RAG Pipeline → Resume Vector Store: searches chunks
backend/app/rag/pipeline.py - RAG Pipeline → Prompt Builder: builds prompt
backend/app/rag/pipeline.py - RAG Pipeline → Answer Generation: requests answer
backend/app/rag/pipeline.py - Answer Generation → Ollama LLM: calls model
backend/app/rag/llm.py - Interview Service → Database Session: opens session
backend/app/services/interview_service.py - Interview Service → Interview Model: creates record
backend/app/services/interview_service.py - Database Session → PostgreSQL: connects to
backend/app/core/database.py - Answer Generation → Runtime Settings: reads model setting
backend/app/rag/llm.py - Resume Vector Store → Runtime Settings: reads store path
backend/app/rag/vector_store.py