Extracteur de compétences de CV
Trier des CV à la main, c’est relire les mêmes pages pour répondre à trois questions : que peut vraiment faire cette personne, jusqu’où va chaque compétence, et combien d’expérience l’appuie ? Ce prompt extrait un profil de compétences structuré depuis un CV : le nom du candidat, chaque compétence avec ses années d’expérience et un niveau de débutant à expert, les principaux langages de programmation par ordre d’importance, et le nombre total d’années d’expérience. Il est conçu pour les recruteurs et les files d’embauche qui ont besoin de données comparables sur des centaines de CV, et non de résumés en texte libre. Les pièges sont familiers : les compétences figurant dans un titre de poste ne sont pas les mêmes que celles démontrées dans le travail, « familier avec » n’est pas « avancé », et une carrière de cinq ans signifie rarement cinq ans dans chaque compétence énumérée. Les années d’expérience restent null quand le CV ne les indique pas — ne les estimez jamais à partir des dates d’obtention de diplôme — et le niveau suit les preuves contenues dans le CV, et non les adjectifs du candidat.
Prompt système
You are a precise resume skill extraction engine. Read the provided resume text and return ONLY a valid JSON object matching the schema below. Do not add explanations, markdown, or extra fields. Extract the candidate_name exactly as printed on the resume. skills contains one object per distinct skill evidenced in the resume, with the skill name, a level of beginner, intermediate, advanced or expert, and years_experience. Set years_experience to null when the resume does not state a number of years for that skill; never estimate years from graduation dates or total career length. Judge the level from the evidence in the resume, such as years of use, seniority of the roles, and depth of the work described, not from the candidate's own adjectives. top_languages lists the main programming languages evidenced in the resume, in order of prominence, as an empty array when none are evidenced. total_years_experience is the total professional experience stated on the resume, or null when it is not stated and cannot be derived from dated roles without guessing. Never invent a skill, a language, a year count, or a level that is not evidenced in the resume. Never use an empty string for a required text field. If no candidate name is printed on the resume, do not produce any output.
Schéma JSON brut
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ResumeSkills",
"type": "object",
"additionalProperties": false,
"required": ["candidate_name", "skills", "top_languages", "total_years_experience"],
"properties": {
"candidate_name": {
"type": "string",
"minLength": 1
},
"skills": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["skill", "years_experience", "level"],
"properties": {
"skill": { "type": "string", "minLength": 1 },
"years_experience": { "type": ["number", "null"], "minimum": 0 },
"level": {
"type": "string",
"enum": ["beginner", "intermediate", "advanced", "expert"]
}
}
}
},
"top_languages": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"total_years_experience": {
"type": ["number", "null"],
"minimum": 0
}
}
}
Zod (TypeScript)
import { z } from "zod";
const SkillSchema = z.object({
skill: z.string().min(1),
years_experience: z.number().nonnegative().nullable(),
level: z.enum(["beginner", "intermediate", "advanced", "expert"]),
}).strict();
export const ResumeSkillsSchema = z.object({
candidate_name: z.string().min(1),
skills: z.array(SkillSchema).min(1),
top_languages: z.array(z.string().min(1)),
total_years_experience: z.number().nonnegative().nullable(),
}).strict();
Pydantic v2 (Python)
from typing import Annotated, Literal
from pydantic import BaseModel, ConfigDict, Field, field_validator
class Skill(BaseModel):
model_config = ConfigDict(extra="forbid")
skill: str = Field(..., min_length=1)
years_experience: float | None = Field(..., ge=0)
level: Literal["beginner", "intermediate", "advanced", "expert"]
@field_validator("skill", mode="before")
@classmethod
def _strip_skill(cls, v):
if not isinstance(v, str):
return v
return v.strip()
class ResumeSkills(BaseModel):
model_config = ConfigDict(extra="forbid")
candidate_name: str = Field(..., min_length=1)
skills: list[Skill] = Field(..., min_length=1)
top_languages: list[Annotated[str, Field(min_length=1)]] = Field(...)
total_years_experience: float | None = Field(..., ge=0)
@field_validator("candidate_name", mode="before")
@classmethod
def _strip_name(cls, v):
if not isinstance(v, str):
return v
return v.strip()