Practical guides on AI, the African Stack, web fundamentals, Kenyan tech careers, and common developer errors. Written for developers building in and for Africa.
RAG connects an LLM to your own data so it answers from facts, not guesses. This guide explains retrieval augmented generation with a Kenyan SACCO chatbot example, complete code, and practical tradeoffs.
Embeddings turn text into arrays of numbers that capture meaning. This guide explains how they work with a plain-language walkthrough, a worked code example, and practical use cases for developers.
Vector databases store embedding vectors and search by similarity instead of exact match. This guide explains how they work, compares pgvector to dedicated options like Pinecone, and helps you pick the right one.
RAG retrieves your data at query time. Fine-tuning bakes knowledge into the model. This guide gives you a clear decision framework with three real scenarios to help you choose the right approach.
Prompt engineering is the practice of structuring LLM inputs to get reliable outputs. This guide covers durable techniques, not model-specific tricks, with before-and-after examples you can use today.
LLMs predict the next token based on everything before it. This guide explains how that works without equations, covering training, inference, and why LLMs sometimes make things up.
LLM APIs charge by the token. This guide explains what tokens are, how context windows limit what the model can read, and how both directly affect your costs and application design.
Function calling lets an LLM request specific actions, like checking weather or querying an M-Pesa balance, instead of guessing. This guide explains the pattern with runnable TypeScript examples.
An AI agent is a loop: observe, decide, act, repeat. This guide cuts through the hype to explain what agents actually are, how the loop works, and what guardrails prevent them from going off the rails.
MCP (Model Context Protocol) is an open standard for connecting LLMs to external tools and data sources. This guide explains the protocol, its architecture, and how to build your first MCP server.
LLM hallucinations happen because models generate probable text, not verified facts. This guide explains why they occur and covers five practical techniques to reduce them in production applications.
Temperature and top-p control how random an LLM's output is. This guide explains what each setting does, shows side-by-side output examples, and gives you practical defaults for common tasks.
System prompts set the model's role and rules. User prompts carry the specific request. This guide shows the difference with a before-and-after example for a Kenyan business scenario.
Stream LLM responses token by token in Next.js App Router. This guide walks through the full setup: a server-side route handler that streams from the OpenAI API, and a React component that renders the stream in real time.
AI evals are test suites for LLM-powered features. They verify that your system gives correct, safe, well-formatted answers. This guide explains how to build a practical eval suite with a TypeScript example.
How you split documents into chunks affects RAG retrieval quality. This guide covers practical chunking strategies, recommended sizes, overlap settings, and when to use structural chunking.
Keyword search matches exact terms. Semantic search matches meaning. This guide shows the same query run both ways, explains when each is better, and shows you how to implement hybrid search.
Cosine similarity measures how similar two vectors are by the angle between them. This guide explains the concept with a worked example in Python and TypeScript, so you understand what powers vector search.
A step-by-step guide to integrating M-Pesa Daraja API. Covers authentication, STK Push, callbacks, and going live with runnable Node.js and Python code.
Understand the full STK Push lifecycle from request to callback. Covers the sequence of events, what happens at each stage, timeout behavior, and common failure codes.