Word embeddings and semantic similarity

Description

Represents words, sentences or documents as dense vectors where semantic similarity becomes geometric closeness, enabling clustering, search and comparison of user text.

Embeddings encode meaning learned from large corpora, so 'can't find my money' and 'funds missing' sit close together even without shared words. Sentence and document embeddings let researchers cluster open-ended feedback, deduplicate tickets, find all comments similar to a key quote, map feedback onto existing codebooks and measure how semantically close user language is to product terminology. Rigour involves choosing a model suited to the domain and language, checking that similarity matches human judgement on a sample, being aware of biases embedded from training corpora, and avoiding treating cosine similarity thresholds as universal. Clustering embeddings should be validated by reading samples, as with any computational qualitative method.

Attributes

Loss type
Active
Stage
Definition
Data
Mixed
Effort
Days

Steps

  1. Choose an embedding model suited to the text type and languages (e.g. a multilingual sentence-transformer).
  2. Clean the text and compute embeddings for each document or sentence.
  3. Calibrate similarity: have researchers rate 50-100 pairs and pick thresholds that match human judgement.
  4. Apply to the task: semantic search for quotes, clustering (e.g. UMAP plus HDBSCAN), or matching feedback to codebook definitions.
  5. Review samples from each cluster or match set to verify meaning, and refine thresholds.
  6. Document model version, thresholds and known biases.

Sources

  • A Practical Guide to Sentiment Analysis (Erik Cambria et al.)
  • Artificial Intelligence for Humans (Jeff Heaton)
  • Pattern Recognition and Machine Learning (Christopher Bishop)
  • Mikolov et al. (2013) Efficient estimation of word representations in vector space
  • Reimers & Gurevych (2019) Sentence-BERT
  • Practical Guide to Sentiment Analysis
  • AI for Humans (Heaton)
  • Pattern Recognition (Bishop)
  • The Inquiry Series, Ch 55 — Natural Language at Scale — Computational Qualitative Analysis

Also known as

  • Text embeddings
  • Sentence embeddings
  • Semantic search

Categories

  • Analytics & Behaviour
  • Computational & Machine Learning