Skip to main content
ModelTerms

Agents & Tools · beginner

Semantic Search

Semantic search ranks documents by meaning rather than keyword match, using embedding similarity. "Affordable laptops" can match "cheap notebooks" even with no overlapping words.

Explanation

Encode the query and the documents into the same embedding space; rank by similarity (cosine or dot product). Modern systems combine semantic search with traditional keyword search (BM25) — hybrid search — to get the best of both: semantic recall + exact-match precision.

Semantic search is the retrieval step in most RAG systems and the engine behind tools like "find similar customers" or "deduplicate near-identical bug reports."

Examples

  • Searching "cars under 10k" matches "vehicles below ten thousand dollars."
  • Deduplicating tickets where two users describe the same bug differently.

Frequently asked

What is Semantic Search?

Semantic search ranks documents by meaning rather than keyword match, using embedding similarity. "Affordable laptops" can match "cheap notebooks" even with no overlapping words.

What is an example of semantic search?

Searching "cars under 10k" matches "vehicles below ten thousand dollars."

How is Semantic Search related to Embedding?

Semantic Search and Embedding are both agents & tools concepts. An embedding is a list of numbers (a vector) that represents a piece of input — a word, a sentence, an image — in a space where similar things end up close together.

Is Semantic Search considered beginner?

Semantic Search is generally considered beginner-level material in the AI and LLM space.

EmbeddingArchitecture

An embedding is a list of numbers (a vector) that represents a piece of input — a word, a sentence, an image — in a space where similar things end up close together.

Vector DatabaseAgents & Tools

A vector database stores high-dimensional embeddings and answers "find the K nearest vectors to this query" extremely fast. The retrieval engine behind most RAG systems.

Retrieval-Augmented GenerationAgents & Tools

RAG retrieves relevant documents from a corpus at query time and includes them in the prompt, letting an LLM answer with up-to-date, source-cited, private information without retraining.

Hybrid SearchAgents & Tools

Hybrid search combines vector (semantic) and keyword (BM25) retrieval and fuses their results — usually via Reciprocal Rank Fusion — to get the best of both: semantic recall and exact-match precision.

BM25Agents & Tools

BM25 is the classical keyword-based ranking algorithm: a refined TF-IDF that scores documents by query-term frequency, document length, and corpus-wide rarity. The keyword side of hybrid search.

RerankerAgents & Tools

A reranker is a second-pass scoring model that takes the top-K retrieved candidates and reorders them by joint relevance to the query. Typically a cross-encoder; dramatically improves retrieval precision at low cost.

Cross-EncoderAgents & Tools

A cross-encoder takes a (query, document) pair as joint input and outputs a single relevance score. Slower than the bi-encoders used for dense retrieval but much more accurate — the standard reranker architecture.

Side-by-side comparisons

Sources