Sahaj.blogs

Day page

25 Mar 2026

Study

LLMs · Embeddings

Sentence embeddings for semantic search: mean-pooling a small encoder (all-MiniLM-L6-v2), cosine similarity, and finding the most relevant sentence for a query without any shared keywords.

  • An embedding model maps a whole sentence to one vector, so similar meanings land close together even with different words.
  • This is the retrieval half of RAG, which the LangChain phase builds on.

Read the post →