Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llm-toolkit

Guides, prompts, and reading material we use at MTechZilla when building with LLMs, shared publicly so others can borrow from them.

The centrepiece is How LLMs Work - a 17-part written course, in plain language, for engineers who want to build on LLMs with real understanding rather than use them blindly. Read it in order; every part builds on the one before, and each ends with a table of memory hooks for later recall.

How LLMs Work

Part 1 - How LLMs Are Built

From raw text to the token on your screen: what the machine is, how it learns, and what it is doing when it answers you.

# Guide Time What it answers
1 Data Preparation 2 min Where 10-15 trillion training tokens come from, and who cleans the data before a smart AI exists to clean it
2 Tokenization 4 min Subwords and BPE, why the tokenizer is frozen forever, why models can't spell "strawberry", and why Hindi prompts cost 2-3× more
3 Pre-Training 5 min The machine (billions of dials), the game (fill-in-the-blank), and the parts - embeddings, attention, MLPs, the stack
4 Post-Training: SFT, RLHF, Verifiable RL 4 min How an autocomplete becomes an assistant, and where "thinking" actually comes from
5 Inference: The Loop, Temperature, Top-p 4 min One token per pass, no re-rolls - and what the two sampling knobs really do
6 Chat Templates and System Prompts 2 min Why instructions have power at all, why a base model ignores them, and how far a system prompt can be trusted
7 Context Windows 2 min The desk vs. the library, why long chats forget, and "lost in the middle"
8 Embeddings and Vector Databases 3 min How semantic search works, the RAG architecture, and which parts are your code's job

Part 2 - Building on LLMs

From a working demo to a production system: the disciplines that decide whether it survives real traffic.

# Guide Time What it answers
9 Production RAG 6 min Chunking strategies, why retrieval quietly fails, reranking, and how to measure quality instead of guessing
10 Structured Output and Reliable JSON 4 min Why "respond in JSON only" is a prayer, and the ladder of fixes that turns it into a contract
11 Tool Calling 4 min The model never calls anything - it emits a slip your code executes, and where the trust boundary sits
12 Model Context Protocol (MCP) 3 min The N×M integration problem, USB as the analogy, and what MCP does not change
13 How AI Agents Work 4 min The loop given a goal instead of a question, where agents shine, and when you shouldn't build one
14 Context Engineering 3 min What the model should see right now - the four moves, the three tiers, and prompt caching
15 Evaluating LLM Applications 3 min Golden sets, the three graders, LLM-as-judge, and reward hacking in your own pipeline
16 Prompt Injection and Guardrails 4 min Why instructions ARE data, the attack ladder, and why the fix cannot live inside the model
17 Cost and Latency Optimization 3 min Model routing, prompt caching and prefix drift, and the arithmetic behind a client quote

Roughly an hour end to end. If you are shipping something specific rather than learning the whole pipeline, jump straight to the guide for that problem - each one stands alone, and links back to the earlier guide when it leans on an idea from it.

Also in this repo

  • prompts/ - production prompts we run ourselves, written to be copied and adapted. Currently: summarising meeting transcripts into decisions, action items, and owners.
  • resources/ - the curated reading list the guides were built from: 35 talks, articles, and docs grouped by topic, each with a note on what it covers and how long it takes.
  • guides/ - the folder index for the course above.

Contributing

Issues and pull requests are welcome - a correction to a guide, a better prompt, or a resource worth adding.

License

MIT - see LICENSE.

About

Prompts we run in production and a curated reading list for building with LLMs - 35 vetted resources across foundations, prompting, RAG, evals, agents, and voice AI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors