Duplicate Detective 标志

Duplicate Detective

组织
microsoft
duplicate-detective

Identifies potential duplicate Accounts, Contacts, or Leads in Dataverse using intelligent fuzzy matching that catches nicknames, abbreviations, phone format variations, and address similarities. Use when user says "find duplicates", "check for duplicate accounts", "are there any duplicate contacts", "duplicate detection", "clean up duplicates", "merge duplicates", or "data quality check".

Add to TypingMind

概览

发布者microsoft
代码仓库dataverse-business-skills
技能名称duplicate-detective
星标数
52
复刻数
9
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 microsoft 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Duplicate Detective AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/microsoft/dataverse-business-skills/tree/main/skills/duplicate-detective
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/dataverse-business-skills.git /tmp/dataverse-business-skills
mkdir -p .claude/skills
cp -r /tmp/dataverse-business-skills/skills/duplicate-detective .claude/skills/duplicate-detective
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Duplicate Detective,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Duplicate Detective。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Duplicate Detective 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Duplicate Detective

Sales and marketing teams often accumulate duplicate records due to data entry variations, imports from multiple sources, and inconsistent naming conventions. Standard Dataverse duplicate detection rules are limited (max 5 rules per table) and miss subtle duplicates. This skill provides intelligent duplicate detection to maintain data quality and prevent wasted effort on duplicate outreach.

Instructions

Step 1: Determine Scope of Duplicate Check

Ask the user or infer from context:

  1. Target Table: Account, Contact, or Lead (or all three)
  2. Scope:
    • Full scan of all records
    • Specific subset (e.g., records created in last 30 days)
    • Check against a specific record (e.g., "Find duplicates of Contoso")
  3. Matching Threshold: Strict (high confidence only) or Relaxed (include possible matches)
Step 2: Query Source Records

Based on scope, retrieve records to analyze:

For Accounts:

SELECT accountid, name, telephone1, telephone2, emailaddress1, 
       address1_line1, address1_city, address1_stateorprovince, address1_postalcode,
       websiteurl, numberofemployees, industrycode
FROM account 
WHERE statecode = 0

For Contacts:

SELECT contactid, firstname, lastname, fullname, emailaddress1, emailaddress2,
       telephone1, mobilephone, jobtitle, accountid,
       address1_line1, address1_city, address1_stateorprovince, address1_postalcode
FROM contact
WHERE statecode = 0

For Leads:

SELECT leadid, firstname, lastname, fullname, companyname, emailaddress1,
       telephone1, mobilephone, jobtitle, address1_line1, address1_city,
       address1_stateorprovince, address1_postalcode, websiteurl
FROM lead
WHERE statecode = 0
Step 3: Apply Fuzzy Matching Algorithms

3.1 Company/Account Name Matching Detect duplicates even with variations:

  • Abbreviation Handling: "International Business Machines" ↔ "IBM"
  • Legal Suffix Normalization: "Contoso Inc." ↔ "Contoso Corporation" ↔ "Contoso LLC"
  • Common Abbreviations: "Mfg" = "Manufacturing", "Intl" = "International"
  • Word Order Variations: "Microsoft Corporation" ↔ "Corporation Microsoft"
  • Punctuation & Spacing: "A.B.C. Company" ↔ "ABC Company"
  • The/A Prefix Handling: "The Contoso Group" ↔ "Contoso Group"

Matching Logic:

  1. Normalize both names (lowercase, remove punctuation, expand abbreviations)
  2. Calculate string similarity using:
    • Levenshtein distance (edit distance)
    • Jaro-Winkler similarity (handles transpositions)
    • Token-based matching (matching words regardless of order)
  3. Score: 90%+ = High confidence match, 75-89% = Possible match

3.2 Person Name Matching Detect duplicate contacts/leads:

  • Nickname Resolution: "Robert" ↔ "Bob" ↔ "Rob" ↔ "Bobby"
  • Name Variations: "William" ↔ "Will" ↔ "Bill" ↔ "Billy"
  • Initial Matching: "J. Smith" ↔ "John Smith"
  • Name Order: "John Smith" ↔ "Smith, John"
  • Hyphenated Names: "Mary Smith-Jones" ↔ "Mary Jones"
  • Middle Name Handling: "John Michael Smith" ↔ "John Smith"

Common Nickname Mappings:

Formal NameNicknames
RobertBob, Rob, Bobby, Robbie
WilliamWill, Bill, Billy, Willy
RichardRick, Rich, Dick
MichaelMike, Mikey
JamesJim, Jimmy, Jamie
ElizabethLiz, Beth, Betty, Lizzy
JenniferJen, Jenny
KatherineKate, Katie, Kathy, Cathy

3.3 Phone Number Matching Normalize and compare phone numbers:

  • Strip all formatting: "(555) 123-4567" → "5551234567"
  • Handle country code variations: "+1-555-123-4567" ↔ "555-123-4567"
  • Match across fields: telephone1 vs mobilephone vs telephone2
  • Consider area code changes for same base number

