(args, config_dict)
| 15 | result = pipeline.run(test_data) |
| 16 | |
| 17 | def zero_shot(args, config_dict): |
| 18 | from flashrag.pipeline import SequentialPipeline |
| 19 | # preparation |
| 20 | config = Config(args.config_path, config_dict) |
| 21 | all_split = get_dataset(config) |
| 22 | test_data = all_split[args.split] |
| 23 | |
| 24 | from flashrag.pipeline import SequentialPipeline |
| 25 | from flashrag.prompt import PromptTemplate |
| 26 | |
| 27 | templete = PromptTemplate( |
| 28 | config=config, |
| 29 | system_prompt="Answer the question based on your own knowledge. Only give me the answer and do not output any other words.", |
| 30 | user_prompt="Question: {question}", |
| 31 | ) |
| 32 | pipeline = SequentialPipeline(config, templete) |
| 33 | result = pipeline.naive_run(test_data) |
| 34 | |
| 35 | def iterretgen(args, config_dict): |
| 36 | """ |
nothing calls this directly
no test coverage detected