LangChain Tutorial 120 lessons · 2:16:24+ of video
LangChain Home Getting Started
What Is LangChain How LLM Apps Work Setting Up Models and Messages
Your First Model Call Messages Conversations Settings, Streaming, Batches
Model Settings Streaming Batch Calls Tokens and Providers
Tokens and Usage Switching Providers Basics Quiz Prompt Templates
Prompt Templates Chat Prompt Templates MessagesPlaceholder Examples, Chains, Parsers
Few-Shot Prompts Chains with the Pipe Output Parsers Runnables
Runnables RunnableLambda RunnableParallel Passthrough, Routing, Fallbacks
RunnablePassthrough Routing Fallbacks and Retries Inside Chains and Practice
Seeing Inside a Chain Practice: Review Summariser Chains Quiz Structured Output
Why Structured Output Pydantic Models with_structured_output Shapes, Labels, Extraction
Lists and Nested Data Classification Extraction Structured Output in Practice
Batch Extraction When Output Goes Wrong Structured Output Quiz Tools
What Are Tools The tool Decorator Tool Schemas Tool Calls by Hand
Binding Tools Reading Tool Calls Running Tools Yourself Agents
The Agent Loop create_agent Several Tools Prompts, Streaming, Memory
Agent System Prompts Streaming Agent Steps Agent Memory Structured Answers and Middleware
Structured Agent Answers Middleware Built-in Middleware Context and Errors
Dynamic Prompts Tool Errors Runtime Context Agent Practice and Approval
Practice: Bookshop Agent Human Approval Agents Quiz RAG Foundations
What Is RAG Documents Loading Files Chunks and Embeddings
Splitting Text Chunk Size and Overlap Embeddings Similarity and Vector Stores
Similarity Vector Stores Search with Scores Retrievers
Retrievers Metadata Filters MMR Search Your First RAG Chain
Your First RAG Chain The RAG Prompt Saying I Don't Know Better RAG
Citing Sources Conversational RAG RAG as a Tool RAG in Practice
Saving a Vector Store Checking RAG Quality RAG Pitfalls FAQ Bot and Async
Practice: Bookshop FAQ Bot RAG Quiz Async Calls Cache, Limits and Timeouts
Caching Model Calls Rate Limiting Timeouts Cost, Logging and Tracing
Tracking Cost Callbacks for Logging Tracing with LangSmith Evaluation
Evaluating Answers Test Sets Comparing Prompts Safety
Prompt Injection Guardrails PII Redaction Reliability
Model Fallbacks Limiting Agent Calls Production Quiz Serving and the Project Plan
Serving with FastAPI Streaming over HTTP Project: Support Bot Plan Project: Building the Bot
Project: Knowledge Base Project: Tools Project: The Agent Project: Memory, Guardrails, Tests
Project: Memory Project: Guardrails Project: Testing Project Review and Good Habits
Project: Review Choosing Models Prompt Habits Images and Long Documents
Multimodal Input Long Documents Map-Reduce Summaries Rewriting and Extraction
Translation and Rewriting Data from Tables Applied Quiz The Bigger Picture
LangChain vs LangGraph The Ecosystem Cheat Sheet: Core Wrapping Up
Cheat Sheet: Agents and RAG Common Mistakes What to Learn Next LangChain · Lesson 63 of 120
Embeddings Meaning as numbers.
⏱ 2 min read ▶ Video at 1:11:01 🎓 Free
▶ starts at 1:11:01 To search by meaning, not just by exact words, we need to turn text into numbers. An embedding is a long list of numbers, that captures what a piece of text means.
From the video: Embeddings Search by meaning Text to numbers An embedding We create an embeddings model, Gemini embedding zero zero one. Embed query turns one piece of text into a vector. Run it. The vector has over three thousand numbers. On their own, they mean nothing to us. What matters is how they compare with the vectors of other texts.
embed.py python Copy
from langchain_google_genai import GoogleGenerativeAIEmbeddings
embeddings = GoogleGenerativeAIEmbeddings( model = "gemini-embedding-001" )
vector = embeddings.embed_query( "How long does delivery take?" )
print ( "length:" , len (vector))
print ( "first five:" , [ round (x, 3 ) for x in vector[: 5 ]]) Output
length: 3072
first five: [0.025, 0.006, -0.024, -0.03, -0.001] An embedding model is trained so that texts with similar meanings get similar vectors. When does my parcel arrive, and how long is delivery, share almost no words, but their vectors are close. That's what lets RAG find the right chunk, even when the customer uses different words from the document.
key value Similar meaning similar vectors Different words can still match Embed documents once, when indexing Embed questions at query time
Prefer to watch? The full LangChain course is free All lessons in one video with animations, real code and chapters.
Watch free An embedding turns text into a vector that captures its meaning. Similar meanings give similar vectors. Next, measuring how similar two vectors are.
Key takeaways Text → vector Thousands of numbers Similar meaning, close vectors