Skip to content

World's first open-source enterprise world model.

Do not present namesake reviews as 100% context similarity (#310)

Danielc5d64341917d
diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts
index be1b78e4..f1dd3c7d 100644
--- a/web/src/i18n/en.ts
+++ b/web/src/i18n/en.ts
@@ -1364,6 +1364,7 @@ export const en = {
escalate_no_verdict: "The adjudicator returned no verdict",
escalate_entity_changed: "The entity changed while being adjudicated",
escalate_unsure: "The adjudicator was not confident enough",
+ namesake: "Two entities with this name in one document",
/* 名字互相包含:等值召回看不见,简称会静默变成第二个实体 */
contains: "One name contains the other",
ambiguous_name: "Same name, context did not settle it",
diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts
index e56e1555..cdb702d1 100644
--- a/web/src/i18n/zh.ts
+++ b/web/src/i18n/zh.ts
@@ -1218,6 +1218,7 @@ export const zh: Strings = {
escalate_no_verdict: "裁决没有给出结论",
escalate_entity_changed: "裁决过程中实体发生了变化",
escalate_unsure: "裁决的把握不够",
+ namesake: "同一篇文档里有两个同名实体",
contains: "一个名字包含另一个",
ambiguous_name: "同名,但上下文没能定夺",
type_drift: "同名,但类型不同",
diff --git a/web/src/pages/Review.tsx b/web/src/pages/Review.tsx
index 954d4d4c..bd1bd095 100644
--- a/web/src/pages/Review.tsx
+++ b/web/src/pages/Review.tsx
@@ -86,6 +86,8 @@ function DuplicateCard({
busy: boolean;
onDecide: (action: "merge" | "keep") => void;
}) {
+ const reasonCode = item.reason?.split("|", 1)[0];
+
return (
<div className="glass rounded-xl p-4">
<div className="flex gap-4">
@@ -101,9 +103,11 @@ function DuplicateCard({
? S.review.stageHuman
: S.review.stageAdjudicating}
</span>
- <span className="text-xs text-neutral-500">
- {S.review.similarity(Math.round(item.score * 100))}
- </span>
+ {reasonCode !== "namesake" && (
+ <span className="text-xs text-neutral-500">
+ {S.review.similarity(Math.round(item.score * 100))}
+ </span>
+ )}
{item.reason && (
<span className="text-xs text-neutral-600 truncate min-w-0">
{escalationText(item.reason)}