explain_vbroadcast.py 781 B

1234567891011121314151617181920212223
  1. from evaluator import *
  2. DESCRIPTION = "Test if the model can correctly explain what the VPBROADCASTB instruction does."
  3. TAGS = ['explain']
  4. question = """
  5. What does the VPBROADCASTB instruction do?
  6. """
  7. evaluation = """
  8. Below is a student's answer to a question about what a particular instruction does: <A>
  9. Does the student's say something similar to "Load integer data from the source operand (the second operand) and broadcast to all elements of the destination operand (the first operand)."?
  10. If the answer is correct say "The student passes" otherwise "The student fails".
  11. """
  12. TestExplainBroadcast = question >> LLMRun() >> LLMRun(evaluation, llm=EVAL_LLM) >> SubstringEvaluator("student passes")
  13. if __name__ == "__main__":
  14. print(run_test(TestExplainBroadcast))