Thuta Learning
LangChain
AdvancedAIAdvanced

Embeddings & Vector Stores

LangChainLesson 11

Embeddings turn text into numerical representations (vectors), which lets us measure the semantic meaning of that text. Vector Stores (e.g., Chroma, FAISS) store these embedding vectors and index them so they can be searched quickly.

python
from langchain_openai import OpenAIEmbeddings
from langchain_community.vectorstores import Chroma

# Assume 'documents' are loaded and split
# Initialize the embeddings model
embeddings = OpenAIEmbeddings()

# Create a vector store from the documents
vectorstore = Chroma.from_documents(documents, embeddings)
You should see
(The documents' text gets converted into vectors and stored in the Chroma vector store)

Updated on

Progress is saved only in this browser on this device. It isn't synced to other devices.

Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.

Embeddings & Vector Stores | Thuta Learning