The Core Principle
Don’t teach “agents.” Teach pipelines with autonomy.
A junior dev should ship one narrow workflow that:
-
Calls tools
-
Handles failure
-
Controls cost
-
Produces logs
-
Is testable
-
Has numbers to show
No multi-agent chaos. No “AI swarm.”
The One Workflow to Ship (Example)
π― Project: “Support Ticket Triage Agent”
Input: Raw support ticket text
Output:
-
Category (bug / billing / feature)
-
Priority (low / med / high)
-
Draft response
-
Confidence score
This is:
-
Useful
-
Boring enough to finish
-
Rich enough to teach orchestration
Step-by-Step: The Learning Path
1. Define the Agent as a State Machine (Not Magic)
Teach juniors to think in states, not prompts.
This alone removes 80% of agent confusion.
2. Tool Calling (Minimal but Real)
Tools to include
-
classify_ticket(text) -
draft_response(category, priority, text) -
log_event(event_type, metadata)
Example (Python-ish pseudocode):
π Teach:
-
Tools are typed functions
-
The model chooses when to call them
-
You own execution + validation
3. Retries (The First “Agentic” Behavior)
Retry logic should be deterministic, not vibes.
Example:
Teach juniors:
-
Retry on low confidence
-
Change instructions, not randomness
-
Log every retry
4. Logging (Non-Negotiable)
Every run logs:
| Field | Example |
|---|---|
| request_id | abc123 |
| model | gpt-4.1-mini |
| tokens_in | 412 |
| tokens_out | 96 |
| cost | $0.0021 |
| retries | 1 |
| latency | 842ms |
Use:
-
JSON logs
-
One log per step
-
No screenshots yet — raw data first
This teaches observability, not prompt tweaking.
5. Cost Controls (Make It Explicit)
Hard limits:
Soft limits:
-
Smaller model for classification
-
Bigger model only for response drafting
-
Cap retries
π Juniors should print cost per run in the console.
That feedback loop matters.
6. Basic Test Harness (This Is Where Most Skip)
Teach evaluation before scaling.
Golden test cases (10–20)
Test:
-
Accuracy
-
Confidence calibration
-
Cost per test
Run nightly or manually.
7. Write It Up (This Is the Career Accelerator)
The write-up should include:
πΈ Screenshots
-
Logs
-
Retry happening
-
Tool call JSON
-
Cost summary
π Numbers
-
Accuracy before retry vs after
-
Avg cost per ticket
-
Avg latency
-
Failure rate
π§ What They Learned
-
Where the agent fails
-
What retries help vs hurt
-
How cost scales
This is portfolio gold.
What This Teaches (Quietly)
Without buzzwords, juniors learn:
-
Agent orchestration
-
Deterministic control flow
-
LLM failure modes
-
Cost-aware design
-
Evaluation discipline
-
Production thinking
They stop being “prompt engineers” and start being systems engineers.
No comments:
Post a Comment