Leave out titles by phrase: an exclude gate mode and a title gate field
A role whose title holds one of the agent's phrases as whole words is gated with the phrase as its reason, a favourite's too. The agent form has a Leave out titles line under Where. function = sales could not do it, since the classifier files Solutions Engineer and pre-sales under sales. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4e827665dd
commit
8c6ea0ffb6
8 files changed
+116
-21
No files matched your search
+12
-5
@@ -1167,21 +1167,26 @@ class Application(Model):
|
||||
|
||||
#: The role columns a gate can name. `company` matches on the company key;
|
||||
#: `place` takes the Place filter's tokens (`app.places`: `country:DK`,
|
||||
#: `region:skane`, `place:malmo`, bare text a `place:`) on whole words; the rest are
|
||||
#: `region:skane`, `place:malmo`, bare text a `place:`) on whole words; `title`
|
||||
#: matches a value as whole words anywhere in the title, folded as `title_key`
|
||||
#: folds it, so `account executive` finds "Enterprise Account Executive, UK"
|
||||
#: and `data engineer` does not find "Data Engineering Manager"; the rest are
|
||||
#: case-insensitive equality, except `salary_min` (at least the value) and
|
||||
#: `languages` (every language the role requires is one of the values).
|
||||
GateField = Literal["place", "country", "remote", "seniority", "function", "salary_min",
|
||||
"currency", "permit", "languages", "company"]
|
||||
"currency", "permit", "languages", "company", "title"]
|
||||
GATE_FIELDS: tuple[str, ...] = get_args(GateField)
|
||||
|
||||
GateMode = Literal["require", "any", "prefer"]
|
||||
GateMode = Literal["require", "any", "prefer", "exclude"]
|
||||
|
||||
|
||||
class Gate(Model):
|
||||
"""One condition of an agent. `require` gates a role that fails it (the
|
||||
row is kept with the reason); the `any` gates together are one group a
|
||||
role must match at least one of ("in Denmark, or remote"); `prefer` adds
|
||||
`weight` to its score when it matches. A gate rejects on evidence only: a
|
||||
`weight` to its score when it matches; `exclude` gates a role that matches
|
||||
any of its values ("title account executive"), a favourite's too. A gate
|
||||
rejects on evidence only: a
|
||||
role whose column is empty is not rejected, since `extract` fills the
|
||||
column later for the roles that rank, and only for those."""
|
||||
|
||||
@@ -1297,7 +1302,9 @@ class Agent(Model):
|
||||
class Candidate(Model):
|
||||
"""What scoring reads about one open role for one agent: its posted
|
||||
date (for `recency`), its company's affinity for that agent, and per
|
||||
gate `1` match, `0` no match, `-1` the column is empty."""
|
||||
gate `1` match, `0` no match, `-1` the column is empty. An `exclude`
|
||||
gate's match is the position of the first value it matched, from 1, so
|
||||
the reason can name it."""
|
||||
|
||||
uid: str
|
||||
posted_at: str
|
||||
|
||||
Reference in new issue
Block a user