Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Objectives: LO-5.1, LO-5.2, LO-5.3, LO-6.2, LO-7.1, LO-7.2, LO-7.3, LO-7.4, and LO-3.3 again
When: after Module 7, as the suggested pace places it
Points: 20, for scoring yourself; the course has no grades
Time: about 3 hours

Build and audit a small dispatch evaluation. Use the bundled cases for the numeric checks and write a separate six-case test set of your own. Include typical tickets, edge cases, and misleading wording. Reserve at least two cases for a final check and write one sentence explaining the expected queue for each. Label every illustrative response you write.

Replace the indicated lines in each answer cell and run the check below it. Restart the kernel and run all cells before you record your result. Keep the tests unchanged. The course’s policies apply.

Setup

Provided code

Problem 4 uses this paired bootstrap, the one you wrote in Lab 7’s Exercise L7.5. Run the cell and use the function as it is.

Problem 1: Select a contrast set (LO-5.1, LO-5.2, LO-5.3, 4 points)

Select exactly one example from each queue in the order repair, billing, account. Use Jaccard similarity on lowercased alphabetic word sets. Break ties by ID. Raise ValueError if a queue has no examples. Write the selected rows as input/output example blocks in your prompt draft.

Problem 2: Parse and grade a classifier (LO-6.2, LO-3.3, LO-7.2, 3 points)

Parse each response using the exact label contract. Return the number of correct runs for a row and version. Compare text to the reference exactly. In a separate prompt draft, ask for tagged evidence and exactly one tagged answer and explain what would be validated.

Problem 3: Require one final section (LO-6.2, 3 points)

Extract exactly one nonempty answer tag, trimming its contents. Raise ValueError for malformed or repeated sections. Use re.DOTALL.

Problem 4: Keep cases paired (LO-7.1, LO-7.3, LO-7.4, 5 points)

Use only rows in split. For each version compute normalized case scores in the input order. Return paired_bootstrap on those scores using the helper defaults. Explain how you protect split integrity.

Problem 5: Agreement and intervals (LO-7.2, LO-7.3, 5 points)

Implement agreement from Lab 7 and Wilson’s interval using z=1.96. Return a four-tuple with observed agreement, kappa (None when undefined), and the Wilson interval endpoints around passes of total. Raise ValueError for an empty list of judgments, a nonpositive total, or passes outside the range from 0 to total.

Tools you used

Say which tools you used and how, or write “none.”