⚠️ Auditstand: Dieser Befund gilt für den Stand bei Erstellung. Erneute Prüfung gegen aktuellen Code empfohlen.
Last Audit: 2026-04-19 | Auditor: Copilot | Status: ✅ Pass
| Metric | Result |
|---|---|
| Build System Registration | ✅ Verified |
| Source Files | 55 .cpp in src/rag/ |
| Test Coverage | ✅ Present (38 dedicated test files in tests/) |
| Open TODOs | Low |
| Security Issues | None critical |
| File | Purpose |
|---|---|
rag_judge.cpp |
Main orchestrator for multi-dimensional RAG evaluation |
knowledge_gap_detector.cpp |
Three-level knowledge gap detection system |
llm_integration.cpp |
LLM inference bridge for RAG pipeline |
streaming_retriever.cpp |
Incremental context window filling with token-budget enforcement, MMR deduplication |
faithfulness_evaluator.cpp |
Fact-checking against retrieved sources |
relevance_evaluator.cpp |
Query-answer alignment scoring |
completeness_evaluator.cpp |
Query aspect coverage measurement |
coherence_evaluator.cpp |
Structure and readability scoring |
bias_detector.cpp |
Ethical compliance / bias checking |
claim_extractor.cpp |
Atomic claim decomposition from answers |
response_parser.cpp |
LLM evaluation response parsing |
prompt_templates.cpp |
Template and few-shot example management |
judge_config.cpp |
Configuration validation |
rubric_evaluator.cpp |
Custom rubric evaluation |
judge_ensemble.cpp |
Multi-judge voting strategies |
pairwise_comparator.cpp |
Head-to-head response comparison |
cot_evaluator.cpp |
Chain-of-thought evaluation |
geval_evaluator.cpp |
G-Eval framework (Liu et al., 2023) |
llm_judge_integration.cpp |
Judge orchestration |
llm_meta_analyzer.cpp |
Performance meta-analysis |
hybrid_retriever.cpp |
BM25 + vector fusion with configurable RRF weights |
reranker.cpp |
Cross-encoder reranking |
hallucination_dashboard.cpp |
Rolling-window hallucination rate tracking |
document_summarizer.cpp |
Multi-document summarization before context injection |
knowledge_graph_retriever.cpp |
Knowledge graph-augmented retrieval with entity linking |
document_splitter.cpp |
Configurable chunking (size, overlap, strategy) |
citation_highlighter.cpp |
Map answer sentences to source chunks |
agentic_rag.cpp |
Agentic RAG with iterative retrieval loops |
multimodal_rag.cpp |
Multi-modal RAG (image + text retrieval) |
adaptive_retrieval.cpp |
Bayesian optimizer over retrieval parameters |
evaluation_cache.cpp |
Thread-safe LRU evaluation result cache with TTL |
calibration_manager.cpp |
Temperature scaling, Platt/isotonic regression for judge score calibration |
batch_evaluator.cpp |
Parallel batch evaluation with configurable worker threads |
distributed_rag_evaluator.cpp |
Distributed evaluation across multiple judge models |
prompt_injection_detector.cpp |
Pattern-based prompt injection detection and sanitization |
replug_retriever.cpp |
REPLUG-style LLM-scored retrieval fusion |
nli_faithfulness_verifier.cpp |
NLI entailment-based claim verification |
adversarial_tester.cpp |
Adversarial robustness testing for RAG pipeline |
ab_testing_framework.cpp |
A/B testing for retrieval and generation strategies |
bayesian_optimizer.cpp |
Bayesian optimization for retrieval hyperparameters |
learning_metrics.cpp |
Sliding-window metrics with mean/std-dev/trend export |
continuous_learning_client.cpp |
Client for continuous learning feedback loop |
continuous_learning_orchestrator.cpp |
Orchestrator for adaptive learning cycles (ContinuousLearningOrchestrator; themis::rag::learning namespace): triggerLoop(LoopPhase), registerLoopCompletionHandler(), setFederationCoordinator(), setTrainerForFederation(); TriggerEvent::FEDERATED_ROUND_START |
rlaif_trainer.cpp |
RLAIF (Constitutional AI) training pipeline |
evaluation_report_exporter.cpp |
Per-query evaluation report export (JSON/HTML) |
llm_judge_client.cpp |
HTTP client for remote LLM judge API |
http_metrics_client.cpp |
HTTP client for metrics ingestion |
multi_hop_reasoner.cpp |
Multi-hop reasoning over retrieved documents |
multi_step_rag.cpp |
Multi-step RAG with iterative retrieval planning |
rag_context_assembler.cpp |
Context assembly and formatting for LLM prompts |
rag_ingestion_bridge.cpp |
Connects IngestionToolbox to RAG pipeline (RAGIngestionBridge; themis::rag namespace): indexDocument(), enrichRetrievedDocuments(), extractEntitiesForContext(), buildEntityContext(); IndexResult return type |
quality_control_factory.cpp |
Factory for QA/QC pipeline components |
quality_control_pipeline.cpp |
End-to-end quality control pipeline orchestration |
onnx_model_loader.cpp |
ONNX model loader for local NLI/reranker inference |
explainability_reason_builder.cpp |
Explainability reason and evidence builder |
| Test File | Coverage |
|---|---|
tests/test_rag_judge.cpp |
Main evaluation orchestrator |
tests/test_rag_judge_phase1.cpp |
Phase 1 evaluators |
tests/test_rag_judge_phase2.cpp |
Phase 2 streaming and reranking |
tests/test_rag_judge_phase3.cpp |
Phase 3 hybrid retrieval |
tests/test_rag_judge_phase4.cpp |
Phase 4 agentic / KG RAG |
tests/test_rag_streaming_retriever.cpp |
Streaming retriever |
tests/test_rag_hybrid_retriever.cpp |
Hybrid BM25+vector retriever |
tests/test_rag_reranker.cpp |
Cross-encoder reranking |
tests/test_rag_hallucination_dashboard.cpp |
Hallucination rate tracking |
tests/test_rag_document_splitter.cpp |
Chunking strategies |
tests/test_rag_document_summarizer.cpp |
Multi-document summarization |
tests/test_rag_knowledge_graph_retriever.cpp |
KG-augmented retrieval |
tests/test_rag_citation_highlighter.cpp |
Citation mapping |
tests/test_rag_agentic.cpp |
Agentic RAG |
tests/test_rag_multimodal.cpp |
Multi-modal RAG |
tests/test_rag_adaptive_retrieval.cpp |
Bayesian retrieval optimization |
tests/test_rag_evaluation_cache.cpp |
Evaluation LRU cache |
tests/test_rag_calibration_manager.cpp |
Judge score calibration |
tests/test_rag_batch_evaluator.cpp |
Parallel batch evaluation |
tests/test_rag_distributed_evaluator.cpp |
Distributed evaluation |
tests/test_rag_prompt_injection.cpp |
Prompt injection detection |
tests/test_rag_replug_retriever.cpp |
REPLUG retriever |
tests/test_rag_adversarial_tester.cpp |
Adversarial robustness |
tests/test_rag_ingestion_bridge.cpp |
Ingestion bridge |
tests/test_rag_context_assembler.cpp |
Context assembly |
tests/test_rag_evaluation_report_exporter.cpp |
Report export |
tests/test_rag_multi_hop_reasoner.cpp |
Multi-hop reasoning |
tests/test_multi_step_rag.cpp |
Multi-step RAG |
tests/test_rag_rlaif_trainer.cpp |
RLAIF trainer |
tests/test_rag_pipeline_integration.cpp |
End-to-end pipeline integration |
tests/test_rag_ethics.cpp |
Ethics / bias compliance |
tests/test_rag_context_engine.cpp |
Context engine |
tests/test_rag_aql_integration.cpp |
AQL query integration |
tests/test_rag_prompt_builder.cpp |
Prompt builder |
tests/test_rag_uncovered.cpp |
Additional coverage |
benchmarks/bench_rag_evaluation.cpp |
Recall@K, latency, batch throughput |
tests/test_explainability_reason_builder.cpp |
Explainability builder |
- Build system registration verified for all 55 source files
- PII filtering integrated into retrieval path — Evidence:
src/rag/prompt_injection_detector.cpp(sanitizer strips sensitive patterns) - Prompt injection detection and sanitization implemented — Evidence:
include/rag/prompt_injection_detector.h,src/rag/prompt_injection_detector.cpp:PromptInjectionDetector(pattern-based),PromptInjectionSanitizer(truncation/replacement) - GDPR Article 22 audit logging: source attribution present — Evidence:
src/rag/rag_judge.cpp(claims linked to source documents) ContinuousLearningOrchestratorloop trigger API implemented — Evidence:include/rag/continuous_learning_orchestrator.h:283(triggerLoop(LoopPhase),LoopPhaseenum,TriggerEvent::FEDERATED_ROUND_START,setFederationCoordinator())RAGIngestionBridgeimplemented — Evidence:include/rag/rag_ingestion_bridge.h:109(indexDocument(),enrichRetrievedDocuments(),buildEntityContext())
- Loop-interference cooldown guard (
OptimizationLock) not yet implemented (ROADMAP Phase 8) - JSON context serialiser for loop outcome signals not yet implemented (ROADMAP Phase 8)
- Unit tests in
tests/test_continuous_learning_orchestrator_loops.cppnot yet present
RAG pipelines processing personal data fall under GDPR Article 22 (automated decision-making).
Source attribution and audit logging support compliance requirements.
prompt_injection_detector.cpp guards against data-exfiltration attacks in retrieved context.