30 Days of AIDay 11 of 30 · Week 2: Applied AI & APIs
Course outline▾

Week 3 · Infrastructure & Hosting

  1. Day 15Introduction to AI Infrastructure: Hardware, Runtimes, and ComputeComing soon · 2026-10-15 · 7 PM IST
  2. Day 16Local Model Execution: Running Open-Weight LLMs Securely (Ollama, vLLM)Coming soon · 2026-10-16 · 7 PM IST
  3. Day 17Containerizing AI Workloads: Writing Production Dockerfiles for Python APIsComing soon · 2026-10-17 · 7 PM IST
  4. Day 18Docker Compose for Multi-Container AI Stacks (Web UI, Vector DB, LLM Engine)Coming soon · 2026-10-18 · 7 PM IST
  5. Day 19Kubernetes for AI 101: Pods, Deployments, and Services for Model ServingComing soon · 2026-10-19 · 7 PM IST
  6. Day 20Persistent Storage in Kubernetes: Managing State, Weights, and Vector IndicesComing soon · 2026-10-20 · 7 PM IST
  7. Day 21High-Performance Networking: Configuring Ingress and Egress for AI ClustersComing soon · 2026-10-21 · 7 PM IST

Week 4 · Enterprise Workflows

  1. Day 22Autonomous Agents: From Passive LLMs to Goal-Driven ExecutionComing soon · 2026-10-22 · 7 PM IST
  2. Day 23Tool Use & Function Calling: Connecting LLMs to APIs, Databases, and ShellsComing soon · 2026-10-23 · 7 PM IST
  3. Day 24Multi-Agent Orchestration: Supervisor, Worker, and Evaluator PatternsComing soon · 2026-10-24 · 7 PM IST
  4. Day 25Automated CI/CD: Automating the Software Lifecycle for AI ModelsComing soon · 2026-10-25 · 7 PM IST
  5. Day 26Zero-Trust Security for AI: Sandboxing Ephemeral Execution & Model EgressComing soon · 2026-10-26 · 7 PM IST
  6. Day 27Observability & Tracing for Agentic Systems (Telemetry, Logs, and Metrics)Coming soon · 2026-10-27 · 7 PM IST
  7. Day 28Human-in-the-Loop Architecture: Machine Second, Human First in PracticeComing soon · 2026-10-28 · 7 PM IST
  8. Day 29Managing Technical Debt, Drift, and Model Governance in Enterprise ITComing soon · 2026-10-29 · 7 PM IST
  9. Day 30The 10-Year Horizon: Architecting IT Strategy for the AI-Native EnterpriseComing soon · 2026-10-30 · 7 PM IST
Open the course page →

Day 11: Embeddings and Vector Representations — How Machines Map Meaning

2026-10-11 · 7 min read

Watch the video lesson, or subscribe on YouTube for a new lesson every day.

To make an AI work with your own company data, you first have to turn that data into something a machine can measure. Words are not measurable. Numbers are. The bridge between the two is the embedding.

In plain terms: Imagine a giant map where every sentence in your company has a pin. Sentences about the same topic are pinned close together, and unrelated ones are far apart. An embedding is the pin's coordinates.

An embedding turns text into numbers network latencyembedding model output[0.82, -0.11, 0.47, 0.05, …]packet dropembedding model output[0.79, -0.08, 0.51, 0.02, …]financial forecastembedding model output[-0.12, 0.55, 0.20, 0.78, …]Real models output 768 or 1,536 numbers. Values here are illustrative.Similar meaning gives similar numbers.
An embedding model maps a chunk of text to a list of numbers. Texts about similar things, like network latency and packet drop, get similar numbers. Real embeddings have hundreds or thousands of values, and the ones shown are illustrative.

1. The mathematical map

An embedding model reads a chunk of text and outputs a dense vector: a list of numbers, usually 768 or 1,536 of them. You never read these numbers yourself. What matters is how they relate to each other. The numbers are produced so that text with a similar meaning gets a similar list.

2. Semantic closeness

Because similar meanings get similar numbers, they cluster together when you plot them. The vectors for "network latency" and "packet drop" sit close together. The vector for "financial forecast" sits far away from both. A question you type also becomes a vector, and it lands next to the text that answers it.

Meaning becomes distance on a map network latencypacket dropslow APIfinancial forecastquarterly revenueREIT yieldpasta recipebake breadyour questionIllustrative 2D view. Real embeddings have hundreds of dimensions.
Embeddings place texts on a map where meaning is distance. Network terms cluster together, finance terms cluster elsewhere, and a question lands near the text that answers it. The map is a flattened, illustrative view of a space with hundreds of dimensions.

3. The power of distance

Once all your documents are vectors, finding the right one becomes arithmetic. The common measure is cosine similarity, which compares the direction of two vectors. A score near 1 means they point the same way, so the texts mean much the same thing. A score near 0 means they are unrelated.

Cosine similarity compares directions network latencypacket dropfinancial forecastlatency vs packet drop1.00latency vs forecast-0.031.0 means the same direction (same meaning). Near 0 means unrelated.Computed from the 4-number vectors in the first diagram.
Cosine similarity measures the angle between two vectors. Vectors pointing the same way score close to 1, meaning similar meaning, and unrelated ones score near 0. The scores shown are computed from the four-number example vectors, which are illustrative.

This is why embedding search beats keyword search. Ask "Why is the site slow?" and a keyword search finds nothing if no document contains those words. An embedding search finds the paragraph about high latency on the web tier, because the meaning is close.

Why meaning beats keywords Question: "Why is the site slow?" Keyword searchEmbedding search Looks for: site, slowNo document containsthose exact wordsFinds nothingCompares meaning"high latency on the web tier"is very close in the spaceFinds the right paragraphDifferent words, same meaning: that is what embeddings capture.
Keyword search needs the same words. Embedding search compares meaning, so a question about a slow site can find a paragraph about high latency on the web tier even though the words differ.

Here is the arithmetic in Python, using the same four-number example vectors from the diagrams. Real embedding models return far longer vectors, and you would call one from a library or an API.

import numpy as np

def cosine(a, b):
    a, b = np.array(a), np.array(b)
    return float(a @ b / (np.linalg.norm(a) * np.linalg.norm(b)))

latency  = [0.82, -0.11, 0.47, 0.05]   # "network latency"
drop     = [0.79, -0.08, 0.51, 0.02]   # "packet drop"
forecast = [-0.12, 0.55, 0.20, 0.78]   # "financial forecast"

print(round(cosine(latency, drop), 2))      # 1.0   -> almost the same meaning
print(round(cosine(latency, forecast), 2))  # -0.03 -> unrelated

The numbers in this example are made up to show the idea. In a real system you embed every document once, store the vectors, and compare each new question against them.

Coming Up Next

Day 12: Vector databases: storing and searching enterprise knowledge.

#VectorEmbeddings #MachineLearning #NLP #DataEngineering #AIArchitecture