You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services/apps/merge_suggestions_worker/src/workflows/mergeMembersWithLLM.ts
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -45,8 +45,13 @@ export async function mergeMembersWithLLM(
45
45
4. Display Name: Tokenize using both character and word tokenization. When the display name is more than one word, and the difference is a few edit distances consider it a strong indication of similarity.
46
46
When one display name is contained by the other, check other fields for the final decision. The same members on different platforms might have different display names.
47
47
Display names can be multiple words and might be sorted in different order in different platforms for the same member.
48
-
Pro tip: If members have identities in the same platform (member1.identities[x].platform === member2.identities[y].platform) and if these identities have different usernames(member1.identities[x].value !== member2.identities[y].value) you can label them as different.
49
-
Only do such labeling if both members have identities in the same platform. If they don't have identities in the same platform ignore the pro tip.
48
+
CRITICAL RULE - NEVER MERGE IF SAME PLATFORM WITH DIFFERENT VALUES:
49
+
Before making any decision, you MUST check if both members have identities on the same platform.
50
+
If member1.identities[x].platform === member2.identities[y].platform (they share a platform), then:
51
+
- Check if member1.identities[x].value === member2.identities[y].value
52
+
- If the values are DIFFERENT, immediately return 'false' - these are definitely different people
53
+
- This rule applies REGARDLESS of how similar other fields appear.
54
+
This check must be performed FIRST before evaluating any other similarities. Only do such labeling if both members have identities in the same platform. If they don't have identities in the same platform, ignore the rule.
50
55
Print 'true' if they are the same member, 'false' otherwise. No explanation required. Don't print anything else.`
0 commit comments