base64_qanda.py 629 B

123456789101112131415161718
  1. from evaluator import *
  2. DESCRIPTION = "Test if a model will follow instructions to the letter without lots of cajoling. Thinking in base64 is also interesting."
  3. TAGS = ['explain', 'fun']
  4. import base64
  5. question = """
  6. Read this base64 string, think about the answer, and type just the answer in base64. You're entire answer must be base64.
  7. V2hhdCBpcyBvbmUgeWVhciBhZnRlciB3aGVuIFByZXNpZGVudCBnZW9yZ2Ugd2FzaGluZ3RvbiBib3JuPw==
  8. """
  9. TestBase64Thought = question >> LLMRun() >> PyFunc(lambda x: base64.b64decode(x).decode('utf-8')) >> SubstringEvaluator("1733")
  10. if __name__ == "__main__":
  11. print(run_test(TestBase64Thought))