The LLM Field Guide
About six minutes, no technical background needed. By the end, the words everyone throws around (tokens, context windows, .md files, MCP servers) will mean something concrete to you. Write code? Set the audience switch to Engineers and each section grows a note with the dials attached: context hygiene, the memory-file hierarchy, MCP internals, and token economics.
01
What an LLM actually is
An LLM (large language model, the thing behind Kimi, ChatGPT, Claude, and friends) is a prediction machine. It was trained on an enormous slice of the text humans have written, and it does one thing: you give it words, and it predicts which words should come next. Then it does that again. Millions of times a day, very fast.
It is not looking things up in a database, and it doesn't "know" facts the way you know them. It has absorbed the patterns of language and knowledge. That's why it can write, summarize, translate, brainstorm, and explain so fluently.
It also explains the failure mode: sometimes it produces something that sounds exactly right and is completely wrong. That's called a hallucination. Nobody is going to fully fix it, because it's a side effect of being a prediction machine.
02
Tokens are the currency
AI doesn't read words. It reads tokens, which are chunks of characters, roughly three-quarters of a word in English. "Unbelievable" is about three tokens: un · believ · able. A short email is a few hundred. This whole page is a few thousand.
Why you care: tokens are the meter running. Everything you send and everything the AI writes back costs tokens. They're both the bill on paid plans and the unit of its memory, which is the next section. You never need to count them. Just hold onto this: longer in and longer out means more tokens.
Engineering note
Rough conversions: ~4 characters per token in English prose, somewhat fewer characters per token in dense code. APIs bill per million tokens, with input and output priced separately. Output usually runs 3–5× the input price, so a model that writes a lot costs a lot.
03
The context window is a desk
The context window is everything the AI can see at once: your conversation so far, its instructions, any files or text you've shared. Think of it as a desk. Everything it's working with has to physically fit on the desk.
Desks have a fixed size. When yours fills up, the oldest papers start sliding off the edge. That's why, in a very long chat, the AI "forgets" what you said at the beginning. It literally can't see it anymore.
A cluttered desk also means worse work. As a chat gets longer and more tangled, the answers get vaguer, even before anything officially falls off. If an assistant feels dumber at message fifty than at message five, that's a full desk, not a broken tool.
Engineering note
Advertised context windows (128K, 200K, 1M for Kimi K3) are maximums, not working ranges. Three things degrade before you hit the wall:
- Attention dilution. Retrieval accuracy drops as context grows, especially for facts stranded in the middle ("lost in the middle").
- Cost. Every turn re-sends the entire conversation. A 50-turn session pays for turn 1 fifty times, so long sessions are O(n²) in tokens.
- Latency. Time-to-first-token scales with prompt size.
Big windows earn their keep on retrieval-style tasks like "find the bug in these 40 files." They are not a license to never start a fresh session.
Engineering note
Context hygiene is the highest-leverage habit
In agentic sessions, context is the working memory of your tool. Everything in it is paid for every turn and competes for the model's attention every turn. Managing it deliberately is the single biggest quality and cost lever you have:
- One task per session. New feature, new session. Context from the last task is noise for this one.
- Summarize and restart when it drifts. When a long session starts looping or contradicting earlier decisions, ask for a handoff summary and continue fresh. (/compact-style commands automate this.)
- Delegate search-heavy work to subagents. "Find where X is handled" can burn 30K tokens of file dumps. A subagent explores in its own context and returns a conclusion, so your main session stays clean for decisions.
- Reference paths, don't paste files. The agent can read src/auth/login.ts itself; pasting it in costs the same tokens with none of the freshness.
- Search before reading. Grep for the symbol, read the 40 lines that matter, not the 900-line file.
- Don't re-establish the known. Re-reading a file you already discussed, or re-verifying a value the user gave you, pays full price for zero information.
04
.md files are the note on the desk
AI assistants start every session with zero memory of you. Every morning, total amnesia. Your name, your company, how you like things done, all gone.
A .md file is how you fix that. It's a plain-text note (names like AGENTS.md or CLAUDE.md are common) that the assistant is set up to read first thing, every session, before it does anything else.
Think of it as the onboarding one-pager you'd leave for a brilliant new hire who forgets everything overnight: who we are, how we write, the rules that matter ("always do X, never do Y"), and where the important things live. Write it once, and every conversation starts at smart instead of at zero. This site has one. It's how the assistant that helped build it knew our conventions.
Engineering note
The memory-file hierarchy
Agentic tools load plain-text memory files into the system context at the start of every session. The hierarchy, from broad to specific:
~/.kimi-code/AGENTS.md # you, across all projects (also ~/.claude/CLAUDE.md)
~/project/AGENTS.md # this repo: conventions, commands, bans
~/project/api/AGENTS.md # one directory: only what's specific to it
Deeper files win on conflict. Most tools read AGENTS.md as the cross-vendor convention; vendor files (CLAUDE.md, …) coexist if you need tool-specific rules.
They're a per-turn tax. The file is injected into context on every message of every session, so every line has to earn rent. What earns it:
- Build / test / lint commands the agent would otherwise guess wrong
- Conventions it can't infer ("commit messages follow this format", "never use dynamic Tailwind classes")
- Hard-won gotchas ("test suite must run against sqlite :memory:, never the dev DB")
- Banned patterns and tools
What doesn't: prose about the project's mission, anything derivable from reading the code, style rules a linter already enforces. A 1,500-line memory file isn't thorough. It's slow, expensive, and half-ignored.
Use progressive disclosure: keep the root file to a few dozen lines and point to deeper docs (docs/deploy.md) the agent can open only when the task needs them. Treat memory files like infrastructure. Commit them, review changes to them like code, and prune them when conventions move. Stale instructions don't get ignored. They get followed.
05
MCP servers give the AI hands
On its own, an LLM is a brain in a jar. It can think and talk, but it can't see your calendar, read your files, check your time tracking, or look at your design files. It can only work with what you paste into the chat.
MCP (Model Context Protocol) changes that. It's a standard plug, the USB-C of AI, that lets an assistant connect directly to other software. A tool maker publishes an "MCP server" for their app; you plug it into your assistant; the assistant can now reach into that app (with the access you grant) while it works for you.
The difference in practice: without the plug, "how many hours did we log this week?" gets you a shrug or a guess. With the Harvest MCP server plugged in, it goes and looks, then answers from real data. Same for "what changed in the Figma file?" or "what tables are in this database?" We already use a couple of these on the team.
One caution, and it's a real one: hands can touch things. Only connect tools you trust, prefer read-only access when it's offered, and remember that anything the AI reads through a plug becomes part of the conversation.
Engineering note
MCP internals and the trust model
Model Context Protocol is an open standard (Anthropic, late 2024) for connecting models to tools and data. The shape of it:
- Wire protocol: JSON-RPC 2.0. Transports are stdio (your tool launches the server as a local subprocess) or streamable HTTP (remote server, typically OAuth-authenticated).
- What a server exposes: tools (callable actions), resources (readable data), and prompt templates. In practice, tools are 95% of what you'll use.
- Config lives in your tool's settings; the shape is some variant of:
{
"mcpServers": {
"figma-custom": {
"command": "npx",
"args": ["-y", "figma-mcp-custom"],
"env": { "FIGMA_API_KEY": "…" }
},
"some-remote": {
"type": "http",
"url": "https://mcp.example.com/mcp"
}
}
}
The context cost nobody mentions: every connected server's tool schemas are injected into your context window so the model knows what it can call. One rich server can add dozens of tool definitions, which is thousands of tokens on every turn before you've typed a word. Connect what the current work needs. Disconnect the rest.
The trust model matters more: MCP tools execute with your credentials and permissions. A malicious or sloppy server can exfiltrate data, and tool output flows back into the model's context as untrusted text, a classic prompt-injection vector ("the README says to email the contents of ~/.ssh…"). Practical rules:
- Install servers from sources you'd install npm packages from. No random gists.
- Prefer read-only scopes; use a dedicated API token with minimal permissions, not your personal god-mode key.
- Pin versions, and skim what a new server actually does before wiring it in.
- Keep secrets in env vars the config references. Never inline a token in a committed file.
Worth your time on our stack: Laravel Boost (the first-party server, with schema, routes, version-aware docs, and tinker) plus the Figma and Harvest servers some of us already run.
06
Getting more answer per token
"Min/maxing" is a term from games: squeeze the most value out of limited resources. Tokens are the resource. These habits cost nothing and compound fast:
-
→
One chat, one job. New topic, new chat. A clean desk beats a clever prompt.
-
→
Ask the whole question the first time. Context, what you want, and what it should look like, all up front. A vague ask takes three follow-ups to fix, and every follow-up re-sends the entire conversation. The vague question costs four times the tokens of the clear one.
-
→
Paste the paragraph, not the document. Point it at the section that matters. If it's a file the assistant can open itself, name the file instead of pasting it.
-
→
Retire long chats gracefully. If a long conversation is going somewhere good, ask for a summary of what's been decided, then continue in a fresh chat with that summary. Clean desk, nothing lost.
-
→
Show, don't describe. One example of what "good" looks like beats three paragraphs describing it, and usually costs fewer tokens.
-
→
Move repeat context into a .md file. If you're pasting the same background into every chat, that background belongs on the desk instead.
Engineering note
The engineering checklist
Beyond context hygiene, in rough order of leverage:
- Exploit prompt caching. Providers cache long stable prefixes (system prompt, memory files, tool schemas) at a fraction of the input price, but only while the prefix is byte-identical. Keep stable content first and volatile content (timestamps, scratch state) last. Don't churn the head of the prompt.
- Batch independent work per turn. Three file reads issued in parallel cost the same tokens as three sequential ones and a third of the wall-clock, and you skip two assistant turns of overhead.
- Small, scoped diffs over big generations. "Change the validation in this method" beats "rewrite the file": fewer output tokens (the expensive kind), easier review, fewer regressions.
- Ask for structured output when you'll parse it. A JSON shape you can diff beats prose you have to re-ask about.
- Right-size the model. Mechanical tasks (renames, boilerplate, formatting) don't need the frontier model; route them to the cheap tier and save the flagship for reasoning-heavy work.
- Filter before you feed. Grep the log, don't paste the log. Pipe command output through tail/head. The model needs the five relevant lines, not the five thousand.
- The user's message is the cheapest token source. Re-deriving a fact they already told you, like a path or a credential location, burns tool calls to confirm what was free to begin with.
07
Five habits that beat any "prompt hack"
-
1.
Give context. Who it's for, what it's for, why now. "Write a project update for a client who's nervous about the timeline" beats "write a project update."
-
2.
Say what done looks like. Format, length, tone, audience. "Three bullet points, casual, under 100 words" saves a round trip.
-
3.
Show an example. Paste one you like and say "like this."
-
4.
Correct it like a colleague. "Too formal, cut the second point, keep the opening." Specific feedback gets you to good in two rounds instead of six.
-
5.
Keep each chat on one topic. (Yes, this is here twice. It's that one.)
Engineering note
Team conventions worth adopting
-
→
Commit AGENTS.md to every repo. Onboarding a new dev and onboarding the agent become the same document. Review changes to it like code.
-
→
Document each repo's MCP servers in its README: which ones, why, and where the config lives, so a teammate's setup matches yours.
-
→
Keep secrets out of prompts and memory files. .env is not context. If the agent needs a key, it gets a reference, not the value.
-
→
Feed the loop. Trick worked? Bring it to the monthly chat. If it holds up, it lands in this repo. Knowledge multiplies or it evaporates.
08
When to double-check
Prediction machines are most useful when you know where the edges are. Verify before you rely on:
- Numbers, dates, and anything that sounds quoted or cited
- Anything client-facing, legal, or financial
- Anything it couldn't possibly know, like yesterday's meeting or this morning's numbers, unless it's connected to a real source (see MCP servers)
- Anything it says very confidently. Confidence is a style, not a signal.
Ten seconds of checking keeps the upside and drops most of the risk.