Back to the curriculum

L1-M06 · Level 1 · ~29 h

Non-determinism and AI Regression Testing

What you build: Repeatability and regression report

lessons
5
lesson hours (estimate)
≈ 15 h
lessons with a public video
5/5
0/5 lessons marked done · Progress is saved in this browser only. No account, nothing is sent to a server.
In review. The curriculum, module overviews and Levels 1–3 lessons are drafts written with AI assistance and reviewed by AI. Human review is still pending. English translation: AI-assisted, not human-reviewed.

Levels 1–3 lessons, exercises and quizzes are published as drafts, in Vietnamese with an AI-assisted English translation. They may change after human review.

Module path

  1. Lesson 1 · L1-M06-L01≈ 2.5 hVideo

    Where non-determinism comes from

    What you build: Classifies sources (sampling, infrastructure, model updates)

    Needs: L1-M01-L03, L1-M05-L05

    Key terms (5)
    • Non-determinismTính không xác định (cùng input, output khác)
    • Snapshot / aliasPhiên bản model cố định / tên trỏ tới một phiên bản
    • Serving infrastructureHạ tầng phục vụ model
    • Batch invarianceKết quả không phụ thuộc kích thước batch
    • Deprecation / retirementNgừng khuyến nghị / ngừng hoạt động
  2. Lesson 2 · L1-M06-L02≈ 3 hVideo

    Repeat-run testing and pass rates

    What you build: Repeat-run harness with a stability gate

    Needs: L1-M06-L01

    Key terms (6)
    • Pass rateTỷ lệ pass
    • Confidence interval (Wilson)Khoảng tin cậy (Wilson)
    • Stability gateCổng ổn định
    • InconclusiveChưa đủ bằng chứng để kết luận
    • pass@k / pass^kÍt nhất một lần đúng trong k lần / cả k lần đều đúng
    • Environment errorLỗi môi trường (timeout, mạng)
  3. Lesson 3 · L1-M06-L03≈ 3 hVideo

    Golden datasets and baselines

    What you build: Builds a baseline set with expected properties

    Needs: L1-M06-L02

    Key terms (5)
    • Golden datasetBộ dữ liệu chuẩn dùng lại cho mọi lần test
    • BaselineKết quả gốc để so sánh
    • Fingerprint (hash)Dấu vân tay (mã băm)
    • JSONLJSON Lines, mỗi dòng một JSON
    • Source of truthNguồn sự thật cho kỳ vọng
  4. Lesson 4 · L1-M06-L04≈ 3.5 hVideo

    Regression after prompt or model changes

    What you build: Compares two versions over the same set

    Needs: L1-M06-L03

    Key terms (6)
    • RegressionThay đổi làm kết quả tệ đi
    • p-valueXác suất thấy chênh lệch như vậy **hoặc lớn hơn**, nếu hai phiên bản thật sự như nhau
    • Null hypothesisGiả thuyết không (hai phiên bản như nhau)
    • Statistical powerKhả năng phát hiện một thay đổi có thật
    • Multiple comparisonsSo sánh nhiều case cùng lúc
    • Significance level (α)Ngưỡng ý nghĩa
  5. Lesson 5 · L1-M06-L05≈ 3 hVideo

    Reporting regressions and triaging flaky AI tests

    What you build: Regression report with triage classes

    Needs: L1-M06-L04

    Key terms (5)
    • TriagePhân loại theo nguyên nhân
    • Flaky testTest lúc pass lúc fail với cùng code
    • Oracle defect / data defectLỗi của oracle / lỗi của kỳ vọng trong dữ liệu
    • QuarantineTạm cách ly một test
    • Release recommendationĐề xuất release

A. Module overview

Field Value
Module ID L1-M06
Level 1 - AI QA Engineer
Description Testing an LLM feature whose output changes between runs: sources of variation; repeat runs, pass rate, Wilson interval and stability gate; golden dataset and baseline; comparing two versions with Fisher's test and statistical power; triage and the regression report. Labs use a seeded simulation that runs offline.
Why this module matters Every prompt or model change is a chance to make an answer worse. If you cannot measure that, you cannot make a release decision.
Target professional competencies Level 1: "Measure repeat-run variability and detect regressions after a prompt or model change".
Estimated duration 5 lessons (150 + 180 + 165 + 210 + 180 minutes) ≈ 14.8 hours + module assignment ~14 hours + quiz 0.5 hours ≈ 29 hours for someone new to Python. Estimate, not yet measured with real learners.
Prerequisites L1-M01 to L1-M05. No API key needed.
Module output Repeatability and regression report for ShopEasy FAQ v3
Cost 0 VND

B. Learning objectives

ID Objective
MO1 Classify sources of variation and record enough configuration to make results comparable.
MO2 Measure pass rate with a confidence interval and apply a stability gate.
MO3 Build and review a golden dataset and baseline.
MO4 Compare two versions and explain p-value and power.
MO5 Triage results and write a regression report with a release recommendation.

C. Lessons

ID Lesson Duration Prerequisites Concepts Hands-on output
L1-M06-L01 Where non-determinism comes from 150' L1-M01-L03, L1-M05-L05 sampling, infrastructure, snapshot, wording and quality Source classification
L1-M06-L02 Repeat-run testing and pass rate 180' L01 Wilson, gate, environment errors, pass^k Harness with a gate
L1-M06-L03 Golden dataset and baseline 165' L02 property-based oracle, provenance, fingerprint Reviewed dataset + baseline
L1-M06-L04 Regression after a prompt or model change 210' L03 Fisher, p-value, power, multiple comparisons Two-version comparison
L1-M06-L05 Regression reporting and triage 180' L04 flaky test, seven triage classes, report Report with a verdict

D. Hands-on assignment (module assignment)

Repeatability and regression report for ShopEasy FAQ v3 (fictional). Details in exercises.md.

E. Module assessment

Component Weight Content
Knowledge quiz 20% quiz.md: 12 questions, 20 points
Practical assignment 40% Rubric: Measurement design and execution + Triage
Applied QA analysis 20% Rubric: Dataset review + Results analysis
Review/reflection 20% Rubric: Release recommendation + Reflection

Formula: module score = 0.2 × quiz% + 0.8 × assignment rubric score (out of 100). Pass conditions: quiz ≥ 70% and every mandatory acceptance criterion and total ≥ 70%.

F. References

See references.md.

Objective ↔ assessment matrix

Objective Lesson Module quiz Assignment
MO1 L01 Q1, Q10 AC1; reflection
MO2 L02 Q2, Q3, Q6, Q8, Q9 AC3; extra runs
MO3 L03 Q5, Q7 Dataset review
MO4 L04 Q4, Q11 AC4; Q-COD
MO5 L05 Q12 AC2, AC5, AC6