AI data flow
What enters external LLM providers from Sophia and what gets persisted.
flowchart LR
subgraph upload ["Resume"]
S3[(S3)]
Extract["Text extract"]
LLM1["Parse LLM"]
Cand[(Candidate)]
end
subgraph live ["Interview"]
Bot["External bot"]
Int[(Transcript)]
end
subgraph report ["Report"]
SQS["Report queue"]
LLM2["Report LLM"]
Rep[(InterviewReport)]
end
S3 --> Extract --> LLM1 --> Cand
Cand --> Bot --> Int
Int --> LLM2
Cand --> LLM2
SQS --> LLM2 --> Rep- Resume parse — PDF/DOCX → plain text locally; LLM sees text only (not raw bytes). Response is ephemeral until the user saves a candidate;
resume.textis stored from deterministic extraction at save. - Schedule — Copies
resume.textinto the interview snapshot; no LLM at schedule time. - Live interview — Bot writes transcript and proctoring; dialogue LLM is outside Sophia.
- Report — Enqueued after first successful credit settlement; model input is snapshot context, resume excerpt (up to 4k chars), and indexed transcript.
- Deterministic reports — Very short interviews or insufficient candidate answers skip the LLM and store a fixed insufficient-evidence result.
- Bot cost metrics — Optional PATCH from the bot; Sophia stores telemetry, does not recompute LLM spend.