Skip to content
← ./blog

LLM Basics

The fundamentals behind every AI feature: tokens, tool calls, structured output, and why models sometimes make things up. Start here if you want a working mental model before you build, with plain explanations and small code examples.

9 articles tagged LLM Basics.

Reflection's Beam and open-weight models: what builders should check

Reflection AI unveiled Beam, a 501-billion-parameter open-weight model it says matches leading Chinese open models at a fraction of the inference cost. Here's what was claimed, what's unverified, and how to judge any open-weight release.

LLM tokens and costs, explained with real arithmetic

Tokens are the unit everything in an LLM bill is measured in. This guide explains what they are, why output costs more than input, how agents multiply spend, and the practical levers that bring a bill down without hurting quality.

Getting reliable JSON out of an LLM

Asking a model for JSON and hoping is fragile. This guide compares the approaches that work, from forced tool calls to schema-constrained output, and shows how to validate, retry, and design schemas that models can fill correctly.

Why LLMs hallucinate and what actually reduces it

Hallucinations aren't random glitches. They follow from how language models are trained and evaluated. Understanding the causes points to the fixes that work: grounding, tools, constrained answers, verification, and honest evaluation.

Long context or RAG? How to choose

Bigger context windows didn't kill retrieval, and retrieval didn't make long context obsolete. This post gives you a practical way to pick between them, or combine them, based on your data and your questions.

Prompt caching: cheaper and faster LLM calls

Agents resend the same long prefix on every step. Prompt caching lets the provider reuse that work at a fraction of the price and with lower latency. Here's how it works, how to set it up, and what quietly breaks it.

Prompt engineering that still works with modern models

Modern models need less trickery and more clarity. These are the prompting habits that keep paying off: say what you want, give the reason, show examples, structure the input, and test changes.

Tool use explained: how an LLM calls your code

A language model can't run code or hit an API. It can only ask you to. This post explains how tool use works, what the model actually sees, and where things quietly go wrong.

What is an AI agent? A plain-English definition

An AI agent is a language model that picks its own next step, uses tools to act, and keeps going until the job is done. Here's what that means, what it doesn't, and when you actually need one.