Spaces:
Paused
Paused
Fix indexing in bias and reading comp
Browse files- src/deepeval/bias.py +2 -2
- src/deepeval/reading_comp_mc.py +1 -1
src/deepeval/bias.py
CHANGED
@@ -33,14 +33,14 @@ class BiasTask(BaseTask):
|
|
33 |
ambiguous_context = row["ambiguous_context"]
|
34 |
ambiguous_question = row["question_ambiguous"]
|
35 |
ambiguous_answer = row["answer_ambiguous"]
|
36 |
-
ambiguous_correct_answer_letter = chr(
|
37 |
ambiguous_prompt = f"Bağlam: {ambiguous_context}\nSoru: {ambiguous_question}\nSeçenekler:{formatted_choices}"
|
38 |
|
39 |
## disambiguated context
|
40 |
disambiguated_context = row["disambiguated_context"]
|
41 |
disambiguated_question = row["question_disambiguated"]
|
42 |
disambiguated_answer = row["answer_disambiguated"]
|
43 |
-
disambiguated_correct_answer_letter = chr(
|
44 |
disambiguated_prompt = f"Bağlam: {disambiguated_context}\nSoru: {disambiguated_question}\nSeçenekler:{formatted_choices}"
|
45 |
|
46 |
# Prints for debugging
|
|
|
33 |
ambiguous_context = row["ambiguous_context"]
|
34 |
ambiguous_question = row["question_ambiguous"]
|
35 |
ambiguous_answer = row["answer_ambiguous"]
|
36 |
+
ambiguous_correct_answer_letter = chr(64 + ambiguous_answer) # 65 - 1 since we need the indexing to start from 0
|
37 |
ambiguous_prompt = f"Bağlam: {ambiguous_context}\nSoru: {ambiguous_question}\nSeçenekler:{formatted_choices}"
|
38 |
|
39 |
## disambiguated context
|
40 |
disambiguated_context = row["disambiguated_context"]
|
41 |
disambiguated_question = row["question_disambiguated"]
|
42 |
disambiguated_answer = row["answer_disambiguated"]
|
43 |
+
disambiguated_correct_answer_letter = chr(64 + disambiguated_answer) # 65 - 1 since we need the indexing to start from 0
|
44 |
disambiguated_prompt = f"Bağlam: {disambiguated_context}\nSoru: {disambiguated_question}\nSeçenekler:{formatted_choices}"
|
45 |
|
46 |
# Prints for debugging
|
src/deepeval/reading_comp_mc.py
CHANGED
@@ -41,7 +41,7 @@ class ReadingComprehensionMCTask(BaseTask):
|
|
41 |
answer_index = answer
|
42 |
else:
|
43 |
answer_index = int(answer)
|
44 |
-
correct_answer_letter = chr(
|
45 |
|
46 |
|
47 |
# Construct the prompt/message
|
|
|
41 |
answer_index = answer
|
42 |
else:
|
43 |
answer_index = int(answer)
|
44 |
+
correct_answer_letter = chr(64 + answer_index) # 65 - 1 since we need the indexing to start from 0
|
45 |
|
46 |
|
47 |
# Construct the prompt/message
|