Generating Text Embeddings with an API
A practical tutorial on text embeddings: vector intuition, calling an embeddings API, choosing dimensions, computing cosine similarity, and caching the results.
7 posts.
A practical tutorial on text embeddings: vector intuition, calling an embeddings API, choosing dimensions, computing cosine similarity, and caching the results.
Stream tokens from an LLM to your UI with Server-Sent Events. Learn the SSE wire format, fetch and ReadableStream in JS, Python SDK streaming, and UX patterns.
A practical tour of the Anthropic Python SDK: messages, streaming, tool use, prompt caching, and patterns for shipping Claude in production.
Learn LangChain by building real components in Python: prompt templates, chains, tool calling, and memory. Practical patterns you can ship today.
A working tour of the OpenAI Python SDK: chat completions, streaming, structured output, embeddings, tool calls, and production-grade error handling.
Why vibes do not scale: building golden datasets, exact-match vs LLM-as-judge scoring, A/B comparing prompts and models, regression suites, and the observability you need to ship safely.
How LLMs call functions: defining tools with JSON schema, the request → tool-call → response loop, common patterns like search and database queries, and the failure modes that bite in production.