File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -621,7 +621,7 @@ def _tool_declarations(self) -> list[types.Tool]:
621621 "Hybrid Graph-RAG: vector/fulltext seed search over kg_nodes, then expand kg_edges N hops "
622622 "and return a compact subgraph plus provenance citations with youtube timecoded URLs. "
623623 "Also retrieves bill excerpt citations for legislation questions. "
624- "Use edge_rank_threshold to filter low-quality edges (0.05 recommended after normalization )."
624+ "Use edge_rank_threshold to filter low-quality edges (recommended: 0.001 or omit for no filtering )."
625625 ),
626626 parameters_json_schema = tool_schema ,
627627 )
Original file line number Diff line number Diff line change @@ -914,9 +914,13 @@ def kg_hybrid_graph_rag(
914914 max_citations: Maximum citations to return (default: 12)
915915 edge_rank_threshold: Optional threshold to filter edges by edge_rank_score.
916916 Only returns edges with score >= threshold.
917- Recommended: 0.05 after normalization, or 0.00001 before normalization .
917+ Recommended: 0.001 or omit for no filtering .
918918 None means no threshold filtering (default: None)
919919 """
920+ # Guard against overly aggressive thresholds that filter out most edges
921+ if edge_rank_threshold is not None and edge_rank_threshold >= 0.05 :
922+ edge_rank_threshold = None
923+
920924 query = (query or "" ).strip ()
921925 if not query :
922926 return {
You can’t perform that action at this time.
0 commit comments