本文へスキップ

テキスト埋め込みと意味検索

文をベクトルにし、意味が近いものを取る

入力テキスト表

本ページの本文は英語で提供されています。タイトルと導入は日本語化されています。

この能力とは何か

Encodes a piece of text into a fixed-length vector so that semantically similar texts sit close together, then retrieves related items by nearest-neighbour lookup. Output is a ranked result list (item ids and scores), not prose. Unlike question answering it only finds possibly relevant material; it does not compose the answer.

技術的にどう実現するか

The mainstream design is a two-tower model: queries and documents are compressed by encoders, and training pushes true pairs above random negatives, typically with contrastive learning and large batches. At query time all document vectors are pre-computed into an index and an approximate nearest-neighbour search returns the top-k in milliseconds. Sparse and dense representations are often mixed to combine keyword hits with semantic recall.

代表的な製品

6

Pinecone

Pinecone

マネージドなベクトルDBと類似検索

2能力
インフラ クローズド
2019

Hugging Face

Hugging Face Hub

オープンモデルとデータセットの集積地

2関連
プラットフォーム オープンソース
2016

Hugging Face

Transformers

単一のAPIで学習済みモデルを読み込み・学習

2関連
ツール オープンソース
2018

Together AI

Together API

オープンモデル向けの推論API

2関連
API クローズド
2022

Replicate

Replicate

API経由でコミュニティのモデルを実行

1関連
プラットフォーム クローズド
2019

Perplexity AI

Perplexity

検索しながら答え、どの答えにも出典が付く

3能力
アプリ フリーミアム
テキストテキスト
2022

関連する組織

代表的な用途

  • Search over enterprise documents and code
  • The recall stage of RAG pipelines
  • Deduplication, clustering and topic discovery
  • Recommendation and similar-content entry points

どう評価するか

Recall@k
Whether the top-k contain all relevant documents
nDCG
Discounted cumulative gain that accounts for rank position
MRR
Mean reciprocal rank of the first relevant result

限界と難しさ

  • Semantic similarity is not relevance: near neighbours may merely share wording
  • Cross-domain or cross-lingual use degrades noticeably without adaptation
  • Chunking long documents severs context, and answers at chunk boundaries are easily missed

背景にある概念

自然言語処理と大規模言語モデル

単語埋め込み初級

「単語」を「座標」に変える。類義語は自然に集まり、意味が初めて足し引きできる

4関連
図解 1 · データ 2

AI エンジニアリング・安全性・倫理

検索拡張生成初級

知識をパラメータに詰め込むより、外に置いて必要なときに引く —— 持ち込み可の試験のように

4関連
図解 2 · データ 1