Practical guides to working with AI.

How to actually do it: running models locally, prompting, retrieval, agents, embeddings, evaluation, cost control. 100 guides. Written for people with a job to do rather than a paper to write.

100 of 100
learn · 7 min

AI Hallucinations: Why LLMs Make Things Up

LLMs sometimes generate plausible-sounding but completely false information. Here's why it happens and how to reduce it.

Read
learn · 6 min

Chain of Thought Prompting: Teaching Models to Reason

Chain-of-thought prompting dramatically improves LLM performance on complex tasks by encouraging models to show their reasoning before answering.

Read
learn · 7 min

Context Windows Explained: The Working Memory of LLMs

What context windows are, why they matter for building AI applications, how they've grown from 4K to 10M tokens, and how to manage them effectively.

Read
learn · 8 min

Embedding Models: The Unsung Heroes of AI Applications

What embedding models are, how they create vector representations of text and images, why they're essential for semantic search and RAG, and how to choose one.

Read
learn · 5 min

Few-Shot Prompting: Teaching by Example

Few-shot prompting provides examples directly in the prompt, showing the model exactly what you want rather than just describing it.

Read
learn · 10 min

Fine-Tuning LLMs: When and How to Specialize AI Models

A practical guide to fine-tuning large language models — what it achieves, when it's worth the effort, the most popular methods (LoRA, SFT, RLHF), and how to evaluate results.

Read
learn · 6 min

Grounding: Connecting LLMs to Real-World Facts

Grounding techniques anchor LLM outputs to verifiable external sources, dramatically reducing hallucinations in high-stakes applications.

Read
learn · 10 min

How LLMs Work: A Technical Overview

A clear technical explanation of how large language models actually process text, generate responses, and represent knowledge — from tokenization to sampling.

Read
multimodal · 7 min

How to build a multimodal RAG system for documents with images

Traditional RAG ignores charts, diagrams, and images embedded in documents. Multimodal RAG retrieves and reasons over both text and visual content. This guide covers document parsing, image embedding, and hybrid retrieval.

Read
agents · 7 min

How to build a persistent assistant with the OpenAI Assistants API

The OpenAI Assistants API provides built-in thread management, file search, and code interpreter — removing the plumbing work from agentic applications. This guide covers creating an assistant, managing threads, and using built-in tools.

Read
agents · 8 min

How to build a RAG pipeline from scratch

Retrieval-Augmented Generation (RAG) extends LLMs with your own documents, giving accurate, source-grounded answers without fine-tuning. This guide builds a working RAG system from document ingestion to response generation.

Read
agents · 8 min

How to build a ReAct agent with OpenAI function calling

ReAct (Reason + Act) is the foundational pattern for LLM agents. This guide builds a working ReAct agent from scratch using the OpenAI API and function calling, with a web search and calculator tool.

Read
prompting · 5 min

How to build a reusable prompt library

A prompt library treats prompts like code — versioned, tested, and reusable. This guide covers structuring a prompt library, versioning strategies, and tooling for testing prompt quality.

Read
agents · 7 min

How to build conversational agents with AutoGen

Microsoft AutoGen enables multi-agent conversations where AI agents and human proxies collaborate to solve tasks. This guide covers setting up AutoGen, creating conversable agents, and running code-generation workflows.

Read
embeddings · 7 min

How to build semantic search from scratch

Semantic search finds relevant results based on meaning rather than keywords. This guide builds a complete semantic search system from document ingestion to ranked retrieval, using embeddings and a vector store.

Read
agents · 8 min

How to chain agents with LangGraph

LangGraph is LangChain's framework for building stateful, multi-agent workflows as directed graphs. This guide covers graph basics, state management, and building a practical multi-agent pipeline.

Read
guides · 17 min

How to Choose an LLM for Your Use Case

