feat(matching): rank with semantic embeddings and explain matches by evidence
This commit is contained in:
1 parent
facc1789b1
commit
24b64d698a
215 files changed
+16951
-327
No files matched your search
@@ -17,6 +17,12 @@ export const matchConfirmedCandidatePublicContextWorkFormatsOneMax = 3;
|
||||
|
||||
export const matchConfirmedCandidateEvidenceSummaryMax = 12;
|
||||
|
||||
export const matchConfirmedCandidateSemanticEvidenceItemRequirementTextMax = 300;
|
||||
|
||||
export const matchConfirmedCandidateSemanticEvidenceItemProjectTitleOneMax = 100;
|
||||
|
||||
export const matchConfirmedCandidateSemanticEvidenceMax = 12;
|
||||
|
||||
export const matchConfirmedCandidateComponentsFitMin = 0;
|
||||
export const matchConfirmedCandidateComponentsFitMax = 1;
|
||||
|
||||
@@ -68,6 +74,14 @@ export const MatchConfirmedCandidate = zod.object({
|
||||
"code": zod.enum(['confirmed_category', 'required_skill_evidence', 'desired_skill_evidence', 'domain_alignment', 'task_alignment', 'work_conditions_match', 'salary_compatibility', 'declared_grade']).describe('Template code for an explanation derived from allowed evidence. It carries no free text, raw answer, or reason for withheld FSP data.'),
|
||||
"state": zod.enum(['supports', 'partial', 'gap', 'declared_only'])
|
||||
}).describe('A templated, non-text evidence explanation.')).max(matchConfirmedCandidateEvidenceSummaryMax),
|
||||
"semantic_evidence": zod.array(zod.object({
|
||||
"requirement_kind": zod.enum(['required_skill', 'desired_skill', 'task']).describe('Kind of the need requirement that an explanation item answers.'),
|
||||
"requirement_text": zod.string().min(1).max(matchConfirmedCandidateSemanticEvidenceItemRequirementTextMax).describe('Confirmed skill name or task text of the need. Plain text; show it as text, never as HTML.'),
|
||||
"item_kind": zod.enum(['project', 'stack', 'roles']).describe('Kind of the published card item that matched a requirement.\n\n- project: one published project; `project_title` names it.\n- stack: the recognized technology codes of the card.\n- roles: the specializations and grades that the card shows.'),
|
||||
"project_title": zod.union([zod.string().min(1).max(matchConfirmedCandidateSemanticEvidenceItemProjectTitleOneMax),zod.null()]).describe('Published project title for `project`, otherwise null. Plain text; show it as text, never as HTML.'),
|
||||
"repository_verified": zod.boolean().describe('True only for a project whose linked repository the latest server check found public on GitHub ("backed by a public repository"). It does not prove authorship.'),
|
||||
"similarity": zod.enum(['high', 'medium']).describe('Coarse band of the cosine similarity between the requirement and the matched item under the versioned policy thresholds. `high` and `medium` are the only values; a weaker similarity produces no item. The band is a computed similarity of two texts, not a judgement of the candidate.')
|
||||
}).describe('Why the entry is in the result: one confirmed requirement of the need and the published card item with the highest semantic similarity to it. The server computes it from stored vectors and the versioned thresholds; no model writes text into it. `requirement_text` is the confirmed text of the organization\'s own need. `project_title` is the title the candidate published with the `projects` card field and is null for other kinds. No repository address, owner, or fetched repository text is ever part of it.')).max(matchConfirmedCandidateSemanticEvidenceMax).describe('Semantic explanation items in a stable order: `high` before `medium`, then by similarity, then by the order of the requirements in the need. At most the versioned per-entry limit is returned. It is empty for a bank search, while vectors are not ready, when ML is unavailable, and when no requirement reaches a band; `unknown_flags` names `ml_unavailable` when the semantic component itself is unknown.'),
|
||||
"components": zod.object({
|
||||
"fit": zod.number().min(matchConfirmedCandidateComponentsFitMin).max(matchConfirmedCandidateComponentsFitMax).describe('A normalized FR09 ranking component from 0 to 1.'),
|
||||
"coverage": zod.number().min(matchConfirmedCandidateComponentsCoverageMin).max(matchConfirmedCandidateComponentsCoverageMax).describe('A normalized FR09 ranking component from 0 to 1.'),
|
||||
|
||||
Reference in new issue
Block a user