Comparing Evidence-Based Research Strategies in Local Deep Research: A Technical Guide

The learningcircuit/local-deep-research repository provides three distinct evidence-based research strategies—EvidenceBasedStrategy, EnhancedEvidenceBasedStrategy, and ImprovedEvidenceBasedStrategy—that trade execution speed for research thoroughness through progressively sophisticated candidate discovery, query learning, and source diversity mechanisms.

The local-deep-research project implements a tiered architecture of evidence-based research strategies to accommodate queries ranging from rapid fact-checking to exhaustive scholarly investigation. Each strategy builds upon the previous implementation, adding layers of adaptive behavior, source diversity tracking, and cross-validation that directly impact coverage depth and computational overhead.

The Three Evidence-Based Research Strategies

EvidenceBasedStrategy (Base Implementation)

The baseline strategy located in src/local_deep_research/advanced_search_system/strategies/evidence_based_strategy.py provides deterministic, single-stage research functionality. This strategy executes one call to _create_candidate_search_query followed by _execute_search, utilizing direct search exclusively without source-based fallback mechanisms.

Key characteristics include a fixed candidate limit of 10 and a straightforward evidence-gathering loop that processes a maximum of five candidates per iteration. The scoring mechanism employs a simple threshold calculation: min_score = max(0.2, top*0.3). Final verification occurs through a single pass via _final_verification, making this approach optimal for routine queries where speed outweighs exhaustive coverage requirements.

EnhancedEvidenceBasedStrategy (Version 2)

Found in evidence_based_strategy_v2.py, the enhanced strategy implements multi-stage candidate discovery through five distinct search phases: _broad_discovery_search, _focused_constraint_search, _cross_constraint_search, _semantic_expansion_search, and _fallback_search. This staged approach ensures richer candidate pools while maintaining deterministic flow.

The strategy introduces adaptive query-pattern learning via _learn_query_pattern and _update_pattern_success, allowing the system to adapt queries based on historical performance. Source diversity tracking utilizes SourceProfile objects with entropy scoring calculated through _calculate_source_diversity. Pruning becomes more aggressive in later iterations using min_score = max(0.3, top*0.4), while _select_diverse_source ensures balanced evidence gathering across different source types.

ImprovedEvidenceBasedStrategy (Fully Adaptive)

The most sophisticated implementation in improved_evidence_based_strategy.py delivers a fully adaptive pipeline featuring distinct-constraint search, combined-constraint search, exploratory queries, and pattern-based reuse. This strategy tracks every search operation using the SearchAttempt dataclass, enabling detailed learning from both successful and failed queries.

Diversity-aware scoring applies the formula candidate.score = 0.8*base + 0.2*diversity through _calculate_diversity_score, while _prune_with_diversity preserves source variety during candidate reduction. The strategy supports evidence gathering per constraint type with combined-constraint evidence queries, updating knowledge only when confidence improves. Cross-validation occurs via _cross_validate_candidates, which executes multiple validation queries per top candidate to ensure reliability in high-risk or scholarly domains.

Key Architectural Differences

Candidate Discovery Mechanisms

The base EvidenceBasedStrategy relies on a single direct search invocation, limiting candidate generation to one query construction phase. By contrast, EnhancedEvidenceBasedStrategy orchestrates five sequential discovery stages, systematically expanding from broad to focused searches before attempting semantic expansion and fallback mechanisms.

ImprovedEvidenceBasedStrategy extends this further with adaptive candidate discovery that generates distinctive, combined, exploratory, and pattern-based queries dynamically. Each method crafts its own LLM-generated query, allowing the system to modify failed queries and reuse successful patterns across search attempts.

Query Generation and Learning

While the base strategy uses static prompt-driven templates with simple concatenation fallback, the enhanced version maintains success rate statistics for query patterns. The improved strategy treats query generation as a learning process, recording each SearchAttempt to refine future queries based on performance metrics and failure modes.

Source Management and Diversity Scoring

Source handling evolves significantly across implementations. The base strategy accepts direct search results only, marked by use_direct_search=True. The enhanced strategy introduces SourceProfile tracking and calculates diversity entropy via _calculate_source_diversity to prevent over-reliance on single source types.

