27 lines
863 B
Python
27 lines
863 B
Python
"""The suitability verdict exchanged with the summary-vs-job-post gate.
|
|
|
|
Pure module: no FastAPI imports and no HTTPException.
|
|
|
|
``extra="forbid"`` is load-bearing — it emits ``additionalProperties: false``, which
|
|
structured outputs requires (same reason as inbox_classifier/models.py).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class SummarySuitabilityVerdict(BaseModel):
|
|
"""One coarse decision: is a full CV-vs-JD ATS score worth running?
|
|
|
|
``confidence`` is the gradient. The boolean is the recruiter-shaped answer;
|
|
doubt belongs here so SUMMARY_GATE_MIN_CONFIDENCE can raise the bar without
|
|
changing the prompt.
|
|
"""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
is_suitable: bool
|
|
confidence: float = Field(ge=0.0, le=1.0)
|
|
evidence: str = Field(min_length=1, max_length=200)
|