# prompts/zero_shot.py | |
from utils.logger import log_output | |
def apply_zero_shot_prompt(question: str) -> str: | |
return f"Solve the following problem with the fromat of LaTex in 512 tokens:\n{question}\n\nAnswer:" | |
def apply_zero_shot_answer(question: str, model, dataset: str, model_name: str, qid: int, prompt_method="zero_shot") -> str: | |
prompt = apply_zero_shot_prompt(question) | |
answer = model.generate(prompt) | |
log_output(dataset, model_name, prompt_method, qid, { | |
"question": question, | |
"answer": answer | |
}) | |
return answer | |