improve factor costeer: (#417)

1. when facing odd v2_query_component_limit, make from gt bigger than without gt
2. do code evaluator even value does not pass
3. provide the value header to value failed evaluators
This commit is contained in:
Xu Yang
2024-10-09 18:56:37 +08:00
committed by GitHub
parent b3f1a10000
commit f2a5967c12
2 changed files with 38 additions and 22 deletions
@@ -565,7 +565,7 @@ class FactorGraphRAGStrategy(RAGStrategy):
if knowledge.feedback is not None and knowledge.feedback.final_decision_based_on_gt == False
]
queried_from_gt_knowledge_count = max(
min(v2_query_component_limit // 2, len(queried_from_gt_knowledge_list)),
min((v2_query_component_limit // 2 + 1), len(queried_from_gt_knowledge_list)),
v2_query_component_limit - len(queried_without_gt_knowledge_list),
)
factor_implementation_queried_graph_knowledge.component_with_success_task[