End-to-End Python implementation of Semantic Divergence Metrics (SDM) for LLM hallucination detection. Uses ensemble paraphrasing, joint embedding clustering, and information-theoretic measures (JSD, KL divergence, Wasserstein distance) to quantify prompt-response semantic consistency. Based on Halperin (2025).
natural-language-processing information-theory scikit-learn statistical-analysis computational-linguistics python-implementation semantic-analysis ai-safety model-validation clustering-algorithms research-implementation openai-api prompt-engineering transformer-embeddings llm-evaluation hallucination-detection pydantic-validation robustness-testing divergence-metrics
-
Updated
Aug 15, 2025 - Jupyter Notebook