Enhance Decision Engine configuration: Add 'router_profile' setting to decision_engine.yaml and update the DecisionEngine class to utilize this profile when generating responses, improving flexibility in strategy determination.

This commit is contained in:
Lars 2026-01-02 07:45:34 +01:00
parent de05784428
commit 9a98093e70
2 changed files with 3 additions and 1 deletions

View File

@ -79,6 +79,7 @@ class DecisionEngine:
async def _determine_strategy(self, query: str) -> str: async def _determine_strategy(self, query: str) -> str:
"""Nutzt den LLM-Router zur Wahl der Such-Strategie.""" """Nutzt den LLM-Router zur Wahl der Such-Strategie."""
prompt_key = self.config.get("settings", {}).get("router_prompt_key", "intent_router_v1") prompt_key = self.config.get("settings", {}).get("router_prompt_key", "intent_router_v1")
router_profile = self.config.get("settings", {}).get("router_profile")
router_prompt_template = self.llm_service.get_prompt(prompt_key) router_prompt_template = self.llm_service.get_prompt(prompt_key)
if not router_prompt_template: if not router_prompt_template:
return "FACT_WHAT" return "FACT_WHAT"
@ -87,7 +88,7 @@ class DecisionEngine:
try: try:
# Der Router nutzt den Standard-Provider (auto) # Der Router nutzt den Standard-Provider (auto)
response = await self.llm_service.generate_raw_response( response = await self.llm_service.generate_raw_response(
full_prompt, max_retries=1, priority="realtime" full_prompt, max_retries=1, priority="realtime", profile_name=router_profile
) )
return str(response).strip().upper() return str(response).strip().upper()
except Exception as e: except Exception as e:

View File

@ -17,6 +17,7 @@ settings:
router_prompt_key: "intent_router_v1" router_prompt_key: "intent_router_v1"
# Pfad zur neuen Experten-Konfiguration (WP-25a Architektur-Cleanliness) # Pfad zur neuen Experten-Konfiguration (WP-25a Architektur-Cleanliness)
profiles_config_path: "config/llm_profiles.yaml" profiles_config_path: "config/llm_profiles.yaml"
router_profile: "compression_fast"
# --- EBENE 1: STREAM-LIBRARY (Bausteine basierend auf types.yaml v2.7.0) --- # --- EBENE 1: STREAM-LIBRARY (Bausteine basierend auf types.yaml v2.7.0) ---
streams_library: streams_library: