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.

fix: Use 25th percentile for rate limiting to speed up on success

LearningCircuitb3875f99c838
diff --git a/src/local_deep_research/web_search_engines/rate_limiting/tracker.py b/src/local_deep_research/web_search_engines/rate_limiting/tracker.py
index 0259c10fba..d2bd0f878f 100644
--- a/src/local_deep_research/web_search_engines/rate_limiting/tracker.py
+++ b/src/local_deep_research/web_search_engines/rate_limiting/tracker.py
@@ -424,10 +424,13 @@ class AdaptiveRateLimitTracker:
# Cap the base wait time to prevent runaway growth
new_base = min(new_base, 10.0) # Max 10 seconds base when all fail
else:
- # Use 75th percentile of successful waits
+ # Use 25th percentile of successful waits to try going faster
+ # If these wait times succeeded, we can try shorter ones
successful_waits.sort()
- percentile_75 = successful_waits[int(len(successful_waits) * 0.75)]
- new_base = percentile_75
+ percentile_25 = successful_waits[
+ max(0, int(len(successful_waits) * 0.25) - 1)
+ ]
+ new_base = percentile_25
# Update estimate with learning rate (exponential moving average)
if engine_type in self.current_estimates: