What is EntityIdentification?
EntityIdentification is an MCP (Model Context Protocol) server that compares two sets of data (typically JSON objects) to determine whether they originate from the same real-world entity. It performs text normalization, value comparison (exact and semantic), and uses a generative language model to assess semantic similarity and provide a final judgment.
How to use EntityIdentification?
Install the required dependency with pip install genai, then call the compare_json function with two JSON objects. The function iterates through keys, compares values using normalize_text and compare_values, and finally uses a language model (e.g., gemini-2.0-flash-thinking-exp) to generate a matching result.
Key features of EntityIdentification
- Text normalization (lowercase, remove punctuation, normalize whitespace)
- Exact and semantic value comparison
- Order‑ignoring comparison for lists
- JSON key‑by‑key traversal
- Language model integration for final similarity judgment
Use cases of EntityIdentification
- Deduplicating customer records across different systems
- Matching user profiles from multiple data sources
- Detecting duplicate entries in contact lists or databases
- Verifying identity information during data merging
コメント