Command Palette

Search for a command to run...

Hectal
Phase 9: Evaluation and Testing
LLM Engineering · Exercise 1 of 6Next
Intermediate

Write two scorers

Write exact_match(want, got): True when the two strings are equal after removing spaces at both ends and ignoring upper and lower case, otherwise False.

Write contains_all(words, got): True when every word in the list appears in got, ignoring case. An empty list gives True.

What Check tests

  1. exact_match ignores case and surrounding spaces
  2. exact_match rejects extra characters
  3. contains_all finds every word, ignoring case
  4. contains_all fails when one word is missing
  5. an empty word list passes

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

main.py
Sign in to run your code.

Output

Press Run to see what your program prints.