Make the three CV match weights a per-agent setting, applied when a role is served
cv_skills, cv_experience and cv_career live in agents.weights (30, 25, 30 by default), edited on the Search agents page beside fit and recency. cv_score is worked out at read time in the feed order, the row and the reader, so changing them asks the model for nothing and leaves the judge's input_key alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d5df707148
commit
585c332d74
8 files changed
+147
-28
No files matched your search
+24
-7
@@ -1007,21 +1007,31 @@ def language_flag(required: list[RoleLanguage],
|
||||
return "", ""
|
||||
|
||||
|
||||
def cv_score(skills: int, experience: int, career: int) -> float:
|
||||
"""The one number of a CV match, 0 to 100: skills and career weigh 30,
|
||||
experience 25 (docs/decisions.md, the CV match)."""
|
||||
return round((30 * skills + 25 * experience + 30 * career) / 85, 1)
|
||||
def cv_score(skills: int, experience: int, career: int,
|
||||
weights: "Weights | None" = None) -> float | None:
|
||||
"""The one number of a CV match, 0 to 100: the three numbers of the
|
||||
judge averaged by the agent's `cv_skills`, `cv_experience` and
|
||||
`cv_career` weights (30, 25 and 30 by default). None when all three
|
||||
weights are 0."""
|
||||
w = weights or Weights()
|
||||
total = w.cv_skills + w.cv_experience + w.cv_career
|
||||
if not total:
|
||||
return None
|
||||
return round((w.cv_skills * skills + w.cv_experience * experience
|
||||
+ w.cv_career * career) / total, 1)
|
||||
|
||||
|
||||
class Judgement(Model):
|
||||
"""What `judge` read of one role for one agent (`role_judgements`): the
|
||||
three dimensions 0 to 100, `cv_score` (`cv_score`), and 1 to 3 strengths
|
||||
and gaps grounded in the posting."""
|
||||
three dimensions 0 to 100, `cv_score` (`cv_score`) and 1 to 3 strengths
|
||||
and gaps grounded in the posting. `cv_score` is not read from the table:
|
||||
`Store.judgement` sets it from the agent's weights; None when all three
|
||||
are 0."""
|
||||
|
||||
skills: int
|
||||
experience: int
|
||||
career: int
|
||||
cv_score: float
|
||||
cv_score: float | None = None
|
||||
strengths: JsonStrings = []
|
||||
gaps: JsonStrings = []
|
||||
judged_at: str
|
||||
@@ -1403,6 +1413,13 @@ class Weights(Model):
|
||||
affinity: float = Field(0.2, ge=0)
|
||||
#: Cosine to the liked-minus-passed direction of the agent's votes.
|
||||
taste: float = Field(0.2, ge=0)
|
||||
#: How much each of the judge's three numbers counts in `cv_score`. Not
|
||||
#: a score term: they are read when a role is served, so changing them
|
||||
#: asks the model for nothing. 0 leaves a number out, all three 0 means
|
||||
#: no `cv_score`.
|
||||
cv_skills: float = Field(30, ge=0, le=1000, allow_inf_nan=False)
|
||||
cv_experience: float = Field(25, ge=0, le=1000, allow_inf_nan=False)
|
||||
cv_career: float = Field(30, ge=0, le=1000, allow_inf_nan=False)
|
||||
|
||||
|
||||
class Limits(Model):
|
||||
|
||||
Reference in new issue
Block a user