MCPcopy Create free account
hub / github.com/Agent-RL/ReCall / zero_shot

Function zero_shot

scripts/evaluation/run_eval.py:17–33  ·  view source on GitHub ↗
(args, config_dict)

Source from the content-addressed store, hash-verified

15 result = pipeline.run(test_data)
16
17def 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
35def iterretgen(args, config_dict):
36 """

Callers

nothing calls this directly

Calls 5

naive_runMethod · 0.95
ConfigClass · 0.90
get_datasetFunction · 0.90
PromptTemplateClass · 0.90
SequentialPipelineClass · 0.90

Tested by

no test coverage detected