The improved implementation adds sophisticated diversity preservation during pruning, ensuring that high-scoring but homogenous sources do not dominate the result set. This prevents echo-chamber effects in research outputs by actively balancing academic, commercial, and primary source types.

Evidence Validation Approaches

Validation depth increases with each strategy tier. The base implementation performs simple confidence thresholding during evidence gathering and executes a single final verification pass. The enhanced strategy adds re-checking of weak evidence using under-utilized sources, while the improved strategy implements full cross-validation with multiple validation queries per candidate, ensuring robustness for critical research applications.

Implementing the Strategies in Code

The following example demonstrates instantiation patterns for all three evidence-based research strategies:

from local_deep_research.advanced_search_system.strategies import (
    EvidenceBasedStrategy,
    EnhancedEvidenceBasedStrategy,
    ImprovedEvidenceBasedStrategy,
)

def run_query(query: str, mode: str = "standard", model=None, search=None):
    """Execute research using specified evidence-based strategy."""
    
    if mode == "standard":
        strategy = EvidenceBasedStrategy(
            model, search, all_links_of_system=[]
        )
    elif mode == "enhanced":
        strategy = EnhancedEvidenceBasedStrategy(
            model, search, all_links_of_system=[], 
            enable_pattern_learning=True
        )
    elif mode == "adaptive":
        strategy = ImprovedEvidenceBasedStrategy(
            model, search, all_links_of_system=[], 
            adaptive_query_count=4
        )
    else:
        raise ValueError("Unsupported mode")

    result = strategy.analyze_topic(query)
    return result["current_knowledge"]

# Execute adaptive research

answer = run_query(
    "Impact of transformer architectures on computational linguistics",
    mode="adaptive"
)

When switching the mode parameter, you alter the underlying discovery behavior, query-learning mechanisms, and verification depth as implemented in the respective strategy files.

Summary

  • EvidenceBasedStrategy provides fast, deterministic research with single-stage discovery and simple scoring thresholds, ideal for routine queries.
  • EnhancedEvidenceBasedStrategy adds multi-stage candidate discovery, adaptive query-pattern learning, and source-diversity tracking for complex constraint handling.
  • ImprovedEvidenceBasedStrategy delivers maximal thoroughness through SearchAttempt tracking, diversity-aware scoring, and cross-validation for scholarly or high-stakes research.
  • Source file locations: evidence_based_strategy.py (base), evidence_based_strategy_v2.py (enhanced), and improved_evidence_based_strategy.py (adaptive).
  • Selection criteria depend on the trade-off between execution speed and required coverage depth.

Frequently Asked Questions

Which evidence-based research strategy should I use for quick queries versus deep research?

Use EvidenceBasedStrategy for quick queries requiring immediate answers with minimal computational overhead, as it executes single-pass search with fixed candidate limits. For comprehensive research requiring source diversity and cross-validation—such as academic literature reviews or fact-checking controversial claims—implement ImprovedEvidenceBasedStrategy to leverage its SearchAttempt tracking and multi-query validation capabilities.

How does source diversity tracking differ between Enhanced and Improved strategies?

The EnhancedEvidenceBasedStrategy calculates entropy scores via _calculate_source_diversity using SourceProfile objects to monitor source-type distribution. The ImprovedEvidenceBasedStrategy enhances this by applying diversity scores directly to candidate ranking through the formula candidate.score = 0.8*base + 0.2*diversity, and actively preserves diversity during the pruning phase via _prune_with_diversity rather than merely tracking it.

What is the SearchAttempt dataclass and where is it used?

The SearchAttempt dataclass appears exclusively in improved_evidence_based_strategy.py to record metadata about each query execution, including the query text, constraints used, sources returned, and success indicators. This structure enables the strategy to modify failed queries dynamically and reuse successful patterns across research iterations, forming the foundation of the adaptive learning system.

Can I switch between strategies dynamically based on query complexity?

Yes, the strategy pattern allows runtime selection as demonstrated in the implementation code example. You can analyze query characteristics—such as constraint count, required source types, or confidence thresholds—to programmatically instantiate EvidenceBasedStrategy for simple factual lookups, EnhancedEvidenceBasedStrategy for moderately complex multi-constraint queries, or ImprovedEvidenceBasedStrategy when the query analysis detects high complexity or low initial confidence scores.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →