LLM Learning Hub

workspace/llm-course/home

Embeddings

Embeddings are dense vector representations of text produced by an embedding model, capturing semantic meaning so that similar passages map to nearby points in vector space for similarity search.

What is Embeddings?

Embeddings are dense vector representations of text produced by an embedding model, capturing semantic meaning so that similar passages map to nearby points in vector space for similarity search.

Embeddings are dense vector representations of text produced by an embedding model, capturing semantic meaning so that similar passages map to nearby points in vector space for similarity search.

Where is it used?

OpenAI `text-embedding-3-large`, `BAAI/bge-large-en`, and `sentence-transformers/all-MiniLM-L6-v2` are common embedding models used in LangChain/LlamaIndex RAG pipelines.

How to build it

Load `SentenceTransformer('all-MiniLM-L6-v2')`, call `model.encode(chunks)` to get a `(n, 384)` numpy array, and verify similar chunks have high `cosine_similarity` scores.