"""
llm-guard: Predict, diagnose, and repair LLM failures automatically.

Validated AUROC: 0.966–0.993 across math, code, and factual QA benchmarks.
Latency overhead: <15ms per query after warm-up.

Quick start
-----------
    from llm_guard import LLMGuard

    guard = LLMGuard(api_key="sk-ant-...")

    # Option A — you have known-correct examples
    guard.fit(correct_questions=[...])

    # Option B — no labels, use self-consistency
    guard.fit_from_consistency(questions=[...], n_samples=5)

    # Option C — automated verifier (code execution, math eval, SQL, etc.)
    guard.fit_from_execution(questions=[...], verifier_fn=my_verifier)

    # Run a query with automatic reliability scoring and repair
    result = guard.query("What is 15% of 240?")
    print(result.answer)      # "36"
    print(result.confidence)  # "high" | "medium" | "low"
    print(result.risk_score)  # 0.12  (low = familiar territory)

    # Diagnose accumulated failures
    clusters = guard.diagnose(failed_qs, model_answers, correct_answers)

    # Learn from failures — future queries in those error clusters get auto-fixed
    guard.learn_from_errors(failed_qs, model_answers, correct_answers)
"""

from qppg.guard import QPPGLLMGuard as LLMGuard
from qppg.guard import GuardResult
from llm_guard.router import SmartRouter, RouterResult
from llm_guard.agent_guard import AgentGuard, AgentStepResult

__version__ = "0.1.2"
__all__ = ["LLMGuard", "GuardResult", "SmartRouter", "RouterResult",
           "AgentGuard", "AgentStepResult"]
