# AI use cases for AI Engineering From Scratch (rohitg00/ai-engineering-from-scratch)

Repo: [rohitg00/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch) | Use cases: 4 | Page: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/

A free, open source course of 542 AI engineering lessons with runnable code in Python, TypeScript, Rust, and Julia, plus three graded projects.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Learn AI engineering lesson by lesson in your agent: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/learn-ai-engineering-with-a-coding-agent/
- Catch a retrieval ranking regression before release: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/catch-retrieval-ranking-regressions/
- Separate child work from parent time in an agent trace: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/debug-agent-trace-timing-and-tokens/
- Block replayed or altered agent write approvals: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/gate-agent-tool-calls-with-approval-receipts/

## How to learn AI engineering lesson by lesson in your agent with AI Engineering From Scratch

Repo: [rohitg00/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install the skills so a coding agent quizzes you, teaches one lesson at a time, and tracks progress.

**Who it is for:** A developer new to AI engineering who already uses Claude Code or Codex and wants a guided study plan without leaving the editor.

**The problem:** Lessons are spread across 20 phases and it is hard to know where to start or what to review next.

**The outcome:** A personalized plan saved to LEARNING.md and a session that teaches one lesson with its quiz.

### Steps

1. Run `node --version` and confirm Node.js is installed.
2. Run `npx --version` and `python3 --version` to confirm npx and Python are installed.
3. Run `npx skills add rohitg00/ai-engineering-from-scratch`, then choose your host and scope when the installer asks.
4. In Codex, use `start-learning`. In Claude Code, run `/start-learning`.
5. Finish the ten-question placement quiz, then use `learn` or `/learn` to start the first lesson.

### Prompt to paste into your agent

```text
Using the repo rohitg00/ai-engineering-from-scratch, install the skills with npx skills add and run the start-learning skill for <target host>. Expected output: a LEARNING.md file with a phase-by-phase plan. Verify that LEARNING.md exists and names a starting phase.
```

### Caveat

Runnable focused-path labs need python3, and Agent Skills host labs need a selected host and a writable skill scope.

Risk, remote script: The install command runs a package fetched through npx, so review the host and scope the installer writes to before you accept.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/learn-ai-engineering-with-a-coding-agent/

## How to catch a retrieval ranking regression before release with AI Engineering From Scratch

Repo: [rohitg00/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Compare two retrieval systems query by query and fail a release check when one query gets worse.

**Who it is for:** An ML engineer tuning a RAG search step who needs proof that a metric gain did not hurt any single query.

**The problem:** Mean NDCG can rise while one query ranks its most relevant evidence lower, and the average hides it.

**The outcome:** A reproducible comparison with per-query deltas and the judgments used to score them, plus a check that can fail a release.

### Steps

1. Run `python3 --version` and confirm it reports 3.10 or newer. (inferred, check the README)
2. Run `python3 scripts/project_test.py retrieval-evaluation-lab --init learning-artifacts/retrieval-evaluation-lab` from the repository root. (inferred, check the README)
3. Implement ranking validation, precision and recall, and rank-sensitive metrics in the starter.
4. Run `python3 scripts/project_test.py retrieval-evaluation-lab --all --path learning-artifacts/retrieval-evaluation-lab --strict` until every stage passes. (inferred, check the README)
5. Keep the per-query comparison and judgments, and compare your output against projects/retrieval-evaluation-lab/solution/.

### Prompt to paste into your agent

```text
In the repo rohitg00/ai-engineering-from-scratch, run the retrieval-evaluation-lab project with --init into learning-artifacts/retrieval-evaluation-lab, then implement stages until the --all --strict grader passes. Expected output: a per-query delta report that lists the query whose most relevant evidence ranks lower. Verify that the grader reports all stages as passing.
```

### Caveat

The metrics describe the relevance judgments you supply; they do not establish whether an answer is correct.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/catch-retrieval-ranking-regressions/

## How to separate child work from parent time in an agent trace with AI Engineering From Scratch

Repo: [rohitg00/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Parse a JSONL agent trace, fix overlapping span timing, and output an HTML timeline and regression report.

**Who it is for:** A developer debugging a multi-step agent whose latency and token totals changed after an update.

**The problem:** Overlapping child spans make parent execution time and token usage look larger than the work actually done.

**The outcome:** An input trace, an HTML timeline, and a JSON regression report that keep per-span token counts exclusive.

### Steps

1. Run `node --version` and confirm it reports 22.18 or newer. (inferred, check the README)
2. Run `python3 scripts/project_test.py agent-trace-debugger --init learning-artifacts/agent-trace-debugger` from the repository root. (inferred, check the README)
3. Implement JSONL parsing, parent validation, and interval arithmetic in the starter.
4. Run `python3 scripts/project_test.py agent-trace-debugger --all --path learning-artifacts/agent-trace-debugger --strict` until every stage passes. (inferred, check the README)
5. Keep the input trace, the HTML timeline, and the JSON regression report from the output folder.

### Prompt to paste into your agent

```text
In the repo rohitg00/ai-engineering-from-scratch, run the agent-trace-debugger project with --init into learning-artifacts/agent-trace-debugger, then implement the stages until the --all --strict grader passes. Expected output: an HTML timeline and a JSON regression report for the supplied trace. Verify that per-span token counts are not double counted between parent and child spans.
```

### Caveat

The project uses Node.js for the debugger and Python 3 for the grader, so both runtimes must be installed.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/debug-agent-trace-timing-and-tokens/

## How to block replayed or altered agent write approvals with AI Engineering From Scratch

Repo: [rohitg00/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Check role and path on agent tool calls, consume each approval once, and write an audit receipt.

**Who it is for:** A developer building an agent that proposes writes and needs an approval step with a clear audit trail.

**The problem:** A write can change after review, or an approval can be replayed to run a different operation.

**The outcome:** An audit receipt that shows the requested operation and the policy decision, with approvals bound to the exact request.

### Steps

1. Confirm a Rust toolchain is installed, since the README names Rust but does not give a version. (inferred, check the README)
2. Run `python3 scripts/project_test.py tool-call-firewall --init learning-artifacts/tool-call-firewall` from the repository root. (inferred, check the README)
3. Validate the call envelope and check the caller's role and path in the starter.
4. Consume an approval bound to the exact request and content, then run `python3 scripts/project_test.py tool-call-firewall --all --path learning-artifacts/tool-call-firewall --strict`. (inferred, check the README)
5. Keep the audit receipt and confirm the replay test fails.

### Prompt to paste into your agent

```text
In the repo rohitg00/ai-engineering-from-scratch, run the tool-call-firewall project with --init into learning-artifacts/tool-call-firewall, then implement the stages until the --all --strict grader passes. Expected output: an audit receipt for each tool call with the policy decision. Verify that a replayed approval and an altered write are both rejected.
```

### Caveat

The caller application supplies identity, and the project does not provide persistent authorization or an operating-system sandbox.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/rohitg00-ai-engineering-from-scratch/gate-agent-tool-calls-with-approval-receipts/
