DEV Community

Cover image for How I Built an AI Interview Prep App with Spring Boot + RAG in 10 Days
sandeep gusain
sandeep gusain

Posted on

How I Built an AI Interview Prep App with Spring Boot + RAG in 10 Days

The Problem

Every Java developer preparing for interviews does the same thing — opens ChatGPT, types "ask me Spring Boot interview questions," gets generic questions with no scoring, no progress tracking, and no way to know if their answer would pass a real interview.

I built SkillRound to fix that.

What It Does

SkillRound is an AI-powered mock interview app specifically for Java/Spring Boot developers. Not a generic "interview prep for all roles" app — a deep, specialized tool for one stack.

  • 2,358 questions across 16 topics: Core Java, Collections, Multithreading, Spring Boot, Microservices, Kafka, System Design, and more
  • AI evaluation that scores your answer against a 152K word knowledge base — not generic ChatGPT "good answer!" feedback
  • Role-based interviews that simulate the full loop: Junior Developer (0-1 yrs) through Principal Engineer (10+ yrs) with appropriate topics and difficulty
  • Study Mode to read questions with ideal answers at your own pace
  • Progress tracking per topic showing exactly where you're weak

The Architecture

Here's where it gets interesting for developers:

RAG (Retrieval Augmented Generation) Pipeline:

I wrote 18 markdown files totaling 152,000 words — covering everything from HashMap internals to System Design HLDs. These get chunked into ~500 token segments, embedded using OpenAI's text-embedding-3-small, and stored in PostgreSQL with pgvector using an HNSW index.

When a user submits an answer, the app:

  1. Retrieves the top 5 most relevant knowledge chunks via cosine similarity
  2. Sends the question + user's answer + retrieved chunks to Claude Haiku
  3. Claude evaluates the answer against the real knowledge base content
  4. Returns a score (0-10) with specific feedback, strengths, and areas to improve

This is why the evaluation actually catches wrong answers — it has real content to compare against, not just vibes.

Tech Stack:

  • Backend: Spring Boot 3.x, Java 25
  • Database: PostgreSQL + pgvector (vector similarity search)
  • AI: Claude Haiku (evaluation) + OpenAI embeddings (RAG)
  • Frontend: React + Vite (web), Expo/React Native (mobile)
  • Hosting: Railway (backend) + Vercel (web)
  • Payment: Razorpay
  • Auth: JWT + bcrypt

Cost Optimization Journey:

The original evaluation prompt was 5,764 tokens per call — costing ~$0.027 per evaluation. After trimming to 1,266 tokens (removing verbose instructions, keeping only the scoring rubric + one example), cost dropped to ~$0.008 per evaluation. A 74% reduction with zero quality loss — scores matched within ±1 point across all test cases.

The Question Bank

2,358 questions, each tagged with:

  • Topic (16 topics matching the 18 KB files)
  • Subtopic (collections/map, spring_boot/security, etc.)
  • Difficulty (beginner, intermediate, advanced, expert)
  • Type (theory, scenario, coding)
  • Stored ideal answer (for Study Mode)

The behavioral/HR answers were the hardest to get right. First version sounded like a textbook: "The candidate should demonstrate leadership by..." — nobody talks like that in an interview. Rewrote every behavioral answer in first-person conversational tone with specific tech examples.

Role-Based Interviews

This is the feature I'm most proud of. You pick a role:

Junior Developer (0-1 yrs): 2 rounds — basic Core Java + HR. Beginner difficulty.

SSE (3-5 yrs): 4 rounds — Advanced Core Java, Spring Boot + Microservices, System Design LLD, Behavioral. Advanced difficulty.

Solution Architect (8-12 yrs): 4 rounds — HLD deep, distributed systems architecture, technical leadership, executive behavioral. Expert difficulty.

Each role simulates what that actual interview feels like at Indian IT companies and global enterprises. Per-round scoring at the end tells you exactly which round you'd struggle in.

Build Process

The entire app was built using Claude Code as the development agent. I wrote 23 spec documents, and Claude Code executed them one by one — writing all the backend code, frontend components, database migrations, and tests.

I directed the architecture. The AI wrote the code. I tested and reviewed.

Total build time: ~10 days from first spec to production deployment.

What I Learned

  1. RAG evaluation quality depends entirely on the knowledge base quality. Garbage KB = garbage evaluation. I spent as much time writing the 152K word knowledge base as building the app itself.

  2. Prompt trimming is free money. Cutting the system prompt from 5,764 to 1,266 tokens saved 74% on every API call with identical output quality. Most AI prompts are 3-5x longer than they need to be.

  3. Behavioral answers are harder than technical answers. Getting AI-generated answers to sound like a real person talking — not a corporate handbook — took multiple rewrites.

  4. Test with real data, not mocks. The QA process ran 200+ test cases including full role-based interviews across all 6 roles. Found bugs that unit tests never would have caught — like session state bleeding between study and mock modes.

Try It

The app is live and free to try:

Web: https://skillround-web.vercel.app

Free tier: 10 study sessions/month + 3 mock rounds/month. No credit card needed.

Currently Java/Spring Boot only. Python and JavaScript stacks coming next.

I'd love feedback — what's missing? What would make you actually use this for your next interview?


If you're curious about the technical details of the RAG pipeline or the cost optimization, ask in the comments — happy to go deeper on any part of the architecture.

Top comments (0)