feat(matching): rank with semantic embeddings and explain matches by evidence

This commit is contained in:
shira committed 2026-10-11 10:39:46 +03:00
1 parent facc1789b1
commit 24b64d698a
215 files changed
+16951 -327

No files matched your search

@@ -353,6 +353,91 @@ schemas:
maxItems: 12
items:
$ref: "#/schemas/MatchEvidenceSummaryItem"
MatchRequirementKind:
type: string
description: Kind of the need requirement that an explanation item answers.
enum:
- required_skill
- desired_skill
- task
MatchSemanticItemKind:
type: string
description: |-
Kind of the published card item that matched a requirement.
- project: one published project; `project_title` names it.
- stack: the recognized technology codes of the card.
- roles: the specializations and grades that the card shows.
enum:
- project
- stack
- roles
MatchSimilarityBand:
type: string
description: >-
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.
enum:
- high
- medium
MatchSemanticEvidence:
type: object
description: >-
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.
additionalProperties: false
required:
- requirement_kind
- requirement_text
- item_kind
- project_title
- repository_verified
- similarity
properties:
requirement_kind:
$ref: "#/schemas/MatchRequirementKind"
requirement_text:
type: string
minLength: 1
maxLength: 300
description: Confirmed skill name or task text of the need. Plain text; show it as text, never as HTML.
item_kind:
$ref: "#/schemas/MatchSemanticItemKind"
project_title:
description: Published project title for `project`, otherwise null. Plain text; show it as text, never as HTML.
oneOf:
- type: string
minLength: 1
maxLength: 100
- type: "null"
repository_verified:
type: boolean
description: >-
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:
$ref: "#/schemas/MatchSimilarityBand"
MatchSemanticEvidenceList:
type: array
description: >-
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.
maxItems: 12
items:
$ref: "#/schemas/MatchSemanticEvidence"
MatchPublicStack:
type: array
maxItems: 4
@@ -469,6 +554,7 @@ schemas:
- strength
- public_context
- evidence_summary
- semantic_evidence
- components
- unknown_flags
properties:
@@ -493,6 +579,8 @@ schemas:
$ref: "#/schemas/MatchPublicContext"
evidence_summary:
$ref: "#/schemas/MatchEvidenceSummary"
semantic_evidence:
$ref: "#/schemas/MatchSemanticEvidenceList"
components:
$ref: "#/schemas/MatchConfirmedComponents"
unknown_flags:
@@ -514,6 +602,7 @@ schemas:
- strength
- public_context
- evidence_summary
- semantic_evidence
- components
- unknown_flags
properties:
@@ -540,6 +629,8 @@ schemas:
$ref: "#/schemas/MatchPublicContext"
evidence_summary:
$ref: "#/schemas/MatchEvidenceSummary"
semantic_evidence:
$ref: "#/schemas/MatchSemanticEvidenceList"
components:
$ref: "#/schemas/MatchUnconfirmedComponents"
unknown_flags: