Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prompt format german rag community task #171

Merged
merged 2 commits into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 12 additions & 4 deletions community_tasks/german_rag_evals.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def prompt_fn_choose_question_by_context(line, task_name: str = None):
A: {choice_a}
B: {choice_b}
C: {choice_c}
D: {choice_d}"""
D: {choice_d}

Antwort:"""
query = instruction + query_template.format(
context=line["context"],
choice_a=line["choice_a"],
Expand Down Expand Up @@ -147,7 +149,9 @@ def prompt_fn_choose_context_by_question(line, task_name: str = None):
{choice_c}

D:
{choice_d}"""
{choice_d}

Antwort:"""
query = instruction + query_template.format(
question=line["question"],
choice_a=line["choice_a"],
Expand All @@ -170,7 +174,9 @@ def prompt_fn_question_answer_match(line, task_name: str = None):
query_template = """\
Die Frage: {question}

Die Antwort: {answer}"""
Die Antwort: {answer}

Auswahl (J/N):"""
query = instruction + query_template.format(
question=line["question"],
answer=line["answer"],
Expand All @@ -191,7 +197,9 @@ def prompt_fn_context_question_match(line, task_name: str = None):
Kontext:
{context}

Die Frage: {question}"""
Die Frage: {question}

Auswahl (J/N):"""
query = instruction + query_template.format(
question=line["question"],
context=line["context"],
Expand Down