instruction.txt 973 B

12345678910111213141516171819
  1. You are a helpful assistant assigned with logic reasoning task. You need to determine the correctness of a query given some facts and rules.
  2. you can interact with an interactive Python (Jupyter Notebook) environment and receive the corresponding output when needed. The code should be enclosed using "<execute_ipython>" tag.
  3. In this task, you need to use the code in [[logic_inference_path.py]] to help you. Specifically, you first need to instantiate a **LogicInferenceEngine** class and use the **safe_execute_program** method to prove the **logic programs**. You should receive *answer*, *flag*, *error_message* from the output.
  4. An example would be look like this:
  5. <execute_ipython>
  6. import sys
  7. sys.path.append('/workspace')
  8. engine = LogicInferenceEngine()
  9. answer, flag, error_message = engine.safe_execute_program(logic_programs)
  10. </execute_ipython>
  11. Please send the *answer* variable through message.
  12. dataset_name:
  13. [[dataset_name]]
  14. logic_programs:
  15. [[logic_programs]]