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

Think Like a PhD Student

Free · sign in to start and track progress

1 · Asking the question

  • 1The cycle and the question
  • 2Reading and searching the literature
  • 3Measuring what matters

2 · Designing and running the study

  • 4Designing the experiment

    Exercise answers

    • Answer: Build the experiment harness
    • Answer: Does an open model vary the same way?
  • 5Pre-registration and trials
  • 6Open coding of failures
  • 7Running an annotation study

3 · Trusting and telling

  • 8Reproducibility and research hygiene
  • 9Analysis and honest reporting
  • 10Writing it up and peer review
CapstoneA small study on the triage agentReference implementation

Module 2 · Designing and running the study · Lesson 4

Designing the experiment

Turn the retrieval question into a design table with factors, levels and what is held fixed, choose baselines and a control that rule out the rival explanations, name the confounds LLM experiments add, and pick a trial count from a variance estimate rather than a habit.

85 min 2 videos 3 exercises 6-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvThe Quillmoor triage kitGet an OpenRouter keyLocal models with Ollama

By the end of this lesson you can

  • Write a design table (factors, levels, held fixed, randomised, measured) for the retrieval experiment
  • Choose baselines and controls, including a random-retrieval control, and say which rival explanation each one rules out
  • Name the confounds specific to LLM experiments (prompt format, model drift, context length, a stale index) and show how the design controls each
  • Estimate run-to-run variance from repeated trials and choose a trial count with the power rule from Machine Learning Foundations for LLM Work
  • Build a harness that records the model id, prompt hashes, condition, trial index, raw output and schema validity for every call, with a manifest

On this page

  • The design table
  • Baselines and controls: what each one rules out
  • Confounds that LLM experiments add
  • Variance, and how many trials
  • Worked example: the harness
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01The design table
  2. 02Baselines and controls: what each one rules out
  3. 03Confounds that LLM experiments add
  4. 04Variance, and how many trials
  5. 05Worked example: the harness
  6. 06Connections
  7. 07Summary

Sources & further reading

  • Accounting for Variance in Machine Learning BenchmarksPaper · Bouthillier et al. · 2021The paper on where variance in a benchmark result comes from (data sampling, seeds, hyper-parameters) and why comparing single runs misleads. Section 2 measures the sources, section 4 shows why single-run comparisons mislead, and section 5 gives the recommendation to vary everything you can.
  • Quantifying Language Models' Sensitivity to Spurious Features in Prompt DesignPaper · Sclar, Choi, Tsvetkov, Suhr · 2024Shows that formatting choices nobody would call part of the method (separators, casing, spacing) swing scores by many points. The reason prompt format is a factor to hold fixed or vary on purpose, never to change by accident.
  • State of What Art? A Call for Multi-Prompt LLM EvaluationPaper · Mizrahi et al. · 2024Model rankings change with the prompt paraphrase; the authors argue for evaluating over several prompts and reporting the spread. Read section 3 for the evidence.
  • Non-Determinism of "Deterministic" LLM SettingsPaper · Atil et al. · 2024Measures how much outputs vary across repeated runs at settings meant to be deterministic, across several models. The evidence that one trial is one sample.
  • Show Your Work: Improved Reporting of Experimental ResultsPaper · Dodge, Gururangan, Card, Schwartz, Smith · 2019Argues that a result means little without the budget that produced it (how many runs, how many configurations tried). The reason the manifest records trials and every prompt version.
  • How to avoid machine learning pitfalls: a guide for academic researchersPaper · Lones · 2021A checklist of design mistakes. Section 3 (building models) and section 4 (evaluating them) cover baselines, test-set leakage and multiple comparisons in plain language.
  • Data Analysis for Social Scientists: Lecture 22, Experimental DesignUniversity · MIT OpenCourseWare · 2023Lecture 22, Experimental Design, in the lecture videos of the course taught by Esther Duflo and Sara Ellison: the economist's version of this lesson, on designing a randomised experiment. Seventy minutes with no chapters, so it is a lecture to watch after this lesson rather than an embed.
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.

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