AI Learning Roadmap — Part 2
AI Learning Roadmap — Part 2
Intermediate Level
1. Model Context Windows
The amount of text an LLM can “see” at once. Think of it as the model’s short-term memory.
Example:
Model A: 2,000 token window → uploading a 5,000-token document means it only sees the first 2,000 tokens → incomplete answers.
Model B: 100,000 token window → sees everything → complete answers.
Current models (Jan 2026):
- Claude 3.5 Sonnet: 200,000 tokens
- GPT-4: 128,000 tokens
- Older models: 2,000–4,000 tokens
Why it matters:
- Large documents need large windows
- Bigger windows cost more but improve accuracy
- Essential to know before building systems
2. Embeddings and Semantic Search
Converts text into numbers representing meaning. Similar texts → similar numbers; different texts → different numbers.
Example:
"I love cats" → [0.2, 0.5, -0.1, ...]
"I like cats" → [0.21, 0.49, -0.09, ...] (similar)
"I hate snakes" → [0.9, -0.2, 0.5, ...] (different)
Why numbers? Computers can quickly compare numbers to find similarity.
Semantic search:
- Keyword search: only finds exact words
- Semantic search: finds documents with similar meaning even if words differ
Example
User searches your product documentation for: “How do I reset my password?”
Old way (keyword search):
Only finds documents with exact words “reset” and “password”
Misses document titled “Account Recovery Guide”
New way (semantic search with embeddings):
Converts “reset password” to numbers
Compares those numbers against all documents
Finds “Account Recovery Guide” because it has similar meaning
Works even though exact words don’t match
Vector database
A special database that stores embeddings and finds similar ones fast.
Example
10,000 customer reviews → converted to embeddings → stored
User asks: “Which reviews mention good customer service?”
You convert that question to an embedding.
Vector Database quickly finds the 50 reviews with similar embeddings. Returns them in milliseconds.
3. Retrieval-Augmented Generation (RAG)
A technique to make AI answer questions about YOUR data without retraining the model. It works in 3 steps: Find relevant documents, Give them to the AI, AI answers based on those documents.
Problem it solves:
- LLMs trained on public internet data (not your private company data)
- You can’t retrain Claude on your data (too expensive, too slow)
- Solution: RAG — dynamically feed your data to Claude
Example:
Question: “How many vacation days do I get?”
Without RAG: AI gives a generic answer -> answers “It varies by company, typically 15–20 days…”
With RAG: AI reads your policy → answers “25 days per year”
Why it matters:
- Cheaper and faster than retraining
- Ensures AI answers are accurate for your data
4. Hallucinations
Hallucination occurs when AI confidently says something false. It’s not lying — it’s predicting plausible text based on patterns it learned.
Examples:
User: “What did Einstein say about quantum mechanics?”
AI: “Einstein once said, ‘The universe operates on quantum principles that transcend classical physics.’”
Reality: Einstein never said exactly that. The AI made up a quote that sounds like something he might say.
How to reduce hallucinations:
- Use RAG to provide real data
- Ask AI to cite sources
- Validate outputs
- Lower temperature to reduce creativity
Why it matters: You need to know this exists so you design systems to prevent it. Users trust AI, so false information spreads easily.
5. Fine-Tuning
Training an AI model on your specific data to make it better at your specific task. You start with a base model and customize it.
Simple analogy:
Base model: A student who studied general knowledge
Fine-tuning: Intensive study in just one subject (making them an expert in that subject)
When to use:
- Large dataset (500+ examples)
- Need specific behavior or tone
- Consistency across responses
- Reduce token costs over time (fine-tuned model is smaller/faster)
Why it matters: Fine-tuning makes AI applications more useful for specialized tasks without retraining the entire model