← Back to concept explainers

Concept Fable

Semantic similarity

Conclusion first:Semantic Similarity measures how close two pieces of text, questions, tasks or objects are in meaning, usually implemented through embedding vector distance or similarity calculation. It is the foundation of semantic search, deduplication, clustering, recommendation, RAG retrieval and ticket routing. In enterprise use, note that similar does not mean identical; highly similar requests may still differ critically in permissions, timeliness, intent and business consequences.

Semantic Similarity · Embeddings

Read the story first. There is no rush to give a definition here; let the question grow on its own first.

Fable

The same matter in different envelopes

The library wanted to group letters with similar meanings together. The apprentice initially categorized them literally: anything with the character "boat" went in one cabinet, and anything with "horse" went in another.

Errors came quickly. 'Ship schedule delayed' and 'cargo arrived late' share no characters, yet describe the same thing; 'the carriage broke' and 'pay immediately' both contain the character for horse, but their meanings are far apart.

The old archivist had the apprentice first ask what the letter was expressing: requesting an extension, complaining about damage, asking about price, confirming an address. The words can differ while the intent is similar; the words can be the same while the intent is far apart.

They began marking each letter with its intent, then arranging them by distance. Similar letters went in adjacent cabinets, slightly farther ones in separate cabinets, and completely unrelated ones on different floors. When checking old cases, the clerks no longer looked only for the same characters, but also for the same meaning.

After the first placement by intent, the apprentice still made mistakes. He placed "requesting deferred payment" and "asking about deferral rules" too close together. The senior librarian had him re-examine the purpose of the letters: one was requesting leniency, the other merely wanted to understand the system. Similar is not the same.

The library later allowed one letter to be near multiple cabinets. "The goods arrived late" is near both logistics complaints and compensation inquiries; those checking letters look at proximity first, then at differences. Literal wording no longer drives all judgments.

The old librarian also reminded the apprentice that distance changes with the task. When looking for old letters for complaint handling, "goods arrived late" and "shipping delay" were very close; when compiling statistics on transport vehicles, boats and horses had to be separated. Similarity is not an eternal kinship on paper; it depends on what you are trying to solve right now. Later, when the apprentice searched letters, he first asked whether this time he was looking for synonymous questions, similar intents, or the same kind of object. When the question changed, the distance between letters changed too. The library was finally no longer led by the nose by identical words. Later, the library's precedent searches became more accurate, and fewer letters were misplaced together. Searches became more stable. Precedents became more useful too.

The library could therefore discover many duplicate questions that looked different on the surface. Similar does not mean looking alike; truly useful similarity is closeness in meaning, purpose, and context.

Reveal

This story is about: semantic similarity

Semantic Similarity measures how close two pieces of text, questions, tasks or objects are in meaning, usually implemented through embedding vector distance or similarity calculation. It is the foundation of semantic search, deduplication, clustering, recommendation, RAG retrieval and ticket routing. In enterprise use, note that similar does not mean identical; highly similar requests may still differ critically in permissions, timeliness, intent and business consequences.

What matters is that it is not just a term, but a structural problem that repeatedly appears in real AI / Agent systems. Understanding it lets you judge when to add a model, when to change a process, and when to add governance.

Metaphor mapping

  • Different envelopes: texts or requests with different surface wording
  • The letter's main point: semantic representation
  • Sorting by word count: the limitations of keyword or string matching
  • Placed in the same cell: high semantic similarity
  • Mistaking an urgent letter for a casual one: the risk of similarity ignoring business differences
  • Review seal: thresholds, rules and human review

Andy Ren Xu's judgment

The practical value of this concept is that it helps you break "AI features that look smart" into deliverable, verifiable, and governable units of work.

cosine similarityembeddingsretrievalclustering
京ICP备2026014272号