Executive Orientation & The AI Engineer Paradigm Shift
Traditionally, working in AI required training statistical models from scratch as a Data Scientist or ML Engineer. Today, the AI Engineer leverages pre-trained Foundation Models (LLMs, Multimodal AI, Vision-Language Models) via APIs and open-source frameworks to architect reliable, autonomous, production-grade software systems.
Creator's Field Note • Built in Public for Learners Worldwide
My personal transition blueprint from zero to production AI engineer
“When I started my journey to become an AI Engineer, I found that most courses online were either too abstract with high-level slides or disconnected from real production challenges. This 24-week curriculum is my exact, unfiltered daily learning log, code implementations, unit tests, and production debugging notes. Some topics, scripts, and error cases might feel raw and deeply hands-on—that is 100% deliberate. They capture the real messy realities of configuring CUDA, fixing asynchronous event loops, debugging embedding drift, and building robust autonomous agents. I am publishing everything openly so developers, students, and engineers everywhere can learn freely alongside me. We continuously update and refine every lesson—explore, run the tests, and let's master AI engineering together!”
Role Clarity: Data Scientist vs. ML Engineer vs. AI Engineer
| Dimension | Data Scientist | Traditional ML Engineer | AI Engineer (Your Target) |
|---|---|---|---|
| Primary Focus | Statistical analysis, hypothesis testing, data insights | Model training, fine-tuning, feature stores, training pipelines | System architecture, RAG, AI Agents, MCP & LLM integration |
| Core Artifact | Jupyter notebooks, analytical reports, business dashboards | Model weights, PyTorch models, GPU training pipelines | Production APIs, multi-agent workflows, full-stack AI applications |
| Key Skillset | Statistics, SQL, Pandas, data visualization | PyTorch/TensorFlow, MLOps, CUDA, hyperparameter tuning | Async Python, FastAPI, Vector DBs, Prompting, LangGraph/CrewAI, MCP |
| Primary Metric | Accuracy, Precision, F1-Score, ROC-AUC | Model throughput, GPU utilization, validation loss | End-to-end latency, token cost, RAG retrieval precision, task success rate |
Master 6-Month AI Engineering Blueprint
Master Blueprint: The 6 AI Engineering Capstone Projects
Building production-grade AI systems requires moving beyond isolated tutorials and static script execution. The most effective way to prove engineering capability is to build a single, evolving application over a 6-month period. Each monthly milestone adds a substantive engineering layer—transitioning a simple command-line interface (CLI) into a fully automated, evaluated, retrieved, agentic, containerized, and fine-tuned AI platform.
The core application built across this curriculum is the SRE Runbook Copilot & Incident Operations Platform. This project addresses real-world enterprise infrastructure challenges: parsing technical operational documentation, retrieving precise procedures under incident stress, executing safe read-only diagnostics via agent tools, and delivering audited, low-latency responses.
Portfolio Architecture Evolution Summary
| Month | Milestone Project | Primary Tech Stack | Added Architecture Capability | Key Success Metric |
|---|---|---|---|---|
| Month 1 | SRE Runbook Copilot CLI | Python 3.12, uv, AsyncOpenAI, Pydantic v2 | Asynchronous execution, JSON output validation, token cost tracking | 100% schema validation pass rate; exact per-request cost logging |
| Month 2 | Automated LLM Evaluation Suite | pytest, promptfoo, Ragas, DeepEval, GitHub Actions | Continuous Integration evaluation, LLM-as-a-Judge grading rubrics | Automated CI evaluation run on every PR; score regression blocking |
| Month 3 | Enterprise Hybrid RAG Engine | Qdrant / pgvector, BGE/Cohere Reranker, FastEmbed | Dense vector + sparse keyword search, document chunking, citations | Retrieval hit rate > 85%; explicit source-section attribution |
| Month 4 | Agentic MCP Server & Tooling | Model Context Protocol (MCP), FastMCP, LangGraph, NeMo Guardrails | Autonomous agent loop, standardized MCP tools, prompt injection defense | Zero unauthorized state mutations; 100% tool choice eval accuracy |
| Month 5 | Production FastAPI Microservice & MLOps | FastAPI, Docker, OpenTelemetry, Langfuse, LiteLLM Gateway | High-concurrency REST API, distributed tracing, prompt caching, fallback routing | p95 latency < 2.5s; full request/span observability |
| Month 6 | Fine-Tuned Open Model Serving Engine | vLLM, Ollama, Hugging Face PEFT / LoRA, PyTorch | Open-weights model self-hosting, task-specific parameter-efficient fine-tuning | 4x cost reduction vs hosted APIs on narrow classification tasks |
1. Project 1 (Month 1): SRE Runbook Copilot CLI
1.1 Overview & Architecture
The Month 1 capstone project establishes the software engineering foundation. You build an asynchronous command-line tool that accepts operational incident questions alongside raw Markdown runbooks, executing parallelized LLM completions while guaranteeing structured data validation and token cost auditing.
[CLI User Input]
│
├──> (Async Task 1: Question A + Runbook Text) ──> [AsyncOpenAI Client] ──> (JSON Response) ──> [Pydantic v2 Validation]
│ │
└──> (Async Task 2: Question B + Runbook Text) ──> [AsyncOpenAI Client] ──> (JSON Response) ──> [Pydantic v2 Validation]
│
▼
[Cost Auditor & CLI Output]
1.2 Tech Stack & Dependencies
- Runtime: Python 3.12+ managed via
uv - API Client:
openai(AsyncOpenAI) - Validation:
pydanticv2 (BaseModel,Field) - Concurrency: Standard library
asyncio
1.3 Directory Structure
runbook-copilot-cli/
├── pyproject.toml
├── .env
├── main.py
├── runbooks/
│ ├── payments_service.md
│ └── database_failover.md
└── src/
├── __init__.py
├── schemas.py
├── copilot.py
└── cost_calculator.py
1.4 Core Implementation Specifications
- Schema Definition (
src/schemas.py): DefineRunbookResponseenforcing three fields:reply(string): The explicit troubleshooting steps or direct answer.cited_section(string): The exact header or section from the Markdown text.covered_by_doc(boolean):Trueif answered directly by the runbook;Falseif unmentioned.
- Asynchronous Engine (
src/copilot.py): Implementasync def analyze_runbook(...)usingAsyncOpenAI. Setresponse_format={"type": "json_object"}andtemperature=0.0. - Cost Auditor (
src/cost_calculator.py): Extractresponse.usage.prompt_tokensandcompletion_tokens. Compute exact financial cost using pricing formulas ($0.15 / 1M input tokens, $0.60 / 1M output tokens for standard mini models). - Parallel CLI Entry Point (
main.py): Useasyncio.gather()to evaluate multiple incident queries simultaneously without blocking the I/O loop.
1.5 Verification & Success Criteria
- Executing
uv run main.pyparses Markdown runbooks without throwing unhandled parsing errors. - Sending an unanswerable query correctly returns
"covered_by_doc": falsewithout LLM hallucination. - Terminal output displays a formatted summary of prompt tokens, completion tokens, total cost in USD, and JSON payload.
2. Project 2 (Month 2): Automated LLM Evaluation & Regression Test Suite
2.1 Overview & Architecture
Month 2 introduces continuous evaluation—the defining discipline of professional AI engineering. You build an automated test framework that runs a suite of 30 to 50 real-world incident test cases against your prompt pipeline, scoring answers using deterministic assertions and an LLM-as-a-Judge grading rubric integrated into GitHub Actions CI/CD.
[Git Commit / PR Push]
│
▼
[GitHub Actions CI Pipeline]
│
├──> [Load Evaluation Dataset (evals/questions.yaml)]
│
├──> [Execute Copilot Pipeline over Test Inputs]
│
├──> [Deterministic Checks] (Schema match, regex, citation presence)
│
├──> [LLM-as-a-Judge Scoring] (Evaluate accuracy, completeness, hallucinations via Rubric)
│
▼
[Generate CI Score Report & Block Merge if Accuracy < Target Threshold]
2.2 Tech Stack & Dependencies
- Testing Framework:
pytest,pytest-asyncio - Eval Orchestration:
promptfooCLI or nativeDeepEval/Ragas - Judge LLM:
gpt-4o(or Claude 3.5 Sonnet) as the evaluator model - CI/CD Platform: GitHub Actions (
.github/workflows/evals.yml)
2.3 Evaluation Dataset Schema (evals/questions.yaml)
- id: eval_001
question: "How do I clear the Redis cache for payments?"
runbook_file: "runbooks/payments_service.md"
expected_section: "## Cache Management"
ground_truth_answer: "Execute `redis-cli -h redis-prod.internal flushdb` after obtaining approval."
required_keywords: ["redis-cli", "flushdb"]
- id: eval_002
question: "What is the procedure for deploying a hotfix to Kubernetes?"
runbook_file: "runbooks/payments_service.md"
expected_section: "None"
ground_truth_answer: "Uncovered"
should_be_covered: false
2.4 Implementation Specifications
- Deterministic Test Suite (
tests/test_deterministic.py): Assert that output strictly matches Pydantic schemas, response latency is under defined limits, and required technical keywords (e.g., commands, flags) are preserved. - LLM-as-a-Judge Evaluator (
src/evaluators/judge.py): Construct a grading prompt that passes theQuestion,Context Document,Ground Truth, andActual Outputto an evaluator model. The judge assigns scores (1–5) across three metrics:- Faithfulness: Does the answer contain claims not supported by the document?
- Completeness: Does the answer include all critical steps from the ground truth?
- Citation Accuracy: Is the cited section heading correct?
- CI Pipeline Integration (
.github/workflows/evals.yml): Configure a workflow that executes on pull requests. The job fails if the aggregate pass rate falls below 90% or if any critical safety assertion fails.
2.5 Verification & Success Criteria
- Pull requests automatically trigger test execution in GitHub Actions.
- Intentionally degrading the system prompt causes the evaluation suite to fail and block PR merging.
- A formatted evaluation report is generated, displaying per-metric accuracy and latency distributions.
3. Project 3 (Month 3): Enterprise Hybrid RAG Engine
3.1 Overview & Architecture
Month 3 transforms the single-file copilot into a enterprise Retrieval-Augmented Generation (RAG) platform capable of indexing hundreds of runbooks, post-mortems, and architectural logs. You implement document chunking, hybrid search (combining dense vector embeddings with sparse keyword matching), and cross-encoder reranking.
[Raw Runbooks & Incident Documents]
│
├──> [Semantic Chunker] (Header-aware markdown splitting, 512 tokens)
│
├──> [Dense Embedder] (text-embedding-3-small) ──> [Qdrant Vector Index] ──┐
│ ├──> [Hybrid Fusion] ──> [Cross-Encoder Reranker] ──> [Top-K Context] ──> [LLM Generation]
└──> [Sparse Indexer] (BM25 / Sparse Vector) ──> [Qdrant Sparse Index] ──┘
3.2 Tech Stack & Dependencies
- Vector Database: Qdrant (via Docker container) or PostgreSQL with
pgvector - Embedding Model: OpenAI
text-embedding-3-smallor Hugging Facebge-small-en-v1.5 - Reranking Engine:
FlashRankor Cohere Rerank API - Document Parsing:
langchain-text-splittersor custom Markdown AST parser
3.3 Database Infrastructure (docker-compose.yml)
version: '3.8'
services:
qdrant:
image: qdrant/qdrant:v1.9.0
container_name: runbook_qdrant
ports:
- "6333:6333"
- "6334:6334"
volumes:
- ./qdrant_data:/qdrant/storage
3.4 Implementation Specifications
- Document Ingestion Pipeline (
src/rag/ingest.py):- Parse Markdown files using structural header boundaries (
#,##,###). - Append document metadata (file path, section heading, last modified date) to each chunk payload.
- Generate dense vector embeddings and upsert payload records to Qdrant.
- Parse Markdown files using structural header boundaries (
- Hybrid Search Retrieval Engine (
src/rag/retriever.py):- Execute simultaneous dense vector search (semantic similarity) and sparse search (BM25 keyword match).
- Merge candidate pools using Reciprocal Rank Fusion (RRF).
- Cross-Encoder Reranking (
src/rag/reranker.py):- Pass the top 20 retrieved candidates through a reranker model to compute definitive query-document relevance scores.
- Select the top 3 highest-scoring chunks to populate the LLM context window.
- Citation Engine (
src/rag/generator.py): Enforce explicit inline source citations in every generated answer, referencing source filename and section header.
3.5 Verification & Success Criteria
- Qdrant web dashboard (
http://localhost:6333/dashboard) displays indexed collections and vector payloads. - Retrieval evaluation metrics achieve > 85% Hit Rate @ K=3 and Mean Reciprocal Rank (MRR) > 0.75.
- Answers accurately synthesize information across multiple separate runbook documents.
4. Project 4 (Month 4): Agentic MCP Server & Infrastructure Tooling
4.1 Overview & Architecture
Month 4 shifts the copilot from passive question answering to active incident diagnosis. You build a standardized Model Context Protocol (MCP) server that exposes read-only infrastructure tools (e.g., checking Kubernetes pod logs, querying Prometheus metrics), orchestrated by an autonomous agent loop with strict prompt injection guardrails.
[User Query] ──> [LangGraph / Agent Loop]
│
├──> [Plan Next Action]
│
├──> Call Tool over MCP ──> [FastMCP Server] ──> [Read-Only K8s API]
│ │
├──> Observe Result <────────────────────────────────────┘
│
├──> [Guardrails Check (NeMo)] (Validate safety & input integrity)
│
└──> [Final Structured Answer]
4.2 Tech Stack & Dependencies
- Agent Protocol: Model Context Protocol (MCP) SDK (
mcp,FastMCP) - Agent Framework:
langgraphorpydantic-ai - Guardrails: NeMo Guardrails or custom Pydantic input validators
- Mock Infrastructure:
kubernetesPython client or mock SRE environment
4.3 Implementation Specifications
- MCP Server (
src/tools/mcp_server.py): Implement an MCP server exposing three read-only operational tools:get_service_status(service_name: str): Returns current pod status, restart counts, and uptime.fetch_error_logs(service_name: str, lines: int): Retrieves the last N log entries filtering forERRORorFATAL.check_metric_threshold(metric_name: str): Queries CPU/Memory utilization percentages.
- Stateful Agent Graph (
src/agent/graph.py):- Construct a state graph using
langgraphfeaturing nodes:agent_reasoning,execute_mcp_tool, andverify_output. - Enforce maximum execution iteration limits (e.g., max 5 loop iterations) to prevent infinite loops.
- Construct a state graph using
- Security & Guardrail Layer (
src/agent/security.py):- Strip executable commands or shell injection characters from tool arguments.
- Implement RBAC: restrict MCP server credentials to read-only service accounts (
get,list,watch). - Require explicit human-in-the-loop (HITL) approval for any hypothetical state-modifying action.
4.4 Verification & Success Criteria
- The agent successfully diagnoses an simulated outage by calling tools in logical sequence (Status Logs Metric).
- Tool-calling evaluations confirm the agent selects the correct tool > 95% of the time.
- Attempting prompt injection attacks via malicious document context fails to hijack agent tool execution.
5. Project 5 (Month 5): Production FastAPI Microservice, Tracing & MLOps Pipeline
5.1 Overview & Architecture
Month 5 wraps the RAG and agent engine into an enterprise-grade REST microservice. You containerize the application with Docker, implement distributed tracing using OpenTelemetry and Langfuse, set up semantic prompt caching, and establish fallback model routing for high availability.
[Client Request] ──> [LiteLLM Gateway / FastAPI] ──> [Semantic Cache] ──(Cache Hit?)──> [Instant Return]
│
(Cache Miss)
│
▼
[Agentic RAG Engine] ──> [OpenTelemetry / Langfuse Tracing]
│
▼
[Dockerized App Container]
5.2 Tech Stack & Dependencies
- Web Framework:
fastapi,uvicorn,gunicorn - Containerization: Docker, Docker Compose
- Observability: OpenTelemetry SDK,
langfuse/ Arize Phoenix - Resilience Gateway: LiteLLM Proxy / fallback routing
5.3 Microservice Architecture Specs
- REST Endpoints (
src/api/routes.py):POST /v1/copilot/query: Main streaming and JSON response endpoint.GET /healthz: Liveness and readiness probes for Kubernetes.GET /v1/copilot/metrics: Internal telemetry (latency, token costs, cache hit ratio).
- Distributed Tracing (
src/telemetry/tracer.py):- Instrument every API request with OpenTelemetry spans tracking LLM generation time, vector retrieval latency, and tool execution duration.
- Export execution traces directly to Langfuse or Arize Phoenix dashboards.
- Semantic Prompt Caching (
src/cache/semantic.py): Implement an embedding-based cache layer. If an incoming question has similarity to a recently answered query, serve the cached answer instantly. - Containerization (
Dockerfile): Build a multi-stage, non-root Docker container image optimized for minimal security surface area and fast startup times.
# Multi-stage Dockerfile
FROM python:3.12-slim AS builder
WORKDIR /app
RUN pip install uv
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-install-project
FROM python:3.12-slim AS runner
WORKDIR /app
COPY --from=builder /app/.venv /app/.venv
COPY src/ ./src
ENV PATH="/app/.venv/bin:$PATH"
USER 10001
EXPOSE 8000
CMD ["uvicorn", "src.api.routes:app", "--host", "0.0.0.0", "--port", "8000"]
5.4 Verification & Success Criteria
- Docker container builds cleanly and runs locally via
docker-compose up. - Langfuse dashboard displays end-to-end execution traces with token counts, latency breakdowns, and step costs for every request.
- Stress testing using
locustorwrkverifies p95 response latency stays below 2.5 seconds under concurrent load.
6. Project 6 (Month 6): Fine-Tuned Open Model Serving & Benchmark Platform
6.1 Overview & Architecture
The final capstone project demonstrates model autonomy and cost optimization. You deploy open-weights foundation models (e.g., LLaMA-3, Qwen-2.5) locally using vLLM/Ollama, fine-tune a lightweight model for specialized incident classification using Parameter-Efficient Fine-Tuning (PEFT / LoRA), and publish a complete portfolio repository comparing hosted APIs versus self-hosted open models.
[Incoming Alert / Document Text]
│
├──> [Path A: Hosted API (GPT-4o-mini)] ──> Cost: $0.15/1M | Latency: 800ms | Accuracy: 94%
│
└──> [Path B: Self-Hosted LoRA Model (vLLM)] ──> Cost: $0.02/1M | Latency: 180ms | Accuracy: 93%
│
▼
[Automated Cost/Latency Benchmark Matrix]
6.2 Tech Stack & Dependencies
- Serving Engines:
vLLM(production GPU serving) orOllama/llama.cpp(local CPU/GPU) - Fine-Tuning Framework: Hugging Face
transformers,peft,trl, PyTorch - Benchmarking & Evaluation:
lm-evaluation-harnessor custom benchmark script
6.3 Implementation Specifications
- Local Model Serving Pipeline (
src/models/serving.py):- Deploy an open-weights model using vLLM with PagedAttention enabled for high-throughput batch inference.
- Expose an OpenAI-compatible API endpoint on port 8000.
- Task-Specific Fine-Tuning (
src/models/train_lora.py):- Collect and format a dataset of 500 incident log summaries labeled with severity levels (
CRITICAL,WARNING,INFO). - Train a Low-Rank Adaptation (LoRA) adapter module on top of a 3B/8B parameter base model using Hugging Face
PEFT. - Save and merge the fine-tuned adapter weights.
- Collect and format a dataset of 500 incident log summaries labeled with severity levels (
- Comprehensive Benchmark Suite (
src/benchmarks/evaluate.py):- Run identical evaluation datasets across Hosted APIs (GPT-4o-mini, Claude 3.5 Haiku) and Self-Hosted Open Models (vLLM LLaMA-3-LoRA).
- Generate comparative analysis metrics across three dimensions: Accuracy Score (%), p95 Latency (ms), and Cost per 1,000 Inferences ($).
- Portfolio Showcase Repository (
README.md): Compile the complete 6-month system documentation into an executive-ready GitHub portfolio repository containing architectural diagrams, live metrics, docker deployment commands, and recorded video demos.
6.4 Verification & Success Criteria
- vLLM server successfully initializes and serves requests via OpenAI-compatible API endpoints.
- Fine-tuned LoRA model achieves equal or superior accuracy on incident severity classification compared to base foundation models while reducing inference cost by over 70%.
- Portfolio GitHub repository is fully documented with badges, benchmark tables, setup guides, and system design decision rationales.
7. Master Summary: Milestone Deliverables & Portfolio Blueprint
| Milestone | Code Deliverable | Primary Repository File | Core Verification Artifact |
|---|---|---|---|
| Month 1 | Asynchronous Runbook CLI | src/copilot.py | Schema-validated JSON output + token cost logs |
| Month 2 | Continuous Evaluation Pipeline | tests/test_evals.py | GitHub Actions workflow + evaluation score trend report |
| Month 3 | Hybrid Vector RAG Search | src/rag/retriever.py | Qdrant vector collection + Hit Rate / MRR benchmarks |
| Month 4 | Agentic Infrastructure Server | src/tools/mcp_server.py | MCP tool-calling execution logs + injection guardrail tests |
| Month 5 | Containerized REST Microservice | Dockerfile & app.py | Langfuse distributed trace dashboard + p95 latency reports |
| Month 6 | Fine-Tuned Model Benchmark | src/models/train_lora.py | Cost/Latency/Accuracy comparison matrix + GitHub Portfolio |