Identifies and merges duplicate entities in Knowledge Graph projects. Use after extraction to consolidate duplicate entities, or when users ask about potential duplicates. Supports automatic merging for high-confidence matches and user confirmation for medium-confidence candidates.
Identifies and merges duplicate entities in Knowledge Graph projects.
Use find_duplicate_entities with project_id
The tool uses multiple signals to detect duplicates:
| Confidence | Action |
|------------|--------|
| >= 0.9 (HIGH) | Auto-merge with merge_entities_tool. Inform user: "I merged X and Y (95% confident they're the same)" |
| 0.7-0.9 (MEDIUM) | Ask user: "I found potential duplicates: X and Y (82% match). Should I merge them?" |
| < 0.7 (LOW) | Mention if relevant: "X and Y might be related but confidence is low (65%)" |
approve_merge or merge_entities_toolreject_mergecompare_entities_semantic for detailed analysisAfter any extract_to_kg operation, automatically:
find_duplicate_entities"I extracted 12 entities and 8 relationships. I noticed 'Elon Musk' and 'Musk' appear to be the same person (94% confidence), so I merged them. I also found 'SpaceX' and 'Space X' might be duplicates (78% confidence) - should I merge these too?"
"I scanned for duplicates and found 3 potential matches:
- 'OpenAI' and 'Open AI' (91% - auto-merged)
- 'Sam Altman' and 'Samuel Altman' (85% - awaiting your approval)
- 'Microsoft' and 'MS' (68% - low confidence, skipped)"
"Comparing 'Dr. John Smith' and 'J. Smith':
| Signal | Score | |--------|-------| | Name similarity | 72% | | Same type (Person) | Yes | | Shared connections | 3 |
Overall: 78% match. They share connections to MIT and OpenAI. Would you like to merge them?"
| Tool | Description |
|------|-------------|
| find_duplicate_entities | Scan for duplicates in a project |
| merge_entities_tool | Execute a merge directly (for high confidence) |
| review_pending_merges | See pending candidates awaiting approval |
| approve_merge | Approve a pending candidate |
| reject_merge | Reject a pending candidate |
| compare_entities_semantic | Deep comparison of two specific entities |
{
"project_id": "abc123",
"min_confidence": 0.7
}
{
"project_id": "abc123",
"survivor_id": "node_to_keep",
"merged_id": "node_to_remove"
}
{
"project_id": "abc123",
"node_a_id": "first_entity_id",
"node_b_id": "second_entity_id"
}
When entities are merged:
| Issue | Response | |-------|----------| | No project selected | "Please select a Knowledge Graph project first" | | Empty graph | "Your graph doesn't have any entities yet. Extract content first" | | No duplicates found | "No potential duplicates found above the confidence threshold" | | Entity not found | "Entity 'X' was not found. It may have been merged or deleted" |
After presenting duplicate scan results, offer interactive follow-ups:
### Explore Further
- "Merge Sam Altman and Samuel Altman" - Merge these entities
- "Compare Sam Altman and Samuel Altman" - See detailed similarity analysis
- "Reject the Sam Altman merge" - Keep them as separate entities
- "Show me all pending merges" - Review all candidates
After merging entities, the graph may reveal new insights:
ask_about_graph with question_type: key_entities to see updated rankings"Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer