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
@@ -43,6 +43,7 @@ describe("candidate card presentation", () => {
|
||||
experience_band: "1_3",
|
||||
work_formats: ["remote"],
|
||||
salary_compatibility: null,
|
||||
projects: null,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -88,6 +89,7 @@ describe("candidate card presentation", () => {
|
||||
experience_band: null,
|
||||
work_formats: null,
|
||||
salary_compatibility: null,
|
||||
projects: null,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -122,6 +124,7 @@ describe("candidate card presentation", () => {
|
||||
experience_band: null,
|
||||
work_formats: null,
|
||||
salary_compatibility: null,
|
||||
projects: null,
|
||||
}),
|
||||
evidence: {
|
||||
items: [
|
||||
@@ -158,6 +161,7 @@ describe("candidate card presentation", () => {
|
||||
experience_band: null,
|
||||
work_formats: null,
|
||||
salary_compatibility: null,
|
||||
projects: null,
|
||||
}),
|
||||
);
|
||||
expect(published?.evidence).toEqual([]);
|
||||
|
||||
@@ -32,6 +32,7 @@ function published(overrides: Partial<CardPreview> = {}): CardPreview {
|
||||
experience_band: null,
|
||||
work_formats: null,
|
||||
salary_compatibility: null,
|
||||
projects: null,
|
||||
},
|
||||
evidence: {
|
||||
items: [
|
||||
@@ -110,6 +111,7 @@ describe("employer card preview", () => {
|
||||
experience_band: null,
|
||||
work_formats: null,
|
||||
salary_compatibility: null,
|
||||
projects: null,
|
||||
},
|
||||
evidence: { items: [] },
|
||||
}),
|
||||
|
||||
@@ -24,6 +24,7 @@ function blankProfile(): CandidateProfile {
|
||||
experience: [],
|
||||
experience_overlaps: [],
|
||||
soft_skills: [],
|
||||
projects: [],
|
||||
terms: {
|
||||
location: unknownClaim,
|
||||
relocation: unknownClaim,
|
||||
|
||||
@@ -46,6 +46,7 @@ function matchResponseFixture(): MatchSearchResponseOutput {
|
||||
{ code: "confirmed_category", state: "supports" },
|
||||
{ code: "required_skill_evidence", state: "supports" },
|
||||
],
|
||||
semantic_evidence: [],
|
||||
components: {
|
||||
fit: 0.82,
|
||||
coverage: 0.76,
|
||||
@@ -75,6 +76,7 @@ function matchResponseFixture(): MatchSearchResponseOutput {
|
||||
salary_compatibility: null,
|
||||
},
|
||||
evidence_summary: [{ code: "required_skill_evidence", state: "partial" }],
|
||||
semantic_evidence: [],
|
||||
components: {
|
||||
fit: 0.48,
|
||||
coverage: 0.18,
|
||||
@@ -104,6 +106,7 @@ function matchResponseFixture(): MatchSearchResponseOutput {
|
||||
salary_compatibility: "compatible",
|
||||
},
|
||||
evidence_summary: [{ code: "declared_grade", state: "declared_only" }],
|
||||
semantic_evidence: [],
|
||||
components: { fit: 0.51, coverage: 0.38 },
|
||||
unknown_flags: [
|
||||
{ component: "assessment", reason: "no_confirmation_for_specialization" },
|
||||
|
||||
@@ -275,6 +275,8 @@ function confirmedToTransport(candidate: MatchConfirmedCardModel): ConfirmedCand
|
||||
strength: candidate.strength,
|
||||
public_context: publicContextToTransport(candidate.publicContext),
|
||||
evidence_summary: candidate.evidenceSummary.map(({ code, state }) => ({ code, state })),
|
||||
// The card model does not carry the semantic explanation yet.
|
||||
semantic_evidence: [],
|
||||
components: { ...components, rank_score: rankScore },
|
||||
unknown_flags: candidate.unknownFlags.map(({ component, reason }) => ({ component, reason })),
|
||||
};
|
||||
@@ -290,6 +292,8 @@ function unconfirmedToTransport(candidate: MatchUnconfirmedCardModel): Unconfirm
|
||||
strength: null,
|
||||
public_context: publicContextToTransport(candidate.publicContext),
|
||||
evidence_summary: candidate.evidenceSummary.map(({ code, state }) => ({ code, state })),
|
||||
// The card model does not carry the semantic explanation yet.
|
||||
semantic_evidence: [],
|
||||
components: { fit: candidate.components.fit, coverage: candidate.components.coverage },
|
||||
unknown_flags: candidate.unknownFlags.map(({ component, reason }) => ({ component, reason })),
|
||||
};
|
||||
|
||||
@@ -50,6 +50,7 @@ export function matchResponseFixture(
|
||||
{ code: "required_skill_evidence", state: "supports" },
|
||||
{ code: "desired_skill_evidence", state: "declared_only" },
|
||||
],
|
||||
semantic_evidence: [],
|
||||
components: {
|
||||
fit: 0.7125,
|
||||
coverage: 0.853333,
|
||||
@@ -88,6 +89,7 @@ export function matchResponseFixture(
|
||||
{ code: "confirmed_category", state: "supports" },
|
||||
{ code: "required_skill_evidence", state: "partial" },
|
||||
],
|
||||
semantic_evidence: [],
|
||||
components: {
|
||||
fit: 0.4,
|
||||
coverage: 0.18,
|
||||
@@ -123,6 +125,7 @@ export function matchResponseFixture(
|
||||
{ code: "declared_grade", state: "declared_only" },
|
||||
{ code: "required_skill_evidence", state: "gap" },
|
||||
],
|
||||
semantic_evidence: [],
|
||||
components: { fit: 0.51, coverage: 0.38 },
|
||||
unknown_flags: [
|
||||
{ component: "assessment", reason: "no_confirmation_for_specialization" },
|
||||
@@ -142,6 +145,7 @@ export function matchResponseFixture(
|
||||
salary_compatibility: null,
|
||||
},
|
||||
evidence_summary: [],
|
||||
semantic_evidence: [],
|
||||
components: { fit: 0.2, coverage: 0 },
|
||||
unknown_flags: [
|
||||
{ component: "assessment", reason: "no_confirmation_for_specialization" },
|
||||
|
||||
Reference in new issue
Block a user