Phone Normalization Steps:

  1. Remove all non-numeric characters
  2. Remove leading country code if present (1 for US)
  3. Compare last 10 digits for US numbers
  4. Flag as match if any phone field matches

3.4 Email Address Matching Detect email-based duplicates:

3.5 Address Matching Detect address duplicates with variations:

  • Street Abbreviations: "Street" ↔ "St" ↔ "St."
  • Direction Abbreviations: "North" ↔ "N" ↔ "N."
  • Building/Suite Handling: "123 Main St Suite 100" ↔ "123 Main St"
  • Postal Code Normalization: "12345-6789" ↔ "12345"
  • State Variations: "California" ↔ "CA"

Address Normalization:

  1. Standardize street type abbreviations
  2. Standardize direction prefixes/suffixes
  3. Remove suite/apt/unit information for base comparison
  4. Normalize postal code to 5 digits
  5. Standardize state to 2-letter code
Step 4: Score and Rank Potential Duplicates

Composite Scoring Model: Calculate overall duplicate probability using weighted scores:

Field TypeWeight (Accounts)Weight (Contacts)Weight (Leads)
Name35%30%30%
Email25%30%30%
Phone20%20%20%
Address15%15%15%
Website5%-5%
Company (for contacts)-5%-

Score Thresholds:

  • High Confidence (90-100%): Almost certainly duplicates
  • Medium Confidence (75-89%): Likely duplicates, review recommended
  • Low Confidence (60-74%): Possible duplicates, investigate
Step 5: Group and Present Duplicate Sets

Organize Results:

Duplicate Set 1 (High Confidence - 95% match):
├── Record A: Contoso Inc. (accountid: xxx)
│   ├── Phone: (555) 123-4567
│   ├── Email: info@contoso.com
│   └── Address: 123 Main Street, Seattle, WA
└── Record B: Contoso Corporation (accountid: yyy)
    ├── Phone: 555.123.4567
    ├── Email: sales@contoso.com
    └── Address: 123 Main St, Seattle, WA 98101

Matching Signals:
- Company name: 92% similar (legal suffix variation)
- Phone: 100% match (format difference only)
- Address: 95% match (abbreviation variation)
Step 6: Provide Actionable Recommendations

For Each Duplicate Set, Recommend:

  1. Merge Recommendation:

    • Identify the "surviving" record (more complete, older, or more activity)
    • List fields to preserve from each record
    • Identify child records that would need reassignment
  2. Activity Analysis:

    • Count activities on each record
    • Identify which record has more recent engagement
    • Flag if merging would consolidate significant history
  3. Relationship Impact:

    • List opportunities linked to each account
    • Count contacts under each account
    • Identify potential data loss risks

Output Format:

DUPLICATE DETECTION SUMMARY
===========================

Scan Parameters:
- Table: Account
- Records Scanned: 5,432
- Date Range: All active records

Results:
- High Confidence Duplicates: 23 sets (46 records)
- Medium Confidence Duplicates: 45 sets (98 records)
- Low Confidence Duplicates: 12 sets (26 records)

TOP PRIORITY DUPLICATES (High Confidence):

1. [Account] Contoso Inc. ↔ Contoso Corporation
   Match Score: 95%
   Recommendation: Merge into "Contoso Inc." (more activity)
   Impact: 3 opportunities, 12 contacts would be consolidated
   
2. [Contact] Bob Smith ↔ Robert Smith (both at Contoso)
   Match Score: 92%
   Recommendation: Merge into "Robert Smith" (more complete record)
   Impact: 8 activities would be consolidated

3. [Lead] ABC Manufacturing ↔ A.B.C. Mfg Company
   Match Score: 91%
   Recommendation: Review - may be parent/subsidiary
   Impact: Different addresses - verify relationship first
Step 7: Execute Merge (If Requested)

If user wants to proceed with merge:

  1. Document Current State:

    • Export both records' data
    • List all child records
  2. Update Child Records:

    • Reassign contacts to surviving account
    • Update opportunity regardingobjectid
    • Move activities to surviving record
  3. Merge Field Values:

    • Keep most complete values
    • Concatenate notes/descriptions if both have content
    • Preserve all email addresses and phone numbers
  4. Deactivate Duplicate:

    • Set statecode = 1 (Inactive) on duplicate record
    • Add note explaining it was merged

Dataverse Tables Used

TablePurpose
accountPrimary entity for company duplicates
contactPrimary entity for person duplicates
leadPrimary entity for lead duplicates
opportunityCheck for linked opportunities
activitypointerCount activities on each record
annotationDocument merge decisions

Key Fields Reference

account:

  • name (NVARCHAR 160) - Company name for matching
  • accountnumber (NVARCHAR 20) - Account number for exact matching
  • telephone1, telephone2 (PHONE) - Phone matching
  • emailaddress1 (EMAIL) - Email matching
  • address1_line1, address1_city, address1_stateorprovince, address1_postalcode - Address matching
  • websiteurl (URL) - Website matching
  • parentaccountid (LOOKUP → account) - Parent company relationship
  • statecode (STATE) - Active(0), Inactive(1) - Filter active only