A definitive decision framework for selecting the right AI model in 2025 — covering model tiers, open-source vs closed trade-offs, domain-specific recommendations, budget tiers, privacy compliance, enterprise requirements, and a step-by-step process for every scenario.

Read
embeddings · 6 min

How to choose and use a vector database

Vector databases are purpose-built for storing and querying embeddings at scale. This guide compares the leading options — Pinecone, Weaviate, Qdrant, pgvector, and Chroma — and helps you choose the right one for your use case.

Read
embeddings · 5 min

How to choose the right embedding model for your use case

Embedding model choice significantly affects search quality and cost. This guide compares the leading models — OpenAI text-embedding-3, Cohere embed, BAAI/bge, and others — across quality, speed, cost, and language support.

Read
setup · 5 min

How to choose the right GGUF quantization for your GPU

Quantisation lets you run models that would not otherwise fit in your GPU's VRAM. This guide explains the different GGUF quantisation levels, the quality-size tradeoff at each level, and which to choose for your specific hardware.

Read
fine-tuning · 6 min

How to create a high-quality dataset for fine-tuning

The quality of your training data is the biggest factor in fine-tuning success. This guide covers data collection strategies, formatting standards, quality filtering, and the minimum viable dataset size for different tasks.

Read
setup · 7 min

How to deploy LLM inference at scale with vLLM

vLLM is the leading open-source LLM inference server, offering 24× higher throughput than HuggingFace Transformers through PagedAttention. This guide covers installation, serving a model, and configuring for production workloads.

Read
fine-tuning · 5 min

How to evaluate a fine-tuned model against a baseline

Knowing when your fine-tuned model is actually better than the base model requires systematic evaluation. This guide covers benchmark datasets, LLM-as-judge evaluation, and metrics for task-specific assessment.

Read
prompting · 4 min

How to few-shot prompt any LLM

Few-shot prompting uses examples to teach LLMs new formats and behaviours without fine-tuning. This guide explains how to construct effective examples and when few-shot beats zero-shot.

Read
fine-tuning · 7 min

How to fine-tune a model with Direct Preference Optimization (DPO)

DPO trains models to prefer good responses over bad ones using human preference data — without the complexity of reinforcement learning. This guide covers collecting preference data, training with TRL's DPO trainer, and evaluating results.

Read
fine-tuning · 8 min

How to fine-tune a model with LoRA using Unsloth

Unsloth is an optimised fine-tuning library that makes LoRA training 2–5× faster with 70% less VRAM. This guide walks through fine-tuning a Llama or Mistral model on your own data using Unsloth on a free Google Colab GPU.

Read
fine-tuning · 6 min

How to fine-tune LLMs with Axolotl

Axolotl is a config-driven fine-tuning framework that wraps HuggingFace and Unsloth with a single YAML configuration. This guide covers setting up Axolotl, writing a config, and running multi-GPU training.

Read
embeddings · 6 min

How to generate and use text embeddings

Text embeddings convert text into dense vector representations that capture semantic meaning. This guide covers generating embeddings with OpenAI and local models, measuring similarity, and practical applications.

Read
multimodal · 5 min

How to generate images with DALL-E 3 and GPT-Image-1

OpenAI's image generation models produce high-quality images from text descriptions. This guide covers the Images API, prompt writing for consistent results, using the edit endpoint, and integrating image generation into applications.

Read
prompting · 5 min

How to get reliable structured output from any LLM

Getting LLMs to output reliable JSON, YAML, or custom formats is essential for production applications. This guide covers JSON mode, JSON schema enforcement, grammar-based sampling, and fallback strategies.

Read
apis · 5 min

How to handle rate limits and retries in LLM applications

Rate limit errors are the most common production issue in LLM applications. This guide covers exponential backoff, token budget management, request queuing, and provider-specific rate limit strategies.

Read
coding · 7 min

How to install and use Claude Code

Claude Code is Anthropic's agentic coding tool that runs in your terminal. It reads your entire codebase, writes and edits files, runs tests, and executes shell commands. This guide covers installation, configuration, and practical workflows.

