How Vekt scores a CV, step by step
How AI resume screening works in an open-source ATS: Vekt's real pipeline from PDF to score, with the prompt, the threshold and what gets recorded.
Most explanations of AI resume screening stop at “the AI reads the CV and ranks candidates”. This post shows how it works in one real system, step by step: what happens to a CV in Vekt, our free, open-source ATS, from the moment a candidate uploads a PDF to the moment a recruiter sees a score. Because Vekt’s code is public, every step below links to what actually runs, including the parts that are rough.
One thing to know before you start: the score at the end is a reading-order hint, not a measurement. Vekt’s scores are uncalibrated and have never been measured against real hiring outcomes, so Vekt claims no accuracy figure. We come back to that at the end, because it decides how you should use everything in between.
Every Vekt fact here was checked on 24 November 2026 in the Vekt repository at commit d1f0873: mainly app/api/candidates/route.ts, lib/redact.ts, lib/ai.ts, lib/scoring.ts, lib/queue.ts, the Prisma schema and docs/compliance/.
The pipeline at a glance
Candidate submits the form: name, email, consent, PDF CV, screening answers
│
▼
1. Upload checks PDF only, max 5 MB, consent required, rate limits
│ PDF saved under a random UUID ──► uploads volume
▼
2. Text extraction unpdf pulls the text layer out of the PDF
│ CV text + answers saved ──► SQLite (db-data)
▼
3. Queue event "vekt/candidate.created" ──► Inngest
│
▼ (Inngest function "analyze-candidate", up to 5 retries)
4. Confirmation email "applied" email via Resend (failure doesn't stop scoring)
5. Status ANALYZING
6. Identifier removal lib/redact.ts: email, URLs, date of birth,
│ nationality/gender lines, phone, candidate's name
▼
7. Prompt system prompt + job title + description
│ + optional weighting criteria + redacted CV
▼
8. Model call AI_PROVIDER: mock | ollama | openai | openrouter
│ JSON back: score, reasoning, pros, cons
▼
9. Checks all four fields present? score rounded, clamped 0–100
│
▼
10. Decision score ≥ job threshold (default 75) ──► SHORTLISTED
│ score < threshold ──► NEEDS_REVIEW
│ (REJECTED only if an admin enabled auto-reject)
▼
11. Record evaluation + provenance saved in one transaction
│
▼
12. Emails shortlisted: delayed email (48 h default, cancellable)
needs review: no email until a recruiter decides
The rest of this post walks through each step.
Step 1: the application arrives
The candidate fills in the application form on a job page. The upload route in app/api/candidates/route.ts refuses the application unless consent to data processing is given, the file is a PDF, and it is under 5 MB. It also limits submissions to 5 per IP address and 3 per email address per hour, and checks that the job is still accepting applications.
The PDF is stored in a private folder under a random UUID file name, not the name the candidate gave it. Screening-question answers are saved too, after every question and option ID is checked against the job they were submitted for. (Those answers are shown to the recruiter next to the AI reasoning, but they are not part of the prompt: the model never sees them.)
Step 2: text extraction
Vekt extracts the CV text with unpdf, a library that ships a build of Mozilla’s PDF.js. It calls extractText with mergePages: true, which returns the text of all pages as one string.
Two consequences matter for candidates:
- Only the text layer is read. unpdf includes no OCR; its README offers a helper to spot scanned pages “before sending them to OCR”. A CV that is a scan or a picture of text gives the model little or nothing to read. If extraction fails outright, Vekt logs a warning and carries on with empty text, so check the CV of any surprisingly low score.
- Layout can change the result. Vekt’s limitations document says extraction from “a two-column or graphics-heavy PDF is lossy, which penalises candidates for design choices rather than qualifications.”
Photos are never sent anywhere: only extracted text goes on to the next steps.
Step 3: the queue
The upload request doesn’t wait for the AI. It sends an event, vekt/candidate.created, to Inngest, the background job runner Vekt uses (the Docker Compose setup runs it as its own container), and returns the candidate a status page link.
The function that picks the event up, analyze-candidate in lib/queue.ts, is split into named steps and set to retries: 5. Inngest’s docs explain what that buys: a step that has succeeded “doesn’t run again once it succeeds”, and “each step.run() has its own retry counter, so one failing step does not restart earlier completed steps” (durable execution, retries). So if the model call times out, the confirmation email isn’t sent a second time when it retries.
Steps 4 and 5: confirmation and status
The first steps send the candidate an “application received” email through Resend and set the candidate’s status to ANALYZING. A failed email is logged and doesn’t stop the scoring.
Step 6: identifier removal
Before the prompt is built, redactIdentity in lib/redact.ts replaces direct identifiers in the CV text and counts what it replaced. In this order:
| What | Replaced with | Count key |
|---|---|---|
| Email addresses | [EMAIL] |
email |
Web addresses, including linkedin.com/ and github.com/ links |
[URL] |
url |
| Lines labelled date of birth (English, Dutch, Danish/Norwegian labels) | [DATE OF BIRTH REMOVED] |
dob |
| Lines labelled nationality, citizenship, marital status, gender or sex | [PERSONAL ATTRIBUTE REMOVED] |
personalAttribute |
| Phone numbers with an international prefix, or runs of 7 to 15 digits | [PHONE] |
phone |
| Each part of the name typed in the form (whole word, any case) | [CANDIDATE] |
name |
It does not remove postal addresses, universities, languages, career gaps or anything else that hints at age, origin or gender. The code comment calls it “a mitigation, not a guarantee”, and our local LLM guide covers its side effects in detail.
Step 7: the prompt
The prompt has two parts. The system prompt, word for word from lib/ai.ts:
You are an expert recruitment screening AI called Vekt.
Your job is to evaluate a candidate's resume against a specific job description and custom weighting criteria.
You MUST respond with valid JSON only — no markdown, no explanation outside the JSON.
The JSON must have exactly these fields:
{
"score": <integer 0-100>,
"reasoning": "<exactly 2 sentences justifying the score>",
"pros": ["<bullet 1>", "<bullet 2>", ...],
"cons": ["<bullet 1>", "<bullet 2>", ...]
}
The user message is built from the job and the redacted CV, in Markdown sections:
## Job Title
<the job's title>
## Job Description
<the job's description>
## Weighting & Evaluation Criteria (IMPORTANT — follow strictly)
<the job's "AI Weighting Prompt", only if the recruiter filled it in>
## Candidate Resume
<the redacted CV text>
The weighting section is the recruiter’s main lever. The job form suggests something like “Prioritize 3+ years of React experience. Penalize lack of testing knowledge.” It is also unconstrained: the limitations document warns that “a deployer can write weighting criteria that encode discrimination. Nothing in the code prevents this.” Write criteria about the job, and have someone else read them.
A note on the score formula. Vekt’s README shows the score as a weighted sum, 0.4 × relevance + 0.6 × experience. The code as it stands doesn’t compute that: there are no separate relevance and experience scores. The model returns one number from 0 to 100, guided by the job description and your weighting criteria. If you want experience to count for more, say so in the weighting prompt.
Step 8: the model call
AI_PROVIDER picks where the prompt goes. All four options get the same prompt and must return the same JSON:
AI_PROVIDER |
Where the prompt goes | How JSON is requested |
|---|---|---|
mock (default) |
Nowhere. A pseudo-score from 40 to 100, derived from the prompt’s hash | Built in code |
ollama |
An Ollama server you run (OLLAMA_BASE_URL, default model llama3.2) |
format: "json" |
openai |
api.openai.com (default model gpt-4o) |
response_format: json_object |
openrouter |
OpenRouter, then the provider hosting the model (default openai/gpt-4o-mini) |
response_format: json_object |
mock is there for development and assesses nothing, which its reasoning text says outright. With ollama, the CV text stays on hardware you run; with openai or openrouter, the redacted text goes to that company. The Ollama guide has the settings and a diagram of where the text goes with each one.
Step 9: checking the answer
Vekt doesn’t trust the reply blindly. If the response isn’t valid JSON, or lacks a numeric score, a text reasoning or the pros and cons lists, the step fails and the raw reply is logged (truncated), so Inngest retries it. A valid score is rounded to a whole number and clamped to 0–100: a model that answers 104.6 gets 100.
What it doesn’t check: whether the reasoning really is two sentences, or whether the pros and cons say anything true about the CV. That is the reviewer’s job.
Step 10: the decision rule
The whole decision is in lib/scoring.ts, and it is short:
| Score | AUTO_REJECT_BELOW_THRESHOLD |
New status | Email scheduled |
|---|---|---|---|
| At or above the job’s threshold | either | SHORTLISTED |
Shortlisted email, after the delay |
| Below the threshold | off (default) | NEEDS_REVIEW |
None: a recruiter decides first |
| Below the threshold | on | REJECTED |
Rejection email, after the delay |
Each job has its own threshold, set in the job form from 0 to 100 (default 75). AUTO_REJECT_BELOW_THRESHOLD is an admin setting that is off by default and sits next to a warning in the admin panel; human oversight explains why. With it off, a low score never rejects anyone. It only moves the candidate to a pile a person has to go through.
Step 11: what gets recorded
The evaluation and the status change are saved in one database transaction, so you never get a score without a status or the reverse. Each evaluation row holds:
| Field | What it is |
|---|---|
score, reasoning, pros, cons |
The model’s answer, after the checks |
promptSnapshot |
The exact system prompt and user message sent, redacted CV included |
provider, model |
Which provider and model produced it |
promptHash |
SHA-256 of the prompt snapshot |
evaluatorVersion |
Version of the prompt and pipeline code, currently 2026.09.1 |
redactions |
Replacement counts, for example {"email":1,"phone":1,"name":3} |
autoDecision |
Whether auto-reject was switched on at the time |
This is what lets you answer “why did this candidate get 62?” months later, after the model has changed. The record goes when the candidate does: the evaluation is deleted with the candidate once the retention period you set has passed.
Step 12: emails and the recruiter’s turn
A shortlisted candidate’s email is not sent straight away. It is scheduled with a delay, 48 hours unless an admin changes STATUS_EMAIL_DELAY_HOURS, and cancelled if a recruiter changes the candidate’s status first. Every decision a recruiter makes, accept, shortlist or reject, cancels the pending email and schedules the one that matches.
In the recruiter view, applications for a job are sorted by score, and each candidate shows the score, the two-sentence reasoning, the pros and cons, and the screening answers. Reviewers can shortlist, accept or reject anyone, whatever the score.
One exception: the development fallback
Everything above is the Inngest pipeline, which the Docker Compose setup uses: it requires INNGEST_EVENT_KEY. When that key is empty, as in a quick local run from source, Vekt evaluates the CV directly in the web process instead, and that shortcut is older than the steps above. In the current code it doesn’t pass the candidate’s name to the identifier removal, doesn’t save the provenance fields, and rejects below-threshold candidates with an immediate email rather than marking them for review. It also kicks in if sending the event to Inngest fails. Use it for development only, never with real candidates, and watch the log for falling back to direct evaluation.
What the score means, and what it doesn’t
After all twelve steps, the number a recruiter sees is one general-purpose language model’s answer to “score this CV from 0 to 100”. Vekt’s limitations document is plain about it:
- No accuracy has been measured. “Any number claimed for Vekt’s accuracy today would be invented.”
- Scores are not calibrated. The same CV scored again “can drift by several points”, so the threshold “sits on a noisy signal”.
- Scores are not comparable across models, providers, prompt edits or evaluator versions.
- Non-English CVs are untested.
So use the score to decide what to read first, not who to turn away. The document’s own advice: before you rely on it, score past applications whose outcome you know with your exact model, prompt and threshold, and check how often someone you hired would have fallen below the line. We wrote about why we publish these limits first.
FAQ
How does AI resume screening work in Vekt?
Vekt extracts the text from the PDF CV, removes direct identifiers such as name, email, phone and links, and sends the redacted text with the job title, description and optional weighting criteria to the AI provider you chose. The model returns a score from 0 to 100, two sentences of reasoning and lists of pros and cons. Candidates at or above the job’s threshold are shortlisted; the rest wait for a recruiter.
Does the AI reject candidates automatically?
Not by default. Below-threshold candidates are marked needs review and nobody is emailed until a recruiter decides. Automatic rejection only happens if an admin turns on AUTO_REJECT_BELOW_THRESHOLD, and each evaluation records whether it was on.
Can I change how the CV is weighted?
Yes, per job, through the optional “AI Weighting Prompt”, which is added to the prompt as evaluation criteria the model is told to follow strictly. There is no fixed formula in the code: the model returns a single score, so the weighting is whatever your criteria and job description ask for.
Does the AI see the candidate’s name or photo?
Photos never, because only extracted text is used. The name typed in the application form, email addresses, phone numbers, links and labelled personal details are replaced before the model sees the text. Indirect clues, such as universities, languages or career gaps, are not removed.
How accurate are Vekt’s scores?
Nobody knows yet: Vekt has never been measured against real hiring outcomes and claims no accuracy figure. The scores are uncalibrated and can drift between runs, which is why a person reviews every candidate below the threshold.