This repository has been archived on 2026-02-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Benjamin Admin 21a844cb8a fix: Restore all files lost during destructive rebase
A previous `git pull --rebase origin main` dropped 177 local commits,
losing 3400+ files across admin-v2, backend, studio-v2, website,
klausur-service, and many other services. The partial restore attempt
(660295e2) only recovered some files.

This commit restores all missing files from pre-rebase ref 98933f5e
while preserving post-rebase additions (night-scheduler, night-mode UI,
NightModeWidget dashboard integration).

Restored features include:
- AI Module Sidebar (FAB), OCR Labeling, OCR Compare
- GPU Dashboard, RAG Pipeline, Magic Help
- Klausur-Korrektur (8 files), Abitur-Archiv (5+ files)
- Companion, Zeugnisse-Crawler, Screen Flow
- Full backend, studio-v2, website, klausur-service
- All compliance SDKs, agent-core, voice-service
- CI/CD configs, documentation, scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:51:32 +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()