Files
Benjamin Admin 9912997187
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 25s
CI / test-go-edu-search (push) Successful in 26s
CI / test-python-klausur (push) Failing after 1m55s
CI / test-python-agent-core (push) Successful in 16s
CI / test-nodejs-website (push) Successful in 18s
refactor: Jitsi/Matrix/Voice von Core übernommen, Camunda/BPMN gelöscht, Kommunikation-Nav
- Voice-Service von Core nach Lehrer verschoben (bp-lehrer-voice-service)
- 4 Jitsi-Services + 2 Synapse-Services in docker-compose.yml aufgenommen
- Camunda komplett gelöscht: workflow pages, workflow-config.ts, bpmn-js deps
- CAMUNDA_URL aus backend-lehrer environment entfernt
- Sidebar: Kategorie "Compliance SDK" + "Katalogverwaltung" entfernt
- Sidebar: Neue Kategorie "Kommunikation" mit Video & Chat, Voice Service, Alerts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:01:47 +01:00

78 lines
2.3 KiB
Python

"""
BQAS Configuration
"""
import os
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class BQASConfig:
"""Configuration for BQAS framework."""
# Ollama settings
ollama_base_url: str = field(
default_factory=lambda: os.getenv("OLLAMA_BASE_URL", "http://localhost:11434")
)
judge_model: str = field(
default_factory=lambda: os.getenv("BQAS_JUDGE_MODEL", "qwen2.5:32b")
)
judge_timeout: float = 120.0
# Voice service settings
voice_service_url: str = field(
default_factory=lambda: os.getenv("VOICE_SERVICE_URL", "http://localhost:8091")
)
# Klausur service settings (for RAG tests)
klausur_service_url: str = field(
default_factory=lambda: os.getenv("KLAUSUR_SERVICE_URL", "http://localhost:8086")
)
# Database settings
db_path: str = field(
default_factory=lambda: os.getenv("BQAS_DB_PATH", "bqas_history.db")
)
# Thresholds
regression_threshold: float = 0.1 # Score drop threshold
min_golden_score: float = 3.5 # Minimum acceptable score
min_synthetic_score: float = 3.0
min_rag_score: float = 3.5 # Minimum acceptable RAG score
# Weights for composite score (Intent tests)
intent_accuracy_weight: float = 0.4
faithfulness_weight: float = 0.2
relevance_weight: float = 0.2
coherence_weight: float = 0.1
safety_weight: float = 0.1
# Weights for RAG composite score
rag_retrieval_precision_weight: float = 0.25
rag_operator_alignment_weight: float = 0.20
rag_faithfulness_weight: float = 0.20
rag_citation_accuracy_weight: float = 0.15
rag_privacy_compliance_weight: float = 0.10
rag_coherence_weight: float = 0.10
# GitHub integration
github_repo: Optional[str] = field(
default_factory=lambda: os.getenv("BQAS_GITHUB_REPO")
)
github_token: Optional[str] = field(
default_factory=lambda: os.getenv("GITHUB_TOKEN")
)
# Test generation
synthetic_count_per_intent: int = 10
include_typos: bool = True
include_dialect: bool = True
# RAG test settings
rag_test_suite_path: str = "tests/bqas/golden_tests/golden_rag_correction_v1.yaml"
@classmethod
def from_env(cls) -> "BQASConfig":
"""Create config from environment variables."""
return cls()