<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deterministic &amp; Reference Metrics on DATATWEETS</title><link>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/</link><description>Recent content in Deterministic &amp; Reference Metrics on DATATWEETS</description><generator>Hugo</generator><language>en</language><copyright>Copyright (c) 2026 Datatweets</copyright><lastBuildDate>Tue, 07 Jul 2026 09:00:00 +0200</lastBuildDate><atom:link href="https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/index.xml" rel="self" type="application/rss+xml"/><item><title>Lesson 1 - Exact Match &amp; Normalization</title><link>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-1-exact-match-and-normalization/</link><pubDate>Tue, 07 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-1-exact-match-and-normalization/</guid><description>Exact match is the cheapest, most reproducible metric there is &amp;ndash; output equals reference, scored by code in microseconds &amp;ndash; but raw string equality is brutally strict: &amp;lsquo;HTTP 429.&amp;rsquo; and &amp;lsquo;429&amp;rsquo; are the same fact and it calls them different. This lesson implements the classic SQuAD normalize_answer (lowercase, strip punctuation, drop articles, collapse whitespace) and exact_match, scores a realistic table of Docent predictions against the canonical golden references, and watches the aggregate jump from a raw 2/8 = 0.250 to a normalized 7/8 = 0.875. It also shows exact match&amp;rsquo;s hard limit &amp;ndash; no partial credit &amp;ndash; which motivates token-level F1 next.</description></item><item><title>Lesson 2 - Token-Level F1 &amp; Overlap Metrics</title><link>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-2-token-level-f1/</link><pubDate>Tue, 07 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-2-token-level-f1/</guid><description>Exact match is all-or-nothing, so a mostly-right Docent answer scores the same zero as a completely wrong one. Token-level F1 fixes that by treating prediction and reference as bags of normalized tokens and computing precision, recall, and their harmonic mean. This lesson derives the SQuAD F1 formula, builds a real deterministic f1_score function, and scores four Docent answers &amp;ndash; an exact hit, a verbose-but-correct reply, a terse partial answer, and a wrong one &amp;ndash; to show mean F1 (0.51) rewarding partial credit where mean EM (0.25) cannot. It also exposes F1&amp;rsquo;s blind spots: bag-of-words ignores word order and meaning, which motivates the semantic and judge metrics later in the course.</description></item><item><title>Lesson 3 - ROUGE, BLEU &amp; N-gram Metrics</title><link>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-3-rouge-bleu-and-ngram-metrics/</link><pubDate>Tue, 07 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-3-rouge-bleu-and-ngram-metrics/</guid><description>ROUGE and BLEU score generated text by counting overlapping n-grams against a reference, and they are the backbone of summarization and translation evaluation. This lesson builds the n-gram intuition by hand, then computes real ROUGE-1/2/L and BLEU on three Docent answers to the same Meridian question &amp;ndash; a correct answer, a correct paraphrase, and a fluent-but-wrong answer. The wrong answer scores highest on both metrics because it reuses the reference&amp;rsquo;s words while flipping the meaning, which is the concrete lesson: surface overlap is not correctness, and these metrics fit longer summaries far better than short factoid QA.</description></item><item><title>Lesson 4 - Structured-Output &amp; Schema Checks</title><link>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-4-structured-output-and-schema-checks/</link><pubDate>Tue, 07 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-4-structured-output-and-schema-checks/</guid><description>When an LLM feature must emit machine-readable output, correctness starts with &amp;lsquo;parses and validates.&amp;rsquo; This lesson makes Docent answer as JSON with an answer, a doc_id constrained to Meridian&amp;rsquo;s 8 pages, and a confidence in [0,1], then grades it with a five-rung check ladder: does it parse, are the required fields present, are the types right, are enums and ranges valid, do cross-field constraints hold. You&amp;rsquo;ll build a pydantic validator with a robust extract_json() that strips markdown fences, run it live on four questions for a real pass rate, and run a reproducible deterministic block over good and broken JSON strings.</description></item><item><title>Lesson 5 - Guided Project: A Reference-Metric Scorecard</title><link>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-5-guided-project-reference-metric-scorecard/</link><pubDate>Tue, 07 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/llm-evaluation/deterministic-and-reference-metrics/lesson-5-guided-project-reference-metric-scorecard/</guid><description>The capstone for Module 3. You assemble the module&amp;rsquo;s three deterministic metrics — normalized exact match, token-level F1, and ROUGE-L via the rouge-score library — behind SQuAD-style normalization, run Docent live over an eight-question golden set, then score every answer on every metric to build a per-item table and aggregate scorecard. Finally you read it: why EM, F1, and ROUGE-L disagree, which to trust for short factual answers, and where all three fall short — motivating LLM-as-judge in Module 4.</description></item></channel></rss>