contact:

  • firstname, lastname (NVARCHAR) - Name components
  • fullname (NVARCHAR) - Calculated full name
  • emailaddress1, emailaddress2 (EMAIL) - Email matching
  • telephone1, mobilephone (PHONE) - Phone matching
  • accountid (LOOKUP → account) - Parent account
  • jobtitle (NVARCHAR) - Additional matching signal
  • department (NVARCHAR) - Department for disambiguation
  • statecode (STATE) - Active(0), Inactive(1)

lead:

  • companyname (NVARCHAR 100) - Company matching
  • firstname, lastname, fullname (NVARCHAR) - Name matching
  • emailaddress1 (EMAIL) - Email matching
  • telephone1, mobilephone (PHONE) - Phone matching
  • address1_line1, address1_city, address1_stateorprovince - Address matching
  • websiteurl (URL) - Website matching
  • statecode (STATE) - Open(0), Qualified(1), Disqualified(2)
  • statuscode (STATUS) - New(1), Contacted(2) [Open]; Qualified(3) [Qualified]; Lost(4), Cannot Contact(5), No Longer Interested(6), Canceled(7) [Disqualified]

Fuzzy Matching Best Practices

  1. Always normalize before comparing:

    • Lowercase all text
    • Remove punctuation
    • Standardize abbreviations
  2. Use multiple matching signals:

    • Never flag as duplicate based on single field match
    • Require 2+ strong signals for high confidence
  3. Consider business context:

    • Same company name in different cities may be branches
    • Same person name at different companies = different people
    • Parent/subsidiary relationships are not duplicates
  4. Handle false positives:

    • "John Smith" is common - require additional signals
    • Generic company names need more verification
    • Allow user to mark "Not a Duplicate"

Examples

Example 1: Find Account Duplicates

User says: "Check for duplicate accounts in my CRM"

Actions:

  1. Query all active accounts from Dataverse
  2. Apply fuzzy matching on name, phone, email, address
  3. Group potential duplicates by confidence score
  4. Present high-confidence matches first

Result:

DUPLICATE DETECTION SUMMARY
- Records Scanned: 5,432 accounts
- High Confidence Duplicates: 23 sets
- Recommendation: Start with "Contoso Inc." ↔ "Contoso Corporation" (95% match)

Example 2: Check Specific Record for Duplicates

User says: "Find duplicates of Fabrikam Inc."

Actions:

  1. Retrieve Fabrikam Inc. record details
  2. Compare against all other active accounts
  3. Apply weighted scoring across all matching fields
  4. Return ranked list of potential matches

Result:

Potential duplicates of "Fabrikam Inc.":
1. Fabrikam Incorporated (87% match) - Same phone, similar address
2. The Fabrikam Group (72% match) - Same website domain

Example 3: Contact Duplicate with Nickname

User says: "Are there duplicate contacts named Bob at Contoso?"

Actions:

  1. Search contacts at Contoso account
  2. Expand "Bob" to include Robert, Rob, Bobby
  3. Compare phone and email across matches
  4. Present findings with merge recommendation

Result:

Found potential duplicate:
- "Bob Smith" (created 2024-01-15) - 3 activities
- "Robert Smith" (created 2023-06-01) - 12 activities
Recommendation: Merge into "Robert Smith" (more complete record)

Troubleshooting

Error: Too many potential duplicates returned

Cause: Matching threshold too relaxed or common names in dataset Solution:

  • Increase confidence threshold to 85%+
  • Require 2+ matching signals for flagging
  • Filter by specific criteria (industry, geography)

Error: Known duplicates not detected

Cause: Significant spelling variations or missing data in fields Solution:

  • Check if key fields (email, phone) are populated
  • Review nickname mappings for person names
  • Consider adding custom abbreviation rules

Error: False positives flagged as duplicates

Cause: Common names or parent/subsidiary relationships Solution:

  • Review address and account hierarchy
  • Check if records are intentionally separate (branches, divisions)
  • Mark as "Not a Duplicate" to exclude from future scans

Fuzzy Matching Best Practices

常见问题

Duplicate Detective AI 技能有什么作用?

Identifies potential duplicate Accounts, Contacts, or Leads in Dataverse using intelligent fuzzy matching that catches nicknames, abbreviations, phone format variations, and address similarities. Use when user says "find duplicates", "check for duplicate accounts", "are there any duplicate contacts", "duplicate detection", "clean up duplicates", "merge duplicates", or "data quality check".

为什么在 TypingMind 中使用 Duplicate Detective?

因为您只需安装一次,就能搭配任何模型使用。Duplicate Detective 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Duplicate Detective?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/microsoft/dataverse-business-skills/tree/main/skills/duplicate-detective。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Duplicate Detective?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Duplicate Detective 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Duplicate Detective 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Duplicate Detective AI 技能免费吗?

是的。microsoft 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