Read
setup · 5 min

How to install LM Studio and load a model

LM Studio is a desktop app for running local AI models without any terminal commands. This guide covers installation, downloading a model from Hugging Face, and starting a local inference server.

Read
setup · 6 min

How to install Ollama and run your first local model

Ollama is the fastest way to run open-source LLMs locally. This guide walks you through installation on macOS, Linux, and Windows, pulling your first model, and running it from the terminal or via its REST API.

Read
observability · 6 min

How to instrument LLM apps with OpenTelemetry

OpenTelemetry (OTel) is the vendor-neutral standard for distributed tracing. The GenAI semantic conventions extend it to LLM calls. This guide covers setting up OTel tracing for LLM applications, exporting to Jaeger or Grafana, and the GenAI conventions.

Read
observability · 5 min

How to monitor and reduce LLM API costs in production

LLM API costs can grow unexpectedly as usage scales. This guide covers cost attribution, per-request tracking, anomaly detection, and practical techniques that reduce costs by 50–80% without sacrificing quality.

Read
agents · 8 min

How to orchestrate multi-agent workflows with CrewAI

CrewAI lets you define teams of specialised AI agents that collaborate to complete complex tasks. This guide covers creating agents with roles, assigning tasks, and running a complete crew pipeline.

Read
privacy · 6 min

How to prevent prompt injection in production systems

Prompt injection attacks trick LLMs into ignoring their system prompt or executing unintended instructions. This guide covers the attack patterns, defence strategies, and code-level mitigations for production LLM applications.

Read
apis · 5 min

How to route between models with OpenRouter

OpenRouter is a unified API that gives access to 200+ LLM models through a single endpoint. This guide covers setup, model selection, cost optimisation, and fallback routing.

Read
privacy · 5 min

How to run AI completely offline for sensitive data

For healthcare, legal, financial, and personal data, running AI completely offline ensures your data never leaves your machine. This guide covers the full offline setup stack and practical workflows.

Read
coding · 4 min

How to run Codestral locally for offline coding assistance

Codestral is Mistral AI's code-specialised model with support for 80+ programming languages. This guide covers running it locally via Ollama for fast, offline coding assistance.

Read
setup · 7 min

How to run DeepSeek R1 locally on Mac or Windows

DeepSeek R1 is one of the most capable open-source reasoning models available. This guide covers running the 7B, 14B, and 70B distilled variants on consumer hardware using Ollama or LM Studio.

Read
setup · 6 min

How to run Llama 3.3 70B on a workstation

Llama 3.3 70B is Meta's best dense open-source model, matching GPT-4o on many benchmarks. This guide covers hardware requirements, quantisation selection, and optimal settings for running it on a high-end workstation or Apple Silicon Mac.

Read
privacy · 6 min

How to self-host an OpenAI-compatible API with llama.cpp

llama.cpp includes a built-in HTTP server that exposes an OpenAI-compatible API. This guide covers compiling llama.cpp with GPU support, starting the server, and deploying it for team use.

Read
coding · 5 min

How to set up Continue.dev for local AI code completions

Continue is an open-source VS Code and JetBrains extension that adds AI code completions and chat using local or cloud models. This guide covers installation, configuring Ollama as the backend, and effective usage patterns.

Read
coding · 6 min

How to set up Cursor AI for an existing codebase

Cursor is a VS Code fork with deep AI integration. This guide covers installing Cursor, importing your existing VS Code settings, configuring AI models, and using Cursor's Composer for multi-file editing.

Read
agents · 6 min

How to set up n8n with an LLM node for workflow automation

n8n is an open-source workflow automation tool with native LLM support. This guide covers self-hosting n8n, connecting it to OpenAI or a local Ollama model, and building an AI-powered automation workflow.

Read
apis · 6 min

How to stream LLM responses in a web app

