"""
Self-RAG / Corrective RAG Module — barrel re-export.

All implementation split into:
  self_rag_grading   — document relevance grading, filtering, decisions
  self_rag_retrieval — query reformulation, retrieval loop, info

IMPORTANT: Self-RAG is DISABLED by default for privacy reasons!
When enabled, search queries and retrieved documents are sent to OpenAI API.

Based on research:
- Self-RAG (Asai et al., 2023)
- Corrective RAG (Yan et al., 2024)
"""

# Grading: relevance, filtering, decisions, groundedness
from self_rag_grading import (  # noqa: F401
    SELF_RAG_ENABLED,
    OPENAI_API_KEY,
    SELF_RAG_MODEL,
    RELEVANCE_THRESHOLD,
    GROUNDING_THRESHOLD,
    MAX_RETRIEVAL_ATTEMPTS,
    RetrievalDecision,
    SelfRAGError,
    grade_document_relevance,
    grade_documents_batch,
    filter_relevant_documents,
    decide_retrieval_strategy,
    grade_answer_groundedness,
)

# Retrieval: reformulation, loop, info
from self_rag_retrieval import (  # noqa: F401
    reformulate_query,
    self_rag_retrieve,
    get_self_rag_info,
)
