Tech Stack
Problem
Interview preparation requires:
- Access to reliable, curated information
- Quick answers to specific technical questions
- Context-aware responses based on role/company
- Preservation of conversation history for learning progression
Traditional resources (blogs, videos, docs) are scattered and lack interactivity. Generic AI assistants don’t have domain-specific knowledge and can hallucinate incorrect technical information.
Solution: RAG-Powered Interview Assistant
PrepAI is an advanced interview preparation assistant that combines:
- Retrieval-Augmented Generation (RAG): Prioritizes responses from a curated knowledge base
- Fallback LLM: Uses large language models when knowledge base doesn’t have answers
- Conversation History: Maintains context across questions for better learning experience
- Multi-Model Support: Works with various AI models (GPT, Claude, Gemini, etc.)
Architecture
User Query
↓
RAG Agent (Vector Search)
↓
Knowledge Base Match?
├─ YES → Return curated answer
└─ NO → Fallback to LLM
↓
Response + Context Stored
Key Components:
- Knowledge Base: Curated interview Q&A, coding patterns, system design concepts
- Vector Store: Semantic search over knowledge base
- RAG Agent: Orchestrates retrieval and generation
- LLM Fallback: Handles questions outside knowledge base
- History Manager: Maintains conversation context
Technical Implementation
RAG Pipeline
def answer_query(query: str, user_context: dict):
# 1. Vector search in knowledge base
relevant_docs = vector_db.search(
query=query,
top_k=3,
filters={"category": user_context.get("focus_area")}
)
# 2. Check relevance score
if relevant_docs and relevant_docs[0].score > THRESHOLD:
# Found good match in knowledge base
answer = construct_answer(relevant_docs)
source = "knowledge_base"
else:
# Fallback to LLM
context = "\n".join([doc.content for doc in relevant_docs])
answer = llm.generate(
prompt=f"Context: {context}\n\nQuestion: {query}",
model="gpt-4"
)
source = "llm"
# 3. Store in conversation history
history.add(query=query, answer=answer, source=source)
return answer, source
Knowledge Base Structure
- System Design: Scalability patterns, architecture concepts, trade-offs
- Coding: LeetCode patterns, algorithm explanations, complexity analysis
- Behavioral: STAR method responses, company culture questions
- Role-Specific: Staff engineer expectations, leadership scenarios
Multi-Model Support
Integrated with:
- OpenAI: GPT-4, GPT-3.5
- Anthropic: Claude 3 (Opus, Sonnet)
- Google: Gemini Pro
- Open Source: Llama 2, Mistral
Features
1. Intelligent Knowledge Retrieval
- Semantic search over curated content
- Category-based filtering (coding, system design, behavioral)
- Relevance scoring to ensure quality
2. Contextual Conversations
- Maintains conversation history
- Builds on previous questions
- Adapts based on user’s focus area
3. Source Transparency
- Shows whether answer came from knowledge base or LLM
- Provides confidence scores
- Links to original sources when available
4. Personalization
- Tracks user’s interview target (role, company, level)
- Customizes responses based on experience level
- Suggests related topics to explore
Use Cases
System Design Preparation
Question: “How would you design a URL shortener?”
PrepAI Response (from knowledge base):
Here's a comprehensive approach:
1. Requirements Clarification
- QPS: 1000 writes/s, 10000 reads/s
- Storage: ~100M URLs
- Custom URLs: Yes/No?
2. High-Level Design
[Detailed architecture diagram reference]
- API Gateway → App Servers → Cache → Database
- Redis for hot URLs
- PostgreSQL for persistence
3. Key Components
- Hash function (MD5 → Base62)
- Collision handling
- Analytics tracking
[Link to full system design in knowledge base]
Coding Interview Prep
Question: “Explain the sliding window pattern”
PrepAI: Retrieves from knowledge base with code examples, complexity analysis, and links to practice problems.
Behavioral Questions
Question: “Tell me about a time you handled disagreement”
PrepAI: Provides STAR framework template + real examples from knowledge base, then helps user craft their own response.
Results & Impact
For Interview Candidates:
- ⚡ Faster Prep: Get answers in seconds, not hours of research
- 🎯 Focused Learning: Curated content specific to target role/company
- 📚 Progressive Learning: History tracking helps identify knowledge gaps
- ✅ Reliable Information: Knowledge base ensures accuracy (no hallucinations)
Technical Achievements:
- Accuracy: 95%+ relevant answers from knowledge base
- Response Time: < 2 seconds for RAG queries
- Coverage: 500+ curated Q&A across domains
- User Satisfaction: Positive feedback on LinkedIn
Technical Stack
AI/ML:
- LangChain for RAG orchestration
- ChromaDB / Pinecone for vector storage
- OpenAI / Anthropic APIs for LLM
Backend:
- FastAPI for REST APIs
- PostgreSQL for structured data
- Redis for session management
Deployment:
- Docker containerization
- AWS / GCP for hosting
- CI/CD with GitHub Actions
Key Learnings
What Worked Well
- RAG > Pure LLM: Knowledge base answers are consistently better
- Conversation Context: Hugely improves follow-up questions
- Source Attribution: Users trust answers more when source is shown
- Fast Iteration: FastAPI + simple UI = quick user feedback
Challenges Overcome
- Knowledge Base Curation: Time-consuming but essential
- Vector Search Tuning: Finding right similarity threshold
- Cost Management: Balancing LLM calls vs embedding costs
- Context Window: Managing conversation history size
Future Roadmap
Planned Features
- Mock Interview Mode (interactive practice)
- Company-Specific Prep (pull from Glassdoor, Blind)
- Spaced Repetition (track what you’ve learned)
- Study Plan Generator (personalized prep timeline)
- Community Knowledge Base (user-contributed Q&A)
Technical Enhancements
- Fine-tuned models on interview data
- Multi-modal (support for whiteboarding images)
- Real-time collaboration (prep with peers)
- Mobile app (practice on-the-go)
Why PrepAI Matters
Interview preparation shouldn’t be:
- ❌ Scattered across 50 different resources
- ❌ Generic advice that doesn’t apply to your target role
- ❌ Time-consuming research that could be instant
PrepAI makes interview prep:
- ✅ Centralized and curated
- ✅ Personalized to your goals
- ✅ Interactive and conversational
- ✅ Reliable and accurate
Repository: github.com/vayux/prep-ai
Tech Stack: Python · RAG · LLM · FastAPI · Vector DB · AI Agents · LangChain
Project Status: Active Development (Mar 2025 - Present)
VayuX Technologies: Building AI-powered tools for engineers