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...OpenAI API
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...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...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...Generative AI Part 3: Your First LLM API Calls in Python and Node.js
Make your first LLM API calls in Python and Node.js with OpenAI, Claude and Gemini. Learn API keys, requests, token usage, errors and cost, step by step.
Continue reading...Generative AI Part 1: What Is Generative AI and How Do LLMs Work?
What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.
Continue reading...