Streaming makes LLM applications feel instant by displaying tokens as they are generated. This guide covers the Server-Sent Events protocol, implementing streaming in Express + React, and handling edge cases.

Read
observability · 6 min

How to test LLM prompts automatically with Promptfoo

Promptfoo is an open-source CLI for testing, evaluating, and comparing LLM prompts. This guide covers writing test cases in YAML, running evaluations, comparing models, and catching prompt regressions in CI.

Read
observability · 6 min

How to trace and debug LLM calls with LangSmith

LangSmith is LangChain's observability platform for logging, tracing, and evaluating LLM applications. This guide covers setup, automatic tracing, custom traces, and using the dashboard to debug production issues.

Read
multimodal · 5 min

How to transcribe audio with OpenAI Whisper

Whisper is OpenAI's speech recognition model that supports 99 languages with near-human accuracy. This guide covers the Whisper API, running Whisper locally for privacy, and building a transcription pipeline for long recordings.

Read
coding · 6 min

How to use Aider for AI pair programming in the terminal

Aider is an open-source terminal tool that uses LLMs to edit your code directly. Unlike IDE plugins, Aider understands your full git history and makes commits automatically. This guide covers setup, the file context system, and effective workflows.

Read
prompting · 5 min

How to use chain-of-thought prompting for complex reasoning

Chain-of-thought (CoT) prompting dramatically improves LLM performance on multi-step reasoning tasks. This guide explains when and how to use it, from simple 'think step by step' to structured CoT templates.

Read
coding · 5 min

How to use GitHub Copilot effectively

GitHub Copilot has evolved far beyond autocomplete. This guide covers the completion model, Copilot Chat, Copilot CLI, and the techniques that get the most out of each feature.

Read
coding · 5 min

How to use GitHub Copilot Workspace for full-feature development

GitHub Copilot Workspace lets you describe a task in natural language and get a fully planned, multi-file implementation. This guide covers how Workspace reasons about your repository and how to guide it effectively.

Read
multimodal · 6 min

How to use GPT-4o vision for image analysis

GPT-4o can analyse images, documents, charts, and screenshots in detail. This guide covers sending images via URL and base64, practical use cases, and building an image analysis pipeline.

Read
agents · 7 min

How to use NousResearch Hermes for structured tool calling

Hermes is NousResearch's open-source model family trained specifically for function calling and agentic workflows. This guide covers running Hermes locally, defining tools in JSON Schema, and building a basic tool-calling loop.

Read
apis · 5 min

How to use prompt caching to cut LLM costs by up to 90%

Prompt caching lets providers reuse computed KV cache from previous requests when the same prefix is repeated, dramatically reducing cost and latency. This guide covers Anthropic and OpenAI caching, and how to structure prompts for maximum cache hits.

Read
prompting · 4 min

How to use role prompting and personas to improve output quality

Assigning a specific role or persona to an LLM consistently improves output quality on specialist tasks. This guide explains why role prompting works, how to craft effective personas, and when it helps most.

Read
setup · 5 min

How to use Text Generation Web UI (oobabooga) for local models

Text Generation Web UI is a browser-based interface for running local LLMs. It supports GGUF, GPTQ, and Transformers models, includes a chat UI and API server, and runs on any hardware. This guide covers installation and key features.

Read
apis · 5 min

How to use the Anthropic Claude API

The Anthropic API gives access to the Claude model family. This guide covers authentication, the Messages API, vision inputs, tool use, and the key differences from the OpenAI API format.

Read
apis · 6 min

How to use the Google Gemini API (Python and Node)

Google Gemini 2.5 Pro and Flash offer long context windows, multimodal inputs, and competitive pricing. This guide covers getting started with the Gemini API, function calling, and using the 1M token context window effectively.

Read
apis · 5 min

How to use the Mistral AI API

Mistral AI offers high-performance European models including Mistral Large, Pixtral for vision, and Codestral for code. This guide covers the API, function calling, and choosing the right Mistral model for your task.

