← Lesson
Write the Eval First
Joeven
Run
Reset
Python loads on first run
def missing_labels(item): need = ["id", "input", "must_call"] return [k for k in need if not item.get(k)] thin = {"id": "g1", "input": "How long do refunds take?"} full = { "id": "g1", "input": "How long do refunds take?", "must_call": "search_kb", "must_contain": "5-7", "forbid": ["refund"], } print("thin", missing_labels(thin)) print("full", missing_labels(full)) print("thin is a ticket, not an eval")
Run to execute this in your browser. Nothing is sent to a server.