AI / LLM architecture
Sophia calls OpenAI for resume field extraction and interview reports. Live interview dialogue runs in an external bot; the API stores transcript and metrics but does not run an in-session LLM.
flowchart TB Resume["Resume upload"] --> Parse["Text extract + LLM parse"] Parse --> Candidate["Candidate form / save"] Interview["Interview complete + settle"] --> ReportGen["Report generation worker"] ReportGen --> Report["Interview report"] Candidate --> Snap["Snapshot at schedule"] Snap --> Bot["External bot interview"] Bot --> Interview Snap --> ReportGen Bot --> ReportGen
Models
| Use case | Model | Purpose |
|---|---|---|
| Resume extraction | gpt-5.4-mini | Structured candidate fields from resume text |
| Resume extraction (fallback) | Gemini (gemini-2.5-flash-lite default) | Retry on primary rate limit / server errors |
| Interview report | gpt-4.1-mini | Scored evaluation from snapshot + transcript |
| Insufficient evidence | — (deterministic) | Short interview or too few answers; no LLM call |
Both LLM paths use strict JSON schema outputs validated with Zod. Reports use a dedicated OpenAI client (no Gemini fallback).