메뉴
HN
Hacker News • 29일 전

AI 엔지니어 노트북 – Colab에서 무료로 배우는 프레임워크 없는 RAG/에이전트/평가 가이드

IMP
7/10
핵심 요약

실전 LLM 스택을 프레임워크 없이 원시 API 호출만으로 처음부터 구현해보는 무료 Colab 노트북 모음입니다. 프롬프팅부터 RAG, 평가(evals), 에이전트, 파인튜닝, 서빙까지 다루며, Groq 무료 API로 신용카드 없이 전 과정을 실행할 수 있습니다. 프레임워크가 내부에서 하는 일을 직접 이해하고 '튜닝 전에 측정하라'는 평가 습관을 기르는 것이 핵심 차별점입니다.

번역된 본문

AI 엔지니어 노트북 — 실제 면접에서 물어보는 방식으로 응용 LLM 스택을 배우세요. 프레임워크 없이, 무료 API로, 프롬프팅부터 서빙, 파인튜닝, 레드팀 벤치마크까지 다룹니다.

AI 엔지니어 / 포워드 디플로이드 엔지니어(FDE) 스킬셋을 위한 실행 가능한 Colab 노트북: 기반 모델 위에 작동하는 시스템을 구축하는 것 — 모델 API, RAG, 평가(evals), 에이전트, 적응(adaptation), 서빙 — 을 프레임워크가 아닌 원시 API로 배웁니다.

이 자료가 다른 이유

의도적으로 프레임워크를 사용하지 않습니다. 에이전트 루프, RAG, 평가를 먼저 원시 API 호출로 직접 작성합니다. 그래야 LangChain/LlamaIndex가 실제로 무엇을 하는지 이해하고 (언제 쓰지 말아야 하는지도 판단할 수 있습니다). 패턴은 오래가지만 래퍼(wrapper)는 계속 바뀝니다.

평가(evals)가 근간입니다. '튜닝 전에 측정하라'는 원칙을 초반에 심어주고 모든 섹션에서 반복됩니다. 이것이 데모를 만든 사람과 실제 시스템을 배포한 엔지니어를 가르는 습관입니다.

처음부터 끝까지 무료로 실행됩니다. 모든 것이 무료 Groq API로 실행됩니다 (신용카드 불필요). Groq가 호스팅할 수 없는 두 주제 — LoRA 파인튜닝(06)과 자체 호스팅 서빙(09) — 은 개념 중심으로 다루고, 선택적으로 구획된 Colab-GPU 부록이 있으며 실제 Colab T4에서 검증되었습니다.

장난감 데모가 아닌 실제 사례 연구. 세 가지 엔드투엔드 사례 연구가 실제 제약 조건 하에서 스킬을 결합해 보여줍니다 — 프로덕션에서 디버깅된 고객 지원 어시스턴트, 파이프라인 vs 에이전트 비용 대결, 레드팀 견고성 벤치마크.

전체적으로 OpenAI 호환. 모든 패턴이 OpenAI로 바로 이전되고 (작은 수정으로) Anthropic에도 적용됩니다 — 접점은 교체 가능하지만 스킬은 그렇지 않습니다.

'플랜: 포워드 디플로이드 엔지니어 / AI 엔지니어로 전환하기'의 실습용 동반 자료로 제작되었습니다. 플랜은 무엇을 왜 배워야 하는지 설명하고, 이 노트북은 그것을 직접 실행하는 곳입니다.

대상 독자

AI 엔지니어, FDE, 응용 AI, 솔루션 엔지니어(AI) 역할로 이동하려는 백엔드 또는 풀스택 엔지니어 — 직함은 다르지만 본질적으로 같은 일입니다. 프로덕션 코드를 배포할 수 있고, 그 위에 응용 모델 계층을 원하는 분들입니다.

학습 순서

위에서 아래로 학습하세요. 각 노트북은 자체 포함형입니다 (자체 의존성 설치, Colab 시크릿에서 API 키 읽기)이며 마지막에 연습 문제가 있습니다.

00 — 설정 노트북 학습 내용: 환경 및 비용 관리 — Colab 시크릿을 통한 API 키, 지출 가드, 모델 선택

01 — 모델 API 노트북 학습 내용: 프롬프팅 기본 — 명확한 지시, few-shot, 출력 형식 명세, 단계별 추론 (가장 저렴한 레버, 각각이 수치를 움직이는 것을 보여줌). 구조화된 출력 — 모델에서 신뢰할 수 있는 JSON을 얻는 방법과 어디서 깨지는지. 도구 호출(function/tool calling) — 오류 경로를 포함한 엔드투엔드 도구 호출. 스트리밍 — 스트리밍 응답과 UI가 필요로 하는 것. 컨텍스트와 캐싱 — 컨텍스트 윈도우 예산 관리, 프롬프트 캐싱, 배치 vs 실시간 가격

02 — 평가 I: 출력 측정 노트북 학습 내용: 출력 측정 — 01섹션 과제에 대한 골든셋과 메트릭. 튜닝이 필요한 것을 만들기 전에 '튜닝 전에 측정하라'는 습관을 들입니다. 평가가 근간이며, 이후 모든 섹션에서 다시 등장합니다

03 — RAG 노트북 학습 내용: RAG란? — 검색 → 증강 → 생성 루프, RAG가 일반 LLM보다 나은 이유, RAG가 임베딩과 같지 않은 이유 — 15줄짜리 작동 데모로 설명. 임베딩과 검색 — 임베딩 선택, 벡터 검색, 유사도의 함정 — 검색부터 먼저 작동시키기. 하이브리드와 리랭킹 — 키워드 + 벡터 하이브리드 검색, 리랭커, 각각이 비용을 지불할 만한 때. 청킹 — 실제 지저분한 코퍼스에 대한 청킹 전략 — 검색 관점에서 판단할 수 있을 때 마지막에 재검토. RAG가 실패하는 이유 — 나쁜 답변 진단: 보통 생성이 아니라 검색 품질이 병목입니다

04 — 평가 II: 차별화 요소 노트북 학습 내용: 골든셋 — 03섹션의 RAG 시스템을 위한 골든셋 구축. LLM as judge — 심사 프롬프트, 인간과의 일치도, 심사자 자체의 실패 모드. 회귀 평가 — 평가를 CI처럼 사용: 프롬프트나 모델을 바꿀 때 품질 회귀 잡기

05 — 에이전트 노트북 학습 내용: 처음부터 작성하는 에이전트 루프 — 프레임워크 없이 원시 API 호출로 작동하는 에이전트 루프

원문 보기
원문 보기 (영어)
AI Engineer Notebooks 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. Who this is for 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. Learning order Work top to bottom. Each notebook is self-contained (installs its own dependencies, reads API keys from Colab secrets) and ends with exercises. 00 — Setup Notebook What you'll learn Environment & cost hygiene API keys via Colab secrets, spend guards, model picking 01 — Model APIs Notebook What you'll learn Prompting fundamentals Clear instructions, few-shot, output-format specs, step-by-step reasoning — the cheapest lever, each shown moving a number Structured output Getting reliable JSON out of a model, and where it breaks Tool calling Function/tool calling end to end, error paths included Streaming Streaming responses and what UIs need from them Context & caching Context-window budgeting, prompt caching, batch vs real-time pricing 02 — Evals I: measuring outputs Notebook What you'll learn Measuring outputs Golden sets and metrics on the section-01 task — install the "measure before you tune" habit before building anything you'd need to tune. Evals is the spine; it returns in every section after this 03 — RAG Notebook What you'll learn What is RAG? The retrieve → augment → generate loop, why RAG beats a plain LLM, and why RAG isn't the same as embeddings — with a 15-line working demo Embeddings & retrieval Embedding choice, vector search, similarity pitfalls — get retrieval working first Hybrid & reranking Keyword + vector hybrid retrieval, rerankers, when each earns its cost Chunking Chunking strategies on a real messy corpus — revisited last, once you can judge them against retrieval Why RAG fails Diagnosing bad answers: retrieval quality, not generation, is usually the bottleneck 04 — Evals II: the differentiator Notebook What you'll learn Golden sets Building a golden set for the RAG system from section 03 LLM as judge Judge prompts, agreement with humans, and the judge's own failure modes Regression evals Evals as CI: catching quality regressions when you change a prompt or model 05 — Agents Notebook What you'll learn Agent loop from scratch A working agent loop in raw API calls — no framework Tool design Designing tools the model can actually use well Guardrails & budgets Stopping conditions, cost/latency budgets, when a pipeline beats an agent MCP & the tool ecosystem Concept: what the Model Context Protocol standardizes, how it maps to the raw tool loop, and when to reach for it Skills & progressive disclosure Concept: packaging reusable know-how an agent loads on demand — the SKILL.md pattern, the context-budget payoff, and Tools/MCP/Skills as one story Harness engineering Synthesis: the scaffold around the call — context assembly & compaction, tool-result shaping, and verification loops. Names the discipline the section has been teaching piece by piece 06 — Adapting the model Notebook What you'll learn Fine-tune vs RAG vs prompt When to change the model's weights vs its inputs; what LoRA/QLoRA are and cost; the argument you'll have in the room — plus an optional real LoRA fine-tune on a free GPU 07 — Security Notebook What you'll learn Prompt injection & the trust boundary Direct & indirect prompt injection, output handling, PII, excessive agency — the OWASP LLM Top 10 risks, failing live then defended 08 — Operations Notebook What you'll learn Observability & LLMOps Tracing every call, safe prompt logging, cost/latency/error metrics, drift detection, and the observe→eval feedback loop Reliability & fallbacks Retries with backoff, timeouts, fallback models, output validation, circuit breakers, graceful degradation Experiment tracking & registry 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. Notebook What you'll learn Serving frameworks The serving stack an AI engineer actually picks between — vLLM, TGI, Triton, TensorRT-LLM — what each optimizes, how they map onto the raw API you've been calling, and when to reach for which Inference performance The levers behind throughput and latency: continuous batching, the KV cache, quantization, and the throughput-vs-latency trade — with the napkin math to size a deployment 10 — ML system design & performance Notebook What you'll learn Designing an inference service Concept: the ML system design interview, worked end to end — QPS/VRAM/latency/cost estimation, replica scaling, queueing, caching, and the SLA trade-offs, on a realistic LLM-serving prompt 11 — Customer craft (the FDE differentiator) Notebook What you'll learn Scoping & discovery Turn a vague customer ask into a scoped, evaluable system: discovery questions, a one-page scoping doc, the demo discipline — the customer-scenario interview round most engineers can't evidence 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 .) Notebook What you'll learn Case study A — Customer-support assistant One scenario scoped → built → served → debugged in production : a vague ask becomes a deployed, evaluated RAG+agent assistant, then a live quality regression (a stale index after a corpus migration) that you diagnose and fix. A build-to-debug arc threading sections 02–11 Case study B — Contract extraction: pipeline vs agent The judgment call interviewers love: build the same extraction task as both an agent and a pipeline, then prove with accuracy + token cost that the pipeline wins when the steps are known Case study C — Red-team robustness benchmark A different kind of system — a harness that evaluates a model instead of serving one: an attacker→target→judge (PAIR) loop that measures attack success rate, composing the agent loop, LLM-judge, security, and