Learn AI from scratch, the developer's way
Concepts explained simply, with real-world examples — so you actually understand what's happening under the hood.
AI Fundamentals — Core 10
click any term to expand
How It All Connects
The flow below shows how raw text travels through an AI system — from tokenisation to embeddings to RAG to grounded output.
Complete AI Glossary
The big picture
| Term | Simple meaning |
|---|---|
| AI | Machines that simulate human intelligence |
| ML (Machine Learning) | AI that learns from data instead of explicit rules |
| Deep Learning | ML using neural networks with many layers |
| GenAI | AI that generates content — text, images, code |
| LLM | Large Language Model — the brain behind ChatGPT, Claude |
| Foundation Model | A massive pre-trained model others build on top of |
How LLMs work
| Term | Simple meaning |
|---|---|
| Token | A chunk of text (roughly 1 word ≈ 1.3 tokens) |
| Context Window | How much text the model can "see" at once |
| Prompt | The input you give the model |
| Inference | Running the model to get an output |
| Temperature | Controls randomness — 0 = predictable, 1 = creative |
| Embedding | Converting text into numbers (vectors) for comparison |
| Vector | A list of numbers representing meaning |
| Semantic Search | Retrieval that understands intent, not just keyword matches |
Building with AI
| Term | Simple meaning |
|---|---|
| RAG | Retrieval-Augmented Generation — give the model your own docs |
| Fine-tuning | Re-training a model on your specific data |
| Prompt Engineering | Crafting inputs to get better outputs |
| Agent | An AI that can take actions, use tools, make decisions |
| Tool Use / Function Calling | Letting the LLM call your code or APIs |
| Chain | Connecting multiple AI steps together |
| Hallucination | When the model confidently says something wrong |
Models & training
| Term | Simple meaning |
|---|---|
| Parameters | The "weights" inside a model (GPT-4 ≈ 1 trillion) |
| Training | Teaching a model on massive datasets |
| Pre-training | Initial training on general internet data |
| RLHF | Human feedback used to make models more helpful and safe |
| Transformer | The architecture behind almost all modern LLMs |
| Attention | How the model decides what parts of text matter most |
Anthropic API Pricing
June 2026
Pay-as-you-go — no monthly subscription. You pay only for tokens used, billed per million. 1M tokens ≈ 750,000 words.
| Model | Input / 1M tokens | Output / 1M tokens | Best for |
|---|---|---|---|
| Haiku 4.5 | $1.00 | $5.00 | Learning & cheap tasks |
| Sonnet 4.6 | $3.00 | $15.00 | Best balance — use this for Week 1 |
| Opus 4.8 | $5.00 | $25.00 | Most powerful tasks |
Cost Optimization
Batch Processing
50% cheaper on input + output. Submit thousands of requests asynchronously, processed within 24 hrs.
Prompt Caching
Cache your static context (docs, instructions) and pay 90% less when it's reused across calls.
Use Haiku While Learning
Haiku 4.5 is $1/1M input — cheapest and still great for all Week 1 practice tasks.
Batch processing — when to use it
Good for batch
- Processing thousands of documents
- Bulk summarization
- Data extraction / classification
- Nightly jobs
- Offline evaluations
- Content generation queues
Not suitable for batch
- Chatbots
- Real-time APIs
- Interactive applications
- Anything needing a response in seconds
Prompt caching — how it works
Cost breakdown per request
Static context (large docs, instructions) gets cached — you pay only 10% on reuse.
Dynamic context (user's question) is always charged at full rate.
Dynamic context (user's question) is always charged at full rate.
How the .claude/ config folder works, explained with a real example project.
runbook-bot/
├── CLAUDE.md
├── CLAUDE.local.md
├── .mcp.json
└── .claude/
├── settings.json
├── settings.local.json
├── rules/
│ └── code-style.md
├── commands/
│ └── fix-issue.md
├── skills/
│ └── deploy/SKILL.md
├── agents/
│ └── security-auditor.md
└── hooks/
└── validate-bash.sh
CLAUDE.md Loaded every session
- The main brief Claude Code reads at the start of every session
- Defines project overview, tech stack, build/run commands
- Documents architecture and conventions so Claude doesn't need re-explaining each time
# Runbook Bot
AI assistant that answers questions from AWS runbooks using RAG.
## Tech Stack
- Python 3.11, LangChain, ChromaDB, Anthropic API
- Embeddings: HuggingFace sentence-transformers (local, free)
## Commands
- Run bot: `python runbook_bot.py`
- Re-index docs: `python ingest.py --docs ./docs`
## Architecture
- `ingest.py` — loads PDFs, chunks, embeds, stores in ./chroma_db
- `runbook_bot.py` — CLI chat loop with ConversationalRetrievalChain
CLAUDE.local.md Personal, gitignored
- Same idea as CLAUDE.md, but personal overrides not shared with the team
- Use it for machine-specific notes — local AWS profile, test file paths, Python version
# Local notes (not shared with team)
My AWS profile: `personal-sandbox`
Test PDFs are in ~/Downloads/test-runbooks/
Running Python 3.11 via pyenv, not system Python
.mcp.json Shared via git
- Stores MCP (Model Context Protocol) integration configs
- Connects Claude Code to GitHub, Jira, Slack, databases
- Checked into git, so the whole team gets the same integrations automatically
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
}
}
}
.claude/settings.json Permissions & model
- Controls what Claude Code is allowed to do — like an IAM policy for the agent
- Defines model selection and hooks
settings.local.jsonworks the same way for personal, untracked overrides
{
"permissions": {
"allow": ["Bash(pytest:*)", "Bash(python:*)"],
"deny": ["Bash(rm -rf:*)"]
},
"model": "claude-sonnet-4-6"
}
.claude/rules/ Modular conventions
- Topic-specific markdown files instead of one giant CLAUDE.md
- Covers style, testing, API design — can target specific files/paths
# code-style.md
- Type hints required on all functions
- Use dataclasses for config objects, not raw dicts
- f-strings only, never .format() or %
- Max function length: 40 lines
.claude/commands/ Slash commands
- Custom reusable workflows, triggered like
/project:fix-issue - Good for repeatable tasks: bug fixes, releases, audits
# fix-issue.md
Given a GitHub issue number, reproduce the bug, write a failing test,
fix the code, and confirm the test passes. Show the diff before committing.
.claude/skills/ Auto-triggered
- Loaded automatically only when the task context matches
- Keeps everyday context lightweight — deploy instructions don't load unless you're deploying
# skills/deploy/SKILL.md
---
name: deploy-runbook-bot
description: Use when deploying the runbook bot to AWS Lambda or ECS
---
1. Run `pip freeze > requirements.txt`
2. Build Docker image, push to ECR
3. Update Lambda via `aws lambda update-function-code`
.claude/agents/ Specialized sub-agents
- A narrow-focus agent with its own isolated context and tool preferences
- Useful for a dedicated security or code-review pass
# agents/security-auditor.md
---
name: security-auditor
description: Reviews code for security issues before merging
---
Check for: hardcoded credentials, unsafe boto3 IAM scopes,
injection risks in user-input-to-prompt paths.
.claude/hooks/ Event-driven safety
- Scripts that run automatically before/after a tool executes
- Blocks unsafe operations, automates linting and validation
# hooks/validate-bash.sh
#!/bin/bash
if [[ "$1" == *"rm -rf"* ]]; then
echo "BLOCKED: dangerous command"
exit 1
fi
None of this is required to start — Claude Code works fine with zero config. Add these pieces gradually as a project grows, the same way you'd add IAM policies and CI rules over time.
Reference structure based on a Claude Code project layout diagram. Adapted with an AWS RAG-bot example.