Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

  1. AI Academy
  2. /
  3. Path 2
  4. /
  5. Fine-Tuning and RL for Agents
AdvancedFree coursePath 2 · Evaluation and Optimisation · Part 6 of 6

Fine-Tuning and RL for Agents

Train a small open model for one agent step with supervised fine-tuning, preference optimisation and reinforcement learning, and prove with your eval suite whether it beats an optimised prompt.

3 modules · 8 lessons~38 hoursUpdated 2026-11-01Certificate included

See the curriculum
  • Lessons8
  • Quizzes8
  • Sources54
  • Of study~38h

About this course

About this course

Once prompts and optimisers stop paying, the next lever is the model itself. This course is the practical side of post-training for engineers: deciding whether an agent step should be trained at all, turning traces and eval failures into training data without leaking your test set, QLoRA fine-tuning and preference optimisation of a small open-weight model on a free GPU, and reinforcement learning with verifiable and rubric rewards in a multi-turn tool environment. It ends where it should: catching reward hacking and regressions, and comparing the trained model with the optimised prompt on cost and quality before a ship or no-ship call. Claude Code writes, launches and monitors the training code on your subscription, while training runs on free Kaggle or Colab GPUs.

About the running example

The examples follow Quillmoor, a fictional company that sells project-management software, and the triage step of its support agent. For each incoming ticket the step looks up the account and searches the help centre through stub tools, then returns a category, a priority, the account id, whether a human must take over, a short reason and a reply outline. Most fields can be checked by code, and the free-text ones need a rubric judge. Every ticket is synthetic, and training data comes from open-weight models whose terms allow it, never from Claude's outputs.

Outcomes

What you'll learn.

  1. 1Decide, with a written cost and quality case, whether an agent step should be prompted, prompt-optimised or trained, and name what fine-tuning can't fix
  2. 2Build supervised, preference and RL datasets from agent traces and eval failures without leaking the frozen test split or training on outputs a provider's terms forbid
  3. 3Fine-tune a small open-weight model with QLoRA and with DPO or KTO on a free GPU, launched and monitored from Claude Code, and read its training curves
  4. 4Turn graders and a calibrated judge into verifiable and rubric rewards, train with GRPO-family RL in a multi-turn tool environment, and diagnose stalled groups, length bias and instability
  5. 5Detect reward hacking and capability or safety regressions with held-out graders and trace review
  6. 6Compare the trained model with the optimised-prompt baseline on cost per completed task and paired quality with negative flips, and make a ship or no-ship call
Curriculum

3 modules, 8 lessons.

10h 55m of lessons

  1. Module 1 · 2 lessons · 2h 35m

    Decide and prepare

    Whether training is the right lever, what it costs, and how to turn traces and eval failures into training data without fooling yourself.

    1
    1. 1Prompt, optimise or train?When changing a model's weights beats prompts and optimisers and when it doesn't, what fine-tuning one agent step really costs, where you can still train in late 2026, and whose outputs provider terms let you train on.1h 15m8-question quiz7 sources
    2. 2Training data from tracesTurning agent trajectories, grader verdicts and eval failures into a supervised fine-tuning set, with chat templates and loss masks, rejection sampling and corrected failures, open-weight teachers whose terms allow it, balance by failure mode, and a leakage audit against the frozen test split.1h 20m8-question quiz7 sources
  2. Module 2 · 2 lessons · 2h 45m

    Supervised and preference fine-tuning

    Get a small open model to do the step at all with supervised fine-tuning, then shape its judgement with preference data.

    2
    1. 3SFT with LoRA on a free GPUFine-tune a small open-weight model for one agent step with QLoRA on a free GPU, budget its memory and time before launch, run and monitor it from Claude Code, read the curves, and pick a checkpoint without fooling yourself.1h 25m8-question quiz6 sources
    2. 4Preference optimisationWhen you have comparisons or thumbs rather than gold outputs, train on them with DPO, KTO, ORPO or SimPO, build the pairs from your own model's samples ranked by a calibrated open-weight judge, and catch the model when it learns to please the judge instead of the user.1h 20m7-question quiz6 sources
  3. Module 3 · 4 lessons · 5h 35m

    Reinforcement learning for agents

    Graders become rewards, tool stubs become an environment, and the eval suite decides whether RL helped or just learned to cheat.

    3
    1. 5GRPO in practiceRun reinforcement learning with verifiable rewards on a small open model, from configuring TRL's GRPO trainer and its loss variants to keeping groups informative, reading the training curves and telling sharpening from new capability.1h 25m8-question quiz7 sources
    2. 6Designing rewardsTurn code graders and a calibrated judge into a reward a policy can't cheaply satisfy, with weights priced from what each error costs, rubric and relative-ranking judges, and tests of the reward itself before any GPU time is spent.1h 20m7-question quiz7 sources
    3. 7Multi-turn RL environmentsHow to turn an agent's tools into a reinforcement learning environment: what the trainer runs per rollout, which tokens the policy is trained on, how one final reward is shared across several tool-calling turns, what a run costs, and how to choose a framework or hosted trainer.1h 20m7-question quiz7 sources
    4. 8Reward hacking, regressions and shippingCatch a policy that games its training reward, find out what else training changed, compare the trained model with a frontier-model baseline on paired outcomes and cost per completed case, and serve adapters you can version and roll back.1h 30m8-question quiz7 sources
