"""
SAGE RAG (Retrieval-Augmented Generation) System

Complete RAG pipeline for Nuclear Criticality Safety,
integrating document retrieval with LLM generation.
"""

from sage.rag.context import (
    ContextBuilder,
    ContextChunk,
    RAGContext,
    build_context_from_results,
)
from sage.rag.formatting import (
    CitationFormatter,
    FormattedResponse,
    OutputFormat,
    RAGResponseOutput,
    ResponseFormatter,
    format_rag_response,
)
from sage.rag.generation import (
    GenerationEngine,
    GenerationResult,
)
from sage.rag.pipeline import (
    SAGERAG,
    RAGConfig,
    RAGResponse,
    SAGERAGPipeline,
    create_rag_pipeline,
)
from sage.rag.validation import (
    CitationExtractor,
    CitationVerifier,
    GroundingChecker,
    ResponseValidator,
    SafetyChecker,
    ValidationIssue,
    ValidationLevel,
    ValidationResult,
    validate_response,
)

__all__ = [
    # Pipeline
    "SAGERAGPipeline",
    "SAGERAG",
    "RAGConfig",
    "RAGResponse",
    "create_rag_pipeline",
    # Context
    "ContextBuilder",
    "ContextChunk",
    "RAGContext",
    "build_context_from_results",
    # Generation
    "GenerationEngine",
    "GenerationResult",
    # Validation
    "ResponseValidator",
    "ValidationResult",
    "ValidationIssue",
    "ValidationLevel",
    "GroundingChecker",
    "CitationVerifier",
    "CitationExtractor",
    "SafetyChecker",
    "validate_response",
    # Formatting
    "ResponseFormatter",
    "CitationFormatter",
    "FormattedResponse",
    "RAGResponseOutput",
    "OutputFormat",
    "format_rag_response",
]
