Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

improved search

LearningCircuite07d940abe59
diff --git a/src/local_deep_research/advanced_search_system/strategies/source_based_strategy.py b/src/local_deep_research/advanced_search_system/strategies/source_based_strategy.py
index dac1e3ad56..5e2f660fb5 100644
--- a/src/local_deep_research/advanced_search_system/strategies/source_based_strategy.py
+++ b/src/local_deep_research/advanced_search_system/strategies/source_based_strategy.py
@@ -297,20 +297,33 @@ class SourceBasedSearchStrategy(BaseSearchStrategy):
self.all_search_results,
query,
reorder=True, # Always reorder in final filtering
- reindex=True, # Always reindex in final filtering
+ reindex=False, # Always reindex in final filtering
max_results=int(get_db_setting("search.final_max_results") or 30),
)
else:
final_filtered_results = self.all_search_results
-
+ self._update_progress(
+ f"Filtered from {len(self.all_search_results)} to {len(final_filtered_results)} results",
+ iteration_progress_base + 85,
+ {
+ "phase": "filtering_complete",
+ "iteration": iteration,
+ "links_count": len(self.all_links_of_system),
+ },
+ )
# Final synthesis after all iterations
self._update_progress(
"Generating final synthesis", 90, {"phase": "synthesis"}
)
- # Generate final synthesis from filtered search results
- final_citation_result = self.citation_handler.analyze_initial(
- query, final_filtered_results
+ total_citation_count = len(self.all_links_of_system)
+
+ # Final synthesis
+ final_citation_result = self.citation_handler.analyze_followup(
+ query,
+ final_filtered_results,
+ previous_knowledge="", # Empty string as we don't need previous knowledge here
+ nr_of_links=total_citation_count,
)
# Add null check for final_citation_result