src.config.hybrid_inference_config module#

Configuration for Hybrid Dependency Inference.

Allows tuning of thresholds to optimize the balance between accuracy and API call costs.

class src.config.hybrid_inference_config.HybridInferenceConfig[source]#

Bases: object

Configuration for hybrid dependency inference thresholds.

pattern_confidence_threshold: float = 0.8#

Pattern matches above this confidence don’t need AI validation (0.0-1.0) Higher = more AI calls but better accuracy Lower = fewer AI calls but may miss complex dependencies Default: 0.8 (80% confidence)

ai_confidence_threshold: float = 0.7#

Minimum AI confidence to accept a dependency (0.0-1.0) Higher = more conservative, fewer false positives Lower = more permissive, may include weak dependencies Default: 0.7 (70% confidence)

combined_confidence_boost: float = 0.15#

Confidence boost when pattern and AI agree (0.0-0.3) Higher = stronger preference for agreement Lower = less weight on agreement Default: 0.15 (15% boost)

max_ai_pairs_per_batch: int = 20#

Maximum task pairs to analyze in one AI request Higher = fewer API calls but longer prompts Lower = more API calls but simpler prompts Default: 20 pairs

min_shared_keywords: int = 2#

Minimum shared keywords to consider tasks related Higher = fewer AI analyses, may miss subtle relationships Lower = more AI analyses, better coverage Default: 2 keywords

enable_ai_inference: bool = True#

Master switch for AI inference True = Use hybrid approach False = Pattern-only (no API calls) Default: True

cache_ttl_hours: int = 24#

How long to cache AI inference results Higher = fewer repeat API calls Lower = more up-to-date analysis Default: 24 hours

__init__(pattern_confidence_threshold=0.8, ai_confidence_threshold=0.7, combined_confidence_boost=0.15, max_ai_pairs_per_batch=20, min_shared_keywords=2, enable_ai_inference=True, cache_ttl_hours=24, require_component_match=True, max_dependency_chain_length=10)#
Parameters:
  • pattern_confidence_threshold (float)

  • ai_confidence_threshold (float)

  • combined_confidence_boost (float)

  • max_ai_pairs_per_batch (int)

  • min_shared_keywords (int)

  • enable_ai_inference (bool)

  • cache_ttl_hours (int)

  • require_component_match (bool)

  • max_dependency_chain_length (int)

Return type:

None

require_component_match: bool = True#

Whether tasks must share a component for pattern inference True = More accurate but may miss cross-component dependencies False = More permissive pattern matching Default: True

max_dependency_chain_length: int = 10#

Maximum length of dependency chains to prevent cycles Higher = Allow deeper task hierarchies Lower = Simpler, flatter task structures Default: 10

classmethod from_dict(config_dict)[source]#

Create config from dictionary.

Return type:

HybridInferenceConfig

Parameters:

config_dict (dict[str, Any])

to_dict()[source]#

Convert to dictionary for serialization.

Return type:

dict[str, Any]

validate()[source]#

Validate configuration values.

Return type:

None

src.config.hybrid_inference_config.get_preset_config(preset_name)[source]#

Get a preset configuration by name.

Return type:

HybridInferenceConfig

Parameters:

preset_name (str)