Skip to content

Commit 6ef4f9a

Browse files
authored
fix SingleHopQuerySynthesizer::prepare_combinations() (#1921)
This bug probably raise a KeyError since `personas` is not set. This could be a bug due to an oversight. Related to #1917
1 parent d96e167 commit 6ef4f9a

File tree

1 file changed

+3
-3
lines changed
  • src/ragas/testset/synthesizers/single_hop

1 file changed

+3
-3
lines changed

src/ragas/testset/synthesizers/single_hop/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def prepare_combinations(
6464
if any(term.lower() in concepts for term in terms):
6565
if persona_list[persona]:
6666
valid_personas.append(persona_list[persona])
67-
sample["personas"] = valid_personas
68-
sample["styles"] = list(QueryStyle)
69-
sample["lengths"] = list(QueryLength)
67+
sample["personas"] = valid_personas
68+
sample["styles"] = list(QueryStyle)
69+
sample["lengths"] = list(QueryLength)
7070

7171
return [sample]
7272

0 commit comments

Comments
 (0)