Read
apis · 6 min

How to use the OpenAI API (Python and Node quickstart)

A practical introduction to the OpenAI API covering authentication, the chat completions endpoint, streaming, error handling, and cost management — with working code in Python and JavaScript.

Read
prompting · 6 min

How to write a system prompt that gets consistent results

The system prompt is the most powerful lever you have over LLM behaviour. This guide covers the key components of an effective system prompt, common mistakes, and battle-tested patterns for production use.

Read
learn · 7 min

In-Context Learning: How LLMs Learn from Examples

How large language models adapt to new tasks from examples in the prompt — without gradient updates or fine-tuning — and what this capability means for AI flexibility.

Read
learn · 6 min

Instruction-Tuned Models vs. Base Models

Base models predict text. Instruction-tuned models follow directions. Understanding the difference is fundamental to working with LLMs.

Read
learn · 5 min

KV Cache: How LLMs Remember Context Efficiently

The key-value cache is the mechanism that lets LLMs process long conversations without recomputing everything from scratch on every token.

Read
guides · 19 min

LLM Benchmarks Explained: The Complete 2025 Guide

A definitive guide to every major AI benchmark — MMLU, HumanEval, SWE-Bench, GPQA, AIME, Chatbot Arena, and 15 more. What each benchmark tests, which scores to trust, how contamination works, and how to read the 2025 frontier rankings.

Read
guides · 9 min

LLM Cost Optimization: Reducing AI Spend Without Sacrificing Quality

Practical strategies to dramatically reduce LLM API costs — from prompt caching and model routing to batching, caching, and smart context management.

Read
learn · 6 min

LLM Inference: How Models Generate Text

Inference is what happens when an LLM produces a response. Understanding it helps you optimize for speed, cost, and quality.

Read
learn · 5 min

LLM Latency: What Makes Models Feel Fast or Slow

Two key metrics — time to first token and tokens per second — determine how responsive an LLM feels. Here's what drives each.

Read
guides · 11 min

LLMs for Business: A Decision-Maker's Guide

Strategic guidance for business leaders evaluating AI — from identifying high-ROI use cases and build-vs-buy decisions to governance, risk management, and change management.

Read
guides · 9 min

LLMs for Content Creation: A Professional Guide

How to use AI models effectively for writing — from blog posts and marketing copy to technical documentation and creative work — without losing your voice.

Read
guides · 9 min

LLMs for Customer Support: From Chatbot to Resolution

A practical guide to deploying AI in customer support — designing effective chatbots, integrating with helpdesks, measuring success, and knowing when to escalate to humans.

Read
guides · 9 min

LLMs for Research and Analysis: A Researcher's Guide

How researchers and analysts can use AI models to accelerate literature review, data interpretation, hypothesis generation, and report writing — with appropriate caution.

Read
guides · 11 min

LLMs for Software Development: The Complete Guide

How to effectively use AI models in your software development workflow — from code generation and review to debugging, documentation, and architectural planning.

Read
learn · 8 min

Mixture of Experts: How LLMs Scale Efficiently

The architecture behind GPT-4, Llama 4, and Mistral — where only a subset of model parameters are active per token, enabling huge capacity at manageable inference cost.

Read
learn · 8 min

Model Quantization: Running LLMs on Less Hardware

How quantization reduces model size and inference cost by using lower-precision numbers — making 70B parameter models run on a single GPU and enabling on-device AI.

Read
learn · 8 min

Multimodal LLMs: AI That Sees, Hears, and Reads

How modern AI models process multiple modalities — text, images, audio, and video simultaneously — and what this enables for real-world applications.

Read
learn · 7 min

Open-Weight vs Open-Source Models: What's the Difference?

Why 'open-source AI' is often a misleading term — and what it actually means when a model is open-weight, what's included, what's not, and why it matters for developers.

Read
guides · 10 min

