Skip to content

Commit f05aec3

Browse files
committed
fix: merge members llm prompt
1 parent d6c42aa commit f05aec3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

services/apps/merge_suggestions_worker/src/workflows/mergeMembersWithLLM.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ export async function mergeMembersWithLLM(
4545
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.
4646
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.
4747
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.
5055
Print 'true' if they are the same member, 'false' otherwise. No explanation required. Don't print anything else.`
5156

5257
const suggestions = await memberActivitiesProxy.getRawMemberMergeSuggestions(

0 commit comments

Comments
 (0)