Learn what embeddings are, how cosine similarity works and how to build a semantic search with OpenAI and Ollama in Python and Node.js. Beginner friendly.
Continue reading...AI
Artificial intelligence, LLMs, AI agents and MCP guides for developers.
Generative AI Part 8: Structured Outputs for Reliable JSON from LLMs
Learn structured outputs for LLMs: get reliable JSON from OpenAI and Ollama using Pydantic and Zod schemas, plus validation and retry in Python and Node.js.
Continue reading...Agentic AI Part 3: Tool Calling for Agents: Letting an LLM Use Your Functions
Learn tool calling for AI agents: let an LLM call your functions with JSON Schema, parallel calls and error handling. Agentic AI series Part 3 with code.
Continue reading...Generative AI Part 7: How to Stream LLM Responses and Build a Simple Chat UI
Learn how to stream LLM responses in Python and Node.js, read Server-Sent Events and build a simple chat UI with memory and a Stop button for Ollama or OpenAI.
Continue reading...Generative AI Part 6: How to Run LLMs Locally with Ollama
Learn to run LLMs locally with Ollama: install it, pull open models, chat in the terminal and call them from Python and Node.js. Free, private and offline.
Continue reading...RAG Tutorial: Build a RAG App with Python and pgvector
Step-by-step RAG tutorial: build a Retrieval-Augmented Generation app with Python, PostgreSQL pgvector and OpenAI embeddings, with runnable code and fixes.
Continue reading...Agentic AI Part 2: Anatomy of an AI Agent: Models, Tools, Instructions and Memory
Learn the anatomy of an AI agent: models, tools, instructions and memory, with runnable Python and Node.js code. Agentic AI series Part 2 for beginners.
Continue reading...Generative AI Part 5: Temperature and Top-p for Controlling Model Output
Learn temperature and top-p for LLMs: how sampling works, plus top-k, max tokens, stop sequences and which GPT-6 and Claude models accept them, with code.
Continue reading...Generative AI Part 4: Prompt Engineering Basics with Roles, Instructions and Examples
Learn prompt engineering basics: system and user roles, clear instructions, XML tags, few-shot examples and prompt templates, with Python and Node.js code.
Continue reading...Agentic AI Part 1: What Is Agentic AI and How Do AI Agents Work?
Learn what agentic AI is, how AI agents work with the think-act-observe loop, and build your first tool-calling agent in Python and Node.js. Beginner friendly.
Continue reading...