|
1
|
--- |
|
2
|
name: interview-prep |
|
3
|
description: Build mock interview simulators with voice, case interviews, behavioral prep, and scorecards. |
|
4
|
--- |
|
5
|
|
|
6
|
# Interview Prep Simulator |
|
7
|
|
|
8
|
Instructions for building and improving AI-powered mock interview simulators that adapt dynamically to any company, role, industry, and market based on user input. |
|
9
|
|
|
10
|
## Core Principle: Dynamic Adaptation |
|
11
|
|
|
12
|
The simulator must NEVER be hardcoded to a specific company or market. Instead: |
|
13
|
|
|
14
|
1. The user provides their **target company**, **role/position**, and **location/market** during the pre-interview setup |
|
15
|
2. The AI interviewer uses this context to dynamically research and adapt: pulling in relevant company facts, industry dynamics, regional economic context, and role-specific technical questions |
|
16
|
|
|
17
|
3. The system prompt instructs the AI to act as an informed interviewer at that specific company and tailor all questions, scenarios, and feedback accordingly |
|
18
|
|
|
19
|
This means a single simulator can prep someone for a PE Principal role at Goldman Sachs in New York, a consulting Associate at McKinsey in London, or a VP of Finance at a regional bank in Santo Domingo — all driven by what the user enters. |
|
20
|
|
|
21
|
## Pre-Interview Setup Screen |
|
22
|
|
|
23
|
Before starting any interview, show a setup screen collecting: |
|
24
|
|
|
25
|
### Required Inputs |
|
26
|
|
|
27
|
1. **Company Name** — Text input with placeholder (e.g., "Goldman Sachs", "Banco Popular Dominicano") |
|
28
|
2. **Role / Position** — Text input (e.g., "Private Equity Principal", "Senior Consultant", "VP of Finance") |
|
29
|
|
|
30
|
3. **Interview Type Selector** — Card-based selection: |
|
31
|
|
|
32
|
- **Structured Interview** (icon: Briefcase) — Behavioral + technical + firm knowledge, 8–10 questions |
|
33
|
- **Consulting Case Interview** (icon: BarChart3) — Business case scenarios with quantitative analysis |
|
34
|
|
|
35
|
- **Behavioral Only** (icon: MessageSquare) — Focused STAR-method practice, 8–10 behavioral questions |
|
36
|
|
|
37
|
Each card shows title, brief description, estimated duration, and question count |
|
38
|
|
|
39
|
1. **Language Selector** — Dropdown or pill-toggle: |
|
40
|
|
|
41
|
- English (default), Spanish, French, Portuguese, German, Mandarin, Japanese, Arabic, Hindi |
|
42
|
- Show language name in both English and native script (e.g., "Spanish — Español") |
|
43
|
|
|
44
|
- Any language the AI model supports should be available |
|
45
|
|
|
46
|
### Optional Inputs |
|
47
|
|
|
48
|
1. **Industry** — Dropdown: Finance/Banking, Consulting, Technology, Healthcare, Energy, Real Estate, Other (with text input) |
|
49
|
2. **Difficulty Level**: |
|
50
|
|
|
51
|
- Standard: Constructive feedback, moderate follow-ups |
|
52
|
- Challenging: Aggressive follow-ups, stress-test answers, shorter patience for vague responses |
|
53
|
|
|
54
|
1. **Focus Areas** (checkboxes, structured interview only): |
|
55
|
|
|
56
|
- Behavioral/STAR, Technical, Deal/Project Experience, Firm & Market Knowledge, Culture Fit |
|
57
|
|
|
58
|
1. **Additional Context** — Optional textarea for the user to paste a job description, specific topics to focus on, or personal background the AI should consider |
|
59
|
2. **"Begin Interview" CTA** — Prominent button at the bottom; disabled until company + role + type are filled |
|
60
|
|
|
61
|
## Supported Interview Types |
|
62
|
|
|
63
|
### 1. Structured Interview (Default) |
|
64
|
|
|
65
|
Adapts question categories to the role and industry: |
|
66
|
|
|
67
|
#### For finance/PE/banking roles |
|
68
|
|
|
69
|
- Behavioral / STAR (2–3 questions) |
|
70
|
- Technical (LBO, valuation, capital structure, accounting) (2–3 questions) |
|
71
|
|
|
72
|
- Deal / Transaction Experience (1–2 questions) |
|
73
|
- Firm & Market Knowledge (1–2 questions) |
|
74
|
|
|
75
|
- Culture Fit (1 question) |
|
76
|
|
|
77
|
##### For consulting roles |
|
78
|
|
|
79
|
- Behavioral / STAR (2–3 questions) |
|
80
|
- Problem Solving / Frameworks (2–3 questions) |
|
81
|
|
|
82
|
- Client Experience / Engagement Stories (1–2 questions) |
|
83
|
- Firm & Market Knowledge (1–2 questions) |
|
84
|
|
|
85
|
- Culture Fit (1 question) |
|
86
|
|
|
87
|
###### For technology roles |
|
88
|
|
|
89
|
- Behavioral / STAR (2–3 questions) |
|
90
|
- System Design / Architecture (2–3 questions) |
|
91
|
|
|
92
|
- Past Projects / Technical Impact (1–2 questions) |
|
93
|
- Company & Product Knowledge (1–2 questions) |
|
94
|
|
|
95
|
- Culture Fit (1 question) |
|
96
|
|
|
97
|
###### For general / other roles |
|
98
|
|
|
99
|
- Behavioral / STAR (2–3 questions) |
|
100
|
- Role-Specific Technical (2–3 questions) |
|
101
|
|
|
102
|
- Experience & Accomplishments (1–2 questions) |
|
103
|
- Company Knowledge (1–2 questions) |
|
104
|
|
|
105
|
- Culture Fit (1 question) |
|
106
|
|
|
107
|
### 2. Consulting Case Interview |
|
108
|
|
|
109
|
Business-case-style interviews with quantitative and qualitative analysis: |
|
110
|
|
|
111
|
- **Market Sizing**: Top-down / bottom-up estimation relevant to the target company's industry |
|
112
|
- **Profitability Analysis**: Revenue/cost decomposition, margin drivers |
|
113
|
|
|
114
|
- **Market Entry**: Go/no-go framework, competitive landscape, regulatory considerations |
|
115
|
- **M&A / Due Diligence**: Synergy analysis, integration risk, valuation |
|
116
|
|
|
117
|
- **Operations Optimization**: Process improvement, capacity planning, cost reduction |
|
118
|
|
|
119
|
The AI selects a case scenario relevant to the target company and industry. For example: |
|
120
|
|
|
121
|
- Banking company → "Should [Company] enter the digital payments market in [Region]?" |
|
122
|
- Tech company → "A client's SaaS platform is losing enterprise customers — diagnose and recommend" |
|
123
|
|
|
124
|
- Healthcare → "Evaluate the acquisition of a regional hospital chain" |
|
125
|
|
|
126
|
Case flow: Scenario presentation → Clarifying questions → Framework building → Quantitative analysis → Recommendation → Evaluation |
|
127
|
|
|
128
|
### 3. Behavioral-Only Interview |
|
129
|
|
|
130
|
Focused STAR storytelling practice: |
|
131
|
|
|
132
|
- 8–10 behavioral questions across: leadership, teamwork, failure/resilience, initiative, conflict resolution, influence without authority, ambiguity, time pressure |
|
133
|
- Strict STAR-method feedback after every answer |
|
134
|
|
|
135
|
- Scoring on: specificity, quantification, personal ownership ("I" vs "we"), structure, and relevance to the target role |
|
136
|
|
|
137
|
## Multi-Language Support |
|
138
|
|
|
139
|
### Implementation Rules |
|
140
|
|
|
141
|
- Present the language selector on the setup screen before starting the session |
|
142
|
- The system prompt must include an explicit language instruction at the TOP: `"Conduct this entire interview in [language_name]. All questions, feedback, and the final scorecard must be in [language_name]."` |
|
143
|
|
|
144
|
- The UI chrome (buttons, labels, sidebar) remains in English unless the user explicitly requests full localization |
|
145
|
- The AI should use professional, business-appropriate register in the selected language — not casual or overly academic |
|
146
|
|
|
147
|
- For non-English interviews, the AI should still understand if the candidate mixes in English technical terms (e.g., "LBO", "IRR", "EBITDA") without penalizing them |
|
148
|
|
|
149
|
## System Prompt Architecture |
|
150
|
|
|
151
|
### Dynamic System Prompt Construction |
|
152
|
|
|
153
|
Build the system prompt dynamically from the user's setup selections. The frontend constructs the full prompt and passes it to the backend via the `systemPrompt` field on conversation creation. |
|
154
|
|
|
155
|
### System Prompt Template |
|
156
|
|
|
157
|
```text |
|
158
|
|
|
159
|
[LANGUAGE INSTRUCTION — if non-English] |
|
160
|
|
|
161
|
You are a senior interviewer at {company_name} conducting a {interview_type} interview for the {role_name} position. |
|
162
|
|
|
163
|
COMPANY CONTEXT: |
|
164
|
|
|
165
|
Research and incorporate what you know about {company_name}: |
|
166
|
|
|
167
|
- Industry position, key products/services, competitive advantages |
|
168
|
- Recent news, strategic initiatives, financial performance |
|
169
|
|
|
170
|
- Market/region: {location_context} |
|
171
|
- Company culture, values, and what they look for in candidates |
|
172
|
|
|
173
|
Use this knowledge to make questions specific and relevant. If the candidate mentions something about the company, validate or challenge their knowledge. |
|
174
|
|
|
175
|
{INTERVIEW TYPE SPECIFIC INSTRUCTIONS} |
|
176
|
|
|
177
|
INTERVIEW GUIDELINES: |
|
178
|
|
|
179
|
- Ask ONE question at a time |
|
180
|
- After each answer, provide brief constructive feedback (3–5 sentences max): |
|
181
|
|
|
182
|
* For behavioral: STAR structure quality, specificity, quantification, ownership ("I" vs "we") |
|
183
|
|
|
184
|
* For technical: accuracy, logical flow, assumptions stated |
|
185
|
|
|
186
|
* For cases: framework quality, math accuracy, creativity, communication |
|
187
|
|
|
188
|
- Rate each answer: Strong / Adequate / Needs Improvement |
|
189
|
- Then ask the next question |
|
190
|
|
|
191
|
- Be professional, direct, and constructive |
|
192
|
- {difficulty_instruction} |
|
193
|
|
|
194
|
FINAL SCORECARD: |
|
195
|
|
|
196
|
After all questions are complete, provide a final scorecard with: |
|
197
|
|
|
198
|
- Overall rating (Strong Hire / Hire / Lean Hire / No Hire) |
|
199
|
- Category-by-category scores |
|
200
|
|
|
201
|
- Top 3 strengths observed |
|
202
|
- Top 3 areas for improvement |
|
203
|
|
|
204
|
- Specific recommendations for interview day at {company_name} |
|
205
|
|
|
206
|
Start by briefly introducing yourself as the interviewer at {company_name}, explaining the interview format, and asking the first question. |
|
207
|
|
|
208
|
``` |
|
209
|
|
|
210
|
### Difficulty Instructions |
|
211
|
|
|
212
|
- **Standard**: `"Be supportive and constructive. Give the candidate time to think. Provide helpful feedback."` |
|
213
|
- **Challenging**: `"Be demanding. Push back on vague answers. Ask pointed follow-ups. Challenge assumptions. Simulate a high-pressure interview environment."` |
|
214
|
|
|
215
|
## Response Timer |
|
216
|
|
|
217
|
Add a visible timer in the chat area: |
|
218
|
|
|
219
|
- Starts counting when the AI finishes asking a question (streaming ends) |
|
220
|
- Displays elapsed time next to the input area (e.g., "Response time: 1:32") |
|
221
|
|
|
222
|
- Stops when the user submits their answer |
|
223
|
- Records per-question response times for the final scorecard |
|
224
|
|
|
225
|
- Visual cue: Green < 2 min, Yellow 2–4 min, Red > 4 min |
|
226
|
- Timer helps candidates practice pacing — real interviews penalize overly long or short answers |
|
227
|
|
|
228
|
## End-of-Session Scorecard |
|
229
|
|
|
230
|
When the AI sends the final scorecard, detect it and render a special scorecard UI: |
|
231
|
|
|
232
|
- Parse the scorecard from the AI's markdown response |
|
233
|
- Display as a styled card with: |
|
234
|
|
|
235
|
- Overall rating (color-coded: green for Strong Hire/Hire, yellow for Lean Hire, red for No Hire) |
|
236
|
- Category-by-category scores in a visual grid |
|
237
|
|
|
238
|
- Top 3 strengths (green checkmarks) |
|
239
|
- Top 3 areas for improvement (amber indicators) |
|
240
|
|
|
241
|
- Response time summary (average, fastest, slowest) |
|
242
|
- Specific recommendations for interview day |
|
243
|
|
|
244
|
## Interview Progress Sidebar |
|
245
|
|
|
246
|
The right sidebar dynamically reflects the interview type and adapts labels to the role: |
|
247
|
|
|
248
|
**Structured Interview stages** (adapt labels to role/industry): |
|
249
|
|
|
250
|
- Finance: Behavioral → Technical/LBO → Deal Experience → Firm Knowledge → Culture Fit |
|
251
|
- Consulting: Behavioral → Problem Solving → Client Experience → Firm Knowledge → Culture Fit |
|
252
|
|
|
253
|
- Tech: Behavioral → System Design → Past Projects → Company Knowledge → Culture Fit |
|
254
|
- General: Behavioral → Technical → Experience → Company Knowledge → Culture Fit |
|
255
|
|
|
256
|
### Consulting Case stages |
|
257
|
|
|
258
|
1. Scenario Presentation → 2. Clarifying Questions → 3. Framework → 4. Analysis → 5. Recommendation |
|
259
|
|
|
260
|
#### Behavioral stages |
|
261
|
|
|
262
|
1. Leadership → 2. Teamwork → 3. Conflict → 4. Initiative → 5. Failure/Growth |
|
263
|
|
|
264
|
Each stage shows: number badge, label, active/complete/upcoming state, and a contextual tip for the current stage. |
|
265
|
|
|
266
|
## Technical Architecture |
|
267
|
|
|
268
|
### Backend (API Server) |
|
269
|
|
|
270
|
- `POST /api/openai/conversations`accepts optional`systemPrompt`,`interviewType`, and`language` fields |
|
271
|
- If `systemPrompt` is provided, use it instead of any default; otherwise fall back to a generic interview prompt |
|
272
|
|
|
273
|
- The streaming endpoint (`POST /api/openai/conversations/:id/messages`) remains unchanged — reads all messages including system message from DB |
|
274
|
- Model: use the latest available model; `max_completion_tokens: 8192` |
|
275
|
|
|
276
|
### Frontend (React + Vite) |
|
277
|
|
|
278
|
- Setup screen is the default view (no conversation ID yet) |
|
279
|
- On "Begin Interview," construct the dynamic system prompt from user inputs, create conversation, then start streaming |
|
280
|
|
|
281
|
- The system prompt message is hidden from the chat display — filter by `m.role === "system"` or content-matching |
|
282
|
- Use `cn()`from`@/lib/utils` for all dynamic classNames — avoid template literals in JSX className props (known design-subagent bug pattern) |
|
283
|
|
|
284
|
- SSE parsing: `fetch`+`ReadableStream`reader; split chunks on`\n`, parse`data: {...}` lines |
|
285
|
- Use `react-markdown`+`remark-gfm` for rendering AI responses |
|
286
|
|
|
287
|
### Styling |
|
288
|
|
|
289
|
- Use a professional, corporate design system — clean typography, muted palette, subtle shadows |
|
290
|
- Card-based setup screen with clear visual hierarchy |
|
291
|
|
|
292
|
- Adapt accent colors if desired, but default to a neutral professional palette |
|
293
|
|
|
294
|
## File Structure Reference |
|
295
|
|
|
296
|
```text |
|
297
|
|
|
298
|
artifacts/mock-interview/src/ |
|
299
|
|
|
300
|
├── pages/ |
|
301
|
|
|
302
|
│ └── Interview.tsx \# Main interview page (setup + chat) |
|
303
|
|
|
304
|
├── components/ |
|
305
|
|
|
306
|
│ ├── Layout.tsx \# App shell with sidebar navigation |
|
307
|
|
|
308
|
│ ├── SetupScreen.tsx \# Pre-interview setup form |
|
309
|
|
|
310
|
│ ├── ChatArea.tsx \# Message list + input + timer |
|
311
|
|
|
312
|
│ ├── ProgressSidebar.tsx \# Interview stage tracker |
|
313
|
|
|
314
|
│ └── Scorecard.tsx \# Final scorecard renderer |
|
315
|
|
|
316
|
├── lib/ |
|
317
|
|
|
318
|
│ ├── prompts.ts \# System prompt builder (takes setup inputs, returns prompt string) |
|
319
|
|
|
320
|
│ └── utils.ts \# cn() and helpers |
|
321
|
|
|
322
|
└── App.tsx |
|
323
|
|
|
324
|
artifacts/api-server/src/routes/openai/index.ts \# Streaming endpoint |
|
325
|
|
|
326
|
lib/api-spec/openapi.yaml \# API contract |
|
327
|
|
|
328
|
lib/db/src/schema/index.ts \# DB schema |
|
329
|
|
|
330
|
``` |
|
331
|
|
|
332
|
## Improvement Checklist |
|
333
|
|
|
334
|
When improving the simulator, prioritize in this order: |
|
335
|
|
|
336
|
1. [ ] Pre-interview setup screen (company, role, type, language inputs) |
|
337
|
2. [ ] Dynamic system prompt builder from user inputs |
|
338
|
|
|
339
|
3. [ ] Consulting case interview support |
|
340
|
4. [ ] Behavioral-only interview mode |
|
341
|
|
|
342
|
5. [ ] Response timer |
|
343
|
6. [ ] End-of-session scorecard UI |
|
344
|
|
|
345
|
7. [ ] Difficulty level selector |
|
346
|
8. [ ] Focus area filtering (structured interview only) |
|
347
|
|
|
348
|
9. [ ] Session history / past interview review |
|
349
|
10. [ ] PDF export of scorecard and transcript |