AI 工程师笔记本 – 基于 Colab 的免费、无框架 RAG/智能体/评估教程
AI Engineer Notebooks – free, framework-free RAG/agents/evals on Colab

原始链接: https://github.com/calmrocks/ai-engineer-notebooks

本课程是一门动手实践、不依赖特定框架的课程,旨在教授后端和全栈工程师如何构建生产级 AI 系统。通过优先使用原生 API 调用而非 LangChain 等抽象层,您将深入且持久地理解 LLM 技术栈,包括检索增强生成(RAG)、智能体循环、评估以及微调。 核心特点包括: * **工程导向**:专为前线部署工程师和 AI 工程师设计,课程强调“先评估、后优化”的理念。 * **实用技术栈**:全程基于免费的 Groq API(兼容 OpenAI 格式),确保在不同服务商之间具备良好的可移植性。 * **生产级技能**:涵盖全生命周期,包括可观测性、LLMOps、可靠性、实验追踪及推理性能优化。 * **真实应用场景**:超越简单的演示示例,课程包含端到端的案例研究以及旨在构建专业作品集的毕业设计项目。 * **易于上手**:每个主题都拆分为独立的、可运行的 Colab 笔记本,内置练习并提供共享的设置工具。 无论您是正转型进入 AI 领域,还是希望掌握核心基础,本课程都将为您提供构建可靠、生产就绪型 AI 系统所需的严谨技术能力。

Hacker News 上的讨论帖探讨了“AI 工程师笔记本”(AI Engineer Notebooks),这是一项在 Google Colab 上提供 RAG(检索增强生成)、智能体及评估相关教程的资源,且不依赖任何框架。 讨论的核心在于“无框架”方法的实用性。部分用户认为,框架对于管理 AI 的复杂性至关重要;而另一部分人则认为框架过于复杂,并指出当前大部分 AI 开发本质上只是与 API 进行交互。怀疑论者认为,该项目强调“无框架”(FDE)等术语,其目的更多是为了吸引非技术管理层的关注,而非提供深度的技术创新。 评论者还就 AI 生成文本展开了元讨论,指出这些笔记本的写作风格——以频繁使用破折号为特征——强烈暗示其由 Claude 等大语言模型撰写。 最终,创建者“calmrocks”澄清,该项目的目标并非提供详尽的技术深度,而是为初学者提供一个门槛低、易于上手的入门起点。
相关文章

原文

License: MIT Open In Colab GitHub stars

Learn the applied-LLM stack the way you'll actually be interviewed on it — framework-free, on a free API, from prompting all the way to serving, fine-tuning, and a red-team benchmark.

Runnable Colab notebooks for the AI Engineer / Forward Deployed Engineer (FDE) skill set: building working systems on top of foundation models — model APIs, RAG, evals, agents, adaptation, serving — using raw APIs, not frameworks.

What makes this different

  • Framework-free, on purpose. You write the agent loop, RAG, and evals from raw API calls first — so you understand what LangChain/LlamaIndex actually do before you reach for them (and can judge when not to). Patterns are durable; wrappers churn.
  • Evals are the spine. "Measure before you tune" is installed early and returns in every section — the habit that separates an engineer who shipped a system from one who built a demo.
  • Free to run, end to end. Everything runs on the free Groq API (no credit card). The two topics Groq can't host — LoRA fine-tuning (06) and self-hosted serving (09) — are concept-first with optional, fenced Colab-GPU appendices, verified on a real Colab T4.
  • Real case studies, not toy demos. Three end-to-end case studies show the skills combined under real constraints — a support assistant debugged in production, a pipeline-vs-agent cost showdown, and a red-team robustness benchmark.
  • OpenAI-compatible throughout, so every pattern transfers directly to OpenAI and (with small changes) Anthropic — the seam is swappable, the skills aren't.

Built as the hands-on companion to Plan: Transitioning to Forward Deployed Engineer / AI Engineer. The plan explains what to learn and why; these notebooks are where you run it.

Backend or full-stack engineers moving into AI Engineer, FDE, Applied AI, or Solutions Engineer (AI) roles — different titles, largely the same job. You can ship production code; you want the applied-model layer on top.

Work top to bottom. Each notebook is self-contained (installs its own dependencies, reads API keys from Colab secrets) and ends with exercises.

02 — Evals I: measuring outputs

04 — Evals II: the differentiator

06 — Adapting the model

Notebook What you'll learn
Observability & LLMOps
Open In Colab
Tracing every call, safe prompt logging, cost/latency/error metrics, drift detection, and the observe→eval feedback loop
Reliability & fallbacks
Open In Colab
Retries with backoff, timeouts, fallback models, output validation, circuit breakers, graceful degradation
Experiment tracking & registry
Open In Colab
MLflow end to end: log runs/params/metrics from the section-04 eval harness, register and version a model, and promote by stage — the tooling that turns "I ran an eval" into a tracked, reproducible workflow

09 — Serving & inference performance

Where the free Groq API can't run the topic (these frameworks need a GPU), the notebook teaches it concept-first and fences an optional Colab-GPU appendix — the same pattern as the section-06 LoRA appendix.

10 — ML system design & performance

11 — Customer craft (the FDE differentiator)

12 — Case Studies & Capstone

Where the skills come together into projects. First a case study — one realistic scenario worked end to end, runnable — then the capstone, the deployed repo you build yourself. (Section overview.)

Capstone: the brief for the deployed project that goes on your resume — a real repo with a serving component and an eval report. Case studies are for learning; the capstone is for hiring.

  • Raw model APIs, no frameworks. Patterns are durable; wrappers churn.
  • One shared corpus (data/) across RAG and eval sections, so evals measure the retrieval you actually built.
  • Self-contained notebooks. First cell installs, second cell calls from aien import setup; client, MODEL = setup() to load your key from Colab secrets (or a local env var). No hidden state between notebooks. aien is the tiny shared-setup package in this repo — one place to change credential loading — installed automatically by the first cell.
  • Every notebook ends with exercises — do them before moving on.
  1. Get a free API key at console.groq.com — no credit card required.
  2. In Colab: the key icon in the left sidebar → add GROQ_API_KEY as a secret, and toggle notebook access on.
  3. Open any notebook via its badge and run top to bottom.

Running locally instead: pip install -r requirements.txt && pip install -e . (the second installs the aien setup helper), export GROQ_API_KEY=..., open with Jupyter.

联系我们 contact @ memedata.com