Privacy and Security with LLMs: What You Need to Know

The privacy risks of using AI APIs, data governance requirements, secure implementation patterns, and how to protect sensitive information when building with LLMs.

Read
learn · 12 min

Prompt Engineering: The Complete Guide

Master the art and science of writing effective prompts — from basic techniques to advanced methods like chain-of-thought, few-shot learning, and structured output generation.

Read
learn · 9 min

Reasoning Models and Chain of Thought: AI That Thinks

How reasoning models work, why they're so much better at hard problems, the key models in the space, and when to use them over standard LLMs.

Read
learn · 10 min

Retrieval-Augmented Generation (RAG) Explained

How RAG systems work, why they're the standard architecture for enterprise AI, the common failure modes, and how to build a production-quality RAG pipeline.

Read
learn · 9 min

RLHF: How AI Models Learn to Be Helpful

Reinforcement Learning from Human Feedback — the training technique behind ChatGPT and Claude that shaped modern AI assistants to be helpful, harmless, and honest.

Read
learn · 6 min

Sampling Strategies: How LLMs Choose the Next Word

Every token an LLM generates is chosen via a sampling strategy. Understanding temperature, top-p, and top-k reveals how models balance quality and creativity.

Read
learn · 6 min

System Prompts: The Hidden Instructions Behind AI Assistants

System prompts set the rules before a conversation begins. They're how developers shape model behavior, tone, and capabilities at scale.

Read
learn · 7 min

Temperature and Sampling: Controlling LLM Creativity

A clear explanation of temperature, top-p, top-k, and how sampling parameters control the balance between determinism and creativity in LLM outputs.

Read
learn · 9 min

The Attention Mechanism: How LLMs Understand Context

A clear explanation of self-attention — the mathematical operation at the heart of every transformer that allows language models to understand relationships between words.

Read
guides · 18 min

The Complete LLM Model Comparison Guide

A comprehensive guide to comparing AI models across dimensions that matter: capability, cost, speed, context, and use-case fit. Covers the 2025 model landscape, pricing data, latency benchmarks, and a use-case recommendation matrix.

Read
learn · 9 min

The Scaling Laws of LLMs: Why Bigger Often Means Better

The mathematical relationship between model size, training data, compute, and capability — and what the scaling laws predict about the future of AI.

Read
learn · 11 min

The Transformer Architecture Explained

A deep dive into the transformer architecture — the neural network design that powers virtually every major LLM, from its attention mechanism to positional encodings.

Read
learn · 7 min

Tokens and Tokenization: The Building Blocks of LLMs

Everything you need to know about tokens — how LLMs split text into pieces, why tokenization matters for cost and performance, and how different languages tokenize.

Read
learn · 4 min

Top-K Sampling: Limiting Randomness in Text Generation

Top-K sampling restricts token selection to the K most probable options at each step, balancing quality and diversity in LLM outputs.

Read
learn · 4 min

Top-P Sampling: Nucleus Sampling Explained

Top-P (nucleus) sampling dynamically selects the smallest set of tokens covering P% of the probability mass, adapting to model confidence at each step.

Read
learn · 7 min

Training vs Inference: Two Phases of an LLM's Life

Understand the difference between training an LLM (creating it) and inference (using it), including what happens at each stage, the costs involved, and why they matter for builders.

Read
learn · 7 min

Understanding AI Benchmarks: How Models Are Evaluated

AI benchmarks are standardized tests used to compare LLM capabilities. Learn how they work, what they measure, and how to read them critically.

Read
learn · 8 min

What Is a Large Language Model?

A clear, jargon-free introduction to large language models — what they are, how they work at a high level, and why they're transforming software and society.

Read
learn · 5 min

Zero-Shot Prompting: Getting Results Without Examples

Zero-shot prompting asks an LLM to perform a task with no examples — relying entirely on the model's pretrained knowledge and instruction-following ability.

Read