Reference: Harsh Trivedi et al. "Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions" in ACL 2023
(args, config_dict)
| 55 | result = pipeline.run(test_data) |
| 56 | |
| 57 | def ircot(args, config_dict): |
| 58 | """ |
| 59 | Reference: |
| 60 | Harsh Trivedi et al. "Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions" |
| 61 | in ACL 2023 |
| 62 | """ |
| 63 | from flashrag.pipeline import IRCOTPipeline |
| 64 | |
| 65 | # preparation |
| 66 | config = Config(args.config_path, config_dict) |
| 67 | all_split = get_dataset(config) |
| 68 | test_data = all_split[args.split] |
| 69 | print(config["generator_model_path"]) |
| 70 | pipeline = IRCOTPipeline(config, max_iter=5) |
| 71 | |
| 72 | result = pipeline.run(test_data) |
| 73 | |
| 74 | def re_call(args, config_dict): |
| 75 | config = Config(args.config_path, config_dict) |
nothing calls this directly
no test coverage detected