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

Course overview

Fine-Tuning and RL for Agents

Free · sign in to start and track progress

1 · Decide and prepare

  • 1Prompt, optimise or train?

    Exercise answers

    • Answer: Measure the baseline to beat
    • Answer: Cost the experiment and the deployment
  • 2Training data from traces

2 · Supervised and preference fine-tuning

  • 3SFT with LoRA on a free GPU
  • 4Preference optimisation

3 · Reinforcement learning for agents

  • 5GRPO in practice
  • 6Designing rewards
  • 7Multi-turn RL environments
  • 8Reward hacking, regressions and shipping
CapstoneTrain a triage model, then decide whether to ship itReference implementation

Module 1 · Decide and prepare · Lesson 1

Prompt, 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.

75 min 2 videos 3 exercises 8-question quiz Answers
Setup for the exercises:Install Claude CodePython with uv

By the end of this lesson you can

  • Place prompting, prompt optimisation, routing, supervised fine-tuning, preference optimisation and reinforcement learning on one ladder, and cite the evidence for climbing each rung
  • Separate failures that fine-tuning fixes (format, tool discipline, narrow decisions, cost per call) from ones it can't (missing knowledge, a broken eval)
  • Build a cost model that keeps the cost of an experiment apart from the cost of owning a fine-tuned model, and compute its break-even volume
  • Choose where to train in late 2026, and decide which models' outputs you may use as training data under provider terms and licences

On this page

  • The optimisation ladder
  • What the evidence says about each rung
  • What fine-tuning fixes, and what it can't
  • The full cost of training a step
  • A worked example
  • The retrain is not optional
  • Reasons that aren't cost
  • Where you can train in late 2026
  • Whose outputs you may train on
  • Measuring the baseline honestly
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01The optimisation ladder
  2. 02What the evidence says about each rung
  3. 03What fine-tuning fixes, and what it can't
  4. 04The full cost of training a step
  5. 05Where you can train in late 2026
  6. 06Whose outputs you may train on
  7. 07Measuring the baseline honestly
  8. 08Misconceptions and limits
  9. 09Connections
  10. 10Summary

Sources & further reading

  • GEPA: Reflective Prompt Evolution Can Outperform Reinforcement LearningPaper · Agrawal, Tan, Soylu, Ziems, Khare et al. · 2025The strongest evidence for trying prompt optimisation before RL. The abstract (v2, February 2026) reports GEPA beating GRPO by 6% on average and up to 20% across six tasks, with up to 35 times fewer rollouts. Read sections 1 and 5 for the comparison and its budget.
  • Fine-Tuning and Prompt Optimization: Two Great Steps that Work Better TogetherPaper · Soylu, Potts, Khattab · Stanford · 2024EMNLP 2024. Alternating prompt optimisation and fine-tuning beat weights alone by up to 60% and prompts alone by up to 6% on 7–8B models. The evidence that the rungs combine rather than compete.
  • Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?Paper · Gekhman, Yona, Aharoni, Eyal, Feder et al. · Google · 2024EMNLP 2024. Fine-tuning examples with new facts are learned slowly and make the model hallucinate more. The reason this course fine-tunes behaviour and keeps knowledge in tools.
  • Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context LearningPaper · Liu, Tam, Muqeeth, Mohta, Huang et al. · 2022NeurIPS 2022. The classic case for fine-tuning small models: moving the task from a long prompt into a few adapter parameters improved accuracy and cut the cost of every call. Read the introduction for the cost argument.
  • Deprecations: Update to OpenAI's self-serve fine-tuningDocs · OpenAIThe dates on which OpenAI closes fine-tuning job creation (7 May 2026, 2 July 2026, 6 January 2027), and the rule that fine-tuned models shut down with their base models.
  • Consumer Terms of ServiceDocs · AnthropicSection 3, item 2, the use restriction that keeps Claude's outputs out of any model you train. The Commercial Terms have the equivalent in section D.4.
  • Claude glossaryDocs · AnthropicThe Fine-tuning entry states that the Claude API does not currently offer fine-tuning.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 10 more sections
  • 3 hands-on exercises
  • A 8-question quiz
  • Progress, quiz scores and bookmarks