File size: 581 Bytes
3370983
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from pydantic import BaseModel, Field
from typing import Optional, Dict, Any

class CVScreeningOutput(BaseModel):
    # CRITICAL: Keep llm_feedback as the first field. 
    # This enforces Chain-of-Thought reasoning: the model must explain its assessment
    # BEFORE assigning scores, leading to better calibration. DO NOT REORDER.
    llm_feedback: str
    skills_match_score: float = Field(..., ge=0, le=1)
    experience_match_score: float = Field(..., ge=0, le=1)
    education_match_score: float = Field(..., ge=0, le=1)
    overall_fit_score: float = Field(..., ge=0, le=1)