ladderlore
  • S3 や IAM などのサービス名を入力してください。

概念

Embeddings and vectors

Meaning turned into a list of numbers, so a computer can tell which texts are similar.

このレッスンはまだ翻訳されていないため、英語で表示しています。

Text
Embedding model
Vector
Vector store
  1. 1You send text to an embedding model.
  2. 2It returns a vector.
  3. 3You store the vector so you can search by meaning later.
Text goes in, a vector comes out, and the vector is kept for later searches.

流れ

  1. 1You send text to an embedding model.
  2. 2It returns a vector.
  3. 3You store the vector so you can search by meaning later.

Text goes in, a vector comes out, and the vector is kept for later searches.

  • dog and puppy

    Meaning
    Almost the same
    Vectors are
    Close together
  • refund and send back an order

    Meaning
    Same idea, other words
    Vectors are
    Close together
  • dog and invoice

    Meaning
    Unrelated
    Vectors are
    Far apart
Closeness of vectors stands for closeness of meaning.

概要

An embedding is a way to store the meaning of text (or an image) as numbers. The list of numbers is called a vector. An embedding model reads the text and returns its vector. Texts with similar meaning get vectors that sit close together. Texts with different meaning sit far apart.

This lets a computer search by meaning instead of by exact words. A search for "send back my order" can find a page about refunds, even though no word matches. Embeddings are also the base of Retrieval Augmented Generation (RAG): documents are turned into vectors and stored, and the vectors closest to a question are fetched to help the model answer.

概要

Vectors are kept in a vector database or a vector store. Chunking decides which pieces of a document get their own vector.

覚えること

  • An embedding stores meaning as numbers. The list of numbers is a vector.
  • Similar meaning means vectors that are close together.
  • An embedding model makes the vectors. It is a different model from the one that writes answers.
  • Embeddings power semantic search, which matches meaning and not exact words.

覚えること

  • RAG uses embeddings to find the text that is most relevant to a question.

試験では

  • “Search by meaning, not by keyword” points to embeddings.
  • “Numeric representation of text that captures meaning” points to an embedding or a vector.
  • “Where do embeddings get stored for similarity search?” points to a vector database.