File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
ragas/src/ragas/testset/synthesizers/multi_hop Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ class MultiHopAbstractQuerySynthesizer(MultiHopQuerySynthesizer):
42
42
def get_node_clusters (self , knowledge_graph : KnowledgeGraph ) -> t .List [t .Set [Node ]]:
43
43
"""Identify clusters of nodes based on the specified relationship condition."""
44
44
node_clusters = knowledge_graph .find_indirect_clusters (
45
- relationship_condition = lambda rel : bool (rel .get_property (self .relation_property )),
45
+ relationship_condition = lambda rel : bool (
46
+ rel .get_property (self .relation_property )
47
+ ),
46
48
depth_limit = 3 ,
47
49
)
48
50
logger .info ("found %d clusters" , len (node_clusters ))
@@ -89,7 +91,9 @@ async def _generate_scenarios(
89
91
nodes .append (node )
90
92
91
93
base_scenarios = []
92
- node_themes = [node .properties .get (self .abstract_property_name , []) for node in nodes ]
94
+ node_themes = [
95
+ node .properties .get (self .abstract_property_name , []) for node in nodes
96
+ ]
93
97
prompt_input = ConceptsList (
94
98
lists_of_concepts = node_themes , max_combinations = num_sample_per_cluster
95
99
)
You can’t perform that action at this time.
0 commit comments