Loading…
Loading…
ModernBERT-tr-uncased-stsb-HD is a Turkish-specific hallucination detection model based on the ModernBERT architecture. This model is part of the Turk-LettuceDetect suite, specifically designed for detecting hallucinations in Turkish Retrieval-Augmented Generation (RAG) applications.
Input: [CONTEXT] [QUESTION] [GENERATED_ANSWER]
Output: Token-level binary labels (0=supported, 1=hallucinated)
pip install lettucedetect
from lettucedetect.models.inference import HallucinationDetector
# Initialize the Turkish-specific hallucination detector
detector = HallucinationDetector(
method="transformer",
model_path="newmindai/modernbert-tr-uncased-stsb-HD"
)
# Turkish context, question, and answer
context = "İstanbul Türkiye'nin en büyük şehridir. Şehir 15 milyonluk nüfusla Avrupa'nın en kalabalık şehridir."
question = "İstanbul'un nüfusu nedir? İstanbul Avrupa'nın en kalabalık şehri midir?"
answer = "İstanbul'un nüfusu yaklaşık 16 milyondur ve Avrupa'nın en kalabalık şehridir."
# Get span-level predictions (start/end indices, confidence scores)
predictions = detector.predict(
context=context,
question=question,
answer=answer,
output_format="spans"
)
print("Tespit Edilen Hallusinasyonlar:", predictions)
# Örnek çıktı:
# [{'start': 34, 'end': 57, 'confidence': 0.92, 'text': 'yaklaşık 16 milyondur'}]
Evaluated on machine-translated Turkish RAGTruth test set across three task types with consistent performance improvements over baseline multilingual approaches.
Example-level Results
Token-level Results
@inproceedings{turklettucedetect2025,
title={Turk-LettuceDetect: A Hallucination Detection Models for Turkish RAG Applications},
author={NewMind AI Team},
booktitle={9th International Artificial Intelligence and Data Processing Symposium (IDAP'25)},
year={2025},
address={Malatya, Turkey}
}
This model extends the LettuceDetect methodology:
@misc{Kovacs:2025,
title={LettuceDetect: A Hallucination Detection Framework for RAG Applications},
author={Ádám Kovács and Gábor Recski},
year={2025},
eprint={2502.17125},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2502.17125},
}
This model is released under an open-source license to support research and development in Turkish NLP applications.
For questions about this model or other Turkish hallucination detection models, please refer to the original paper or contact the authors.
newmindai/modernbert-base-tr-uncased-allnli-stsb