Capstone

Train a triage model, then decide whether to ship it

Take one agent step from an optimised-prompt baseline to a trained small open model and back to a decision. Measure the baseline and fix the bar, build leak-free training data from an open-weight teacher, fine-tune with QLoRA, train with GRPO in a multi-turn tool environment against a priced reward, hunt the hack you plant, and compare paired, with pass^k, intervals, negative flips and cost per completed case, before writing a ship or no-ship memo.

Open the project brief
Certificate · free

Finish it. Get certified.

Complete every lesson of Fine-Tuning and RL for Agents and you get a certificate with your name on it. Free, like the course.

  • A public page with a certificate ID anyone can check
  • Download it as a PDF
  • Add it to LinkedIn in one click
It also counts towards the Evaluation and Optimisation path certificate, for finishing all 6 courses in Path 2.
Sample
FAQ

Fine-Tuning and RL for Agents, answered.

Is Fine-Tuning and RL for Agents free?

Yes, for everyone: all 8 lessons, 8 quizzes, the capstone brief and the certificate are free, with no card and no trial. The hands-on exercises need the tools listed under Prerequisites.

Do I get a certificate?

Yes. Finish every lesson of Fine-Tuning and RL for Agents and you get a certificate with your name and a certificate ID, on a public page anyone can check. Finishing every course in a learning path earns the path certificate too. You can download each one as a PDF and add it to LinkedIn. They're certificates of completion from the Coders In Hoods AI Academy, not an accredited qualification.

How long does Fine-Tuning and RL for Agents take?

About 38 hours: 3 modules and 8 lessons, at your own pace. Your progress is saved to your account, on every device.

Which roles is it for?

It's on the Machine Learning Engineer roadmap: the courses those jobs ask for, in the order to take them.

What do I need before I start?

Evaluating and Scoring Agents (graders, calibrated judges, paired statistics) and Prompt and Context Optimisation (an optimised, versioned prompt to use as the baseline). LLMs for Engineers, especially Post-training an assistant; recommended: Human Feedback at Scale and Agent Benchmarks and Simulations. Comfortable reading and writing Python. Claude Code on a Claude subscription, a free Kaggle or Colab account, and an OpenRouter key or local Ollama for open-weight teacher and judge models; a few dollars of rented GPU time is optional.

Role roadmaps

Part of this roadmap

  • Become a Machine Learning Engineer

Before you start

Prerequisites

  • Evaluating and Scoring Agents (graders, calibrated judges, paired statistics) and Prompt and Context Optimisation (an optimised, versioned prompt to use as the baseline)
  • LLMs for Engineers, especially Post-training an assistant; recommended: Human Feedback at Scale and Agent Benchmarks and Simulations
  • Comfortable reading and writing Python
  • Claude Code on a Claude subscription, a free Kaggle or Colab account, and an OpenRouter key or local Ollama for open-weight teacher and judge models; a few dollars of rented GPU time is optional
Path 2

More in Evaluation and Optimisation.

See the whole path
  • IntermediateAI agents · Evals

    Evaluating and Scoring Agents

    Turn "it seems better" into numbers you can defend: error analysis, code graders, calibrated LLM judges and honest statistics.

    7 lessons ~20hFree
  • IntermediateResearch methods · Evals

    Think Like a PhD Student

    Ask a question, design the experiment, annotate the data, doubt the result, write it up and get it reviewed: the research discipline for AI agent work.

    10 lessons ~26hFree
  • AdvancedAI agents · Evals

    Agent Benchmarks and Simulations

    Evaluate multi-turn, stateful agents with simulated users and real environments, and build benchmarks whose numbers survive an audit.

    9 lessons ~32hFree
  • AdvancedPrompt engineering · DSPy and GEPA

    Prompt and Context Optimisation

    Treat prompts, examples, tool descriptions and skills as versioned, measured artefacts, and improve them by hand, by optimiser and in production without breaking what already works.

    7 lessons ~17hFree
  • AdvancedEvals · Human feedback

    Human Feedback at Scale

    Collect, measure and trust the judgements of reviewers and users: study design, rater agreement, preference rankings, real-use signals and quality estimates from a few labels.

    7 lessons ~28hFree
Next path · Path 3 Documents, Retrieval and MemoryTurn your documents into knowledge agents can find, cite and remember: ingestion, retrieval and memory.