78 lines
1.3 KiB
Python
78 lines
1.3 KiB
Python
"""
|
|||
|
|
Evaluation module for RAG systems
|
||
|
|
"""
|
||
|
|
|
||
|
|
from .rag_adapter import (
|
||
|
|
RAGRetriever,
|
||
|
|
RAGGenerator,
|
||
|
|
HTTPRAGRetriever,
|
||
|
|
HTTPRAGGenerator,
|
||
|
|
MockRAGRetriever,
|
||
|
|
MockRAGGenerator,
|
||
|
|
RAGEvaluationAdapter,
|
||
|
|
RetryConfig,
|
||
|
|
retry_with_exponential_backoff
|
||
|
|
)
|
||
|
|
|
||
|
|
from .metrics import (
|
||
|
|
Metric,
|
||
|
|
ContextRecall,
|
||
|
|
ContextPrecision,
|
||
|
|
MRR,
|
||
|
|
NDCG,
|
||
|
|
Faithfulness,
|
||
|
|
AnswerRelevancy,
|
||
|
|
Correctness,
|
||
|
|
MetricsCalculator
|
||
|
|
)
|
||
|
|
|
||
|
|
from .executor import EvaluationExecutor
|
||
|
|
|
||
|
|
from .parallel_executor import (
|
||
|
|
ParallelExecutor,
|
||
|
|
ParallelConfig,
|
||
|
|
BatchEvaluator
|
||
|
|
)
|
||
|
|
|
||
|
|
from .cache import (
|
||
|
|
CacheKey,
|
||
|
|
EvaluationCache,
|
||
|
|
CachedEvaluationExecutor
|
||
|
|
)
|
||
|
|
|
||
|
|
__all__ = [
|
||
|
|
# RAG Adapters
|
||
|
|
"RAGRetriever",
|
||
|
|
"RAGGenerator",
|
||
|
|
"HTTPRAGRetriever",
|
||
|
|
"HTTPRAGGenerator",
|
||
|
|
"MockRAGRetriever",
|
||
|
|
"MockRAGGenerator",
|
||
|
|
"RAGEvaluationAdapter",
|
||
|
|
"RetryConfig",
|
||
|
|
"retry_with_exponential_backoff",
|
||
|
|
|
||
|
|
# Metrics
|
||
|
|
"Metric",
|
||
|
|
"ContextRecall",
|
||
|
|
"ContextPrecision",
|
||
|
|
"MRR",
|
||
|
|
"NDCG",
|
||
|
|
"Faithfulness",
|
||
|
|
"AnswerRelevancy",
|
||
|
|
"Correctness",
|
||
|
|
"MetricsCalculator",
|
||
|
|
|
||
|
|
# Executor
|
||
|
|
"EvaluationExecutor",
|
||
|
|
|
||
|
|
# Parallel Execution
|
||
|
|
"ParallelExecutor",
|
||
|
|
"ParallelConfig",
|
||
|
|
"BatchEvaluator",
|
||
|
|
|
||
|
|
# Cache
|
||
|
|
"CacheKey",
|
||
|
|
"EvaluationCache",
|
||
|
|
"CachedEvaluationExecutor",
|
||
|
|
]
|