{
  "id": 6068374,
  "title": "Building a Vector Similarity Detector: How One SQL Query Over 2.9M Charity Pairs Reveals the Gap Between Meaning and Spelling",
  "url": "https://urgent.news/2026/09/07/building-a-vector-similarity-detector-how-one-sql-query-over-2-9m",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-07T00:01:03.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/tamizuddin/building-a-vector-similarity-detector-how-one-sql-query-over-29m-charity-pairs-reveals-the-gap-3pbl"
  },
  "original_language": "en",
  "account": "A study examined how well various metrics could match charity organization names, despite potentially minor spelling differences. Researchers generated and analyzed over 2.9 million unique pairs of charity names, comparing them using four different approaches. While traditional methods like Levenshtein distance and Jaro-Winkler focused on character-level similarities, vector similarity aimed to determine if the words represented the same concepts. Initial results showed that a simple edit-distance algorithm couldn't bridge the gap between spelling-based matching and meaning-based matching. This gap was particularly evident when looking at charity name pairs - for example, \"Medical Aid for Children\" and \"Médecins Sans Frontières\" appeared unrelated according to lexical and token overlap metrics, but a semantic similarity analysis revealed they both focused on pediatric medical aid across borders. The full dataset consisted of 2.9 million charity pair combinations, drawn from a consolidated registry of charitable organizations. For each pair, four signals were measured: lexical distance (Jaro-Winkler similarity on raw name strings), token overlap (Jaccard similarity on word-level tokens), embedding cosine similarity (based on sentence-transformer embeddings), and ground truth labels (whether the pair represented the same or different organizations). The core experiment aimed to predict the ground truth label based solely on these four signals. Researchers used a sentence-transformers/all-MiniLM-L6-v2 model to generate 384-dimensional embeddings for each charity name, producing an embedding matrix of 1700 x 384. Cosine similarity between any two rows in this matrix ranged from -1 (opposite direction in semantic space) to 1 (identical direction). The entire similarity computation was performed entirely within SQL, using the embedding matrix as a materialized table and SQLite's vector extension or a custom distance function. The analysis revealed some interesting findings. Approximately 12% of pairs with high lexical similarity (above 0.85) actually had low semantic similarity according to the embedding cosine similarity metric. This discrepancy highlighted the limitations of relying solely on character-level metrics for identifying true matches between charitable organization names.",
  "summary": "Originally published on tamiz.pro . You feed two names into a matching engine and get a similarity score. Easy enough. But what happens when two strings look nothing alike yet mean the same thing — or look nearly identical but mean completely different things? This isn't a hypothetical. When we ran a vector similarity detector over a dataset of 2.9 million charity pair combinations, the results…",
  "key_points": [
    "Over 2.9 million charity name pairs analyzed using four metrics",
    "Vector similarity outperformed Levenshtein and Jaro-Winkler in meaning matching",
    "12% of high lexical similarity pairs had low semantic similarity"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}