Implement a function check_constraints(response, constraints) that programmatically verifies whether a model's text response satisfies a list of instruction constraints. Each constraint is a string in one of the supported forms below. Return a dictionary mapping each constraint string to a boolean (True if satisfied, False otherwise). The dictionary must preserve the input order of constraints.
word_count_min:N — the response contains at least N whitespace-separated words.word_count_max:N — the response contains at most N whitespace-separated words.contains_keyword:X — the response contains the substring X, matched case-insensitively.starts_with:X — the response starts with the exact string X (case-sensitive).ends_with:X — the response ends with the exact string X (case-sensitive).no_bullet_points — no line of the response (after stripping leading whitespace) begins with a bullet marker. A bullet marker is - followed by a space, * followed by a space, or one-or-more digits followed by . and a space (e.g. 1. ).Words are obtained via response.split() (whitespace-split). For the bullet check, split the response on \n.
If a constraint string does not match any of the supported formats, mark it as False.