Downloads · 30 days
0
aabolfadl/balash-faty-2
balash-faty-2 is a text generation model from aabolfadl. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This model is a fine-tuned Qwen2.5-3B-Instruct model specialized in detecting hallucinations in Retrieval-Augmented Generation (RAG) answers in both English and Arabic.
Downloads · 30 days
0
Access
Public
Updated Jan 26, 2026
Parameters
1.5B
3.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.1 GB · 99%
From the Hugging Face model README
This model is a fine-tuned Qwen2.5-3B-Instruct model specialized in detecting hallucinations in Retrieval-Augmented Generation (RAG) answers in both English and Arabic.
It acts as an LLM judge that determines whether an answer is fully supported by the retrieved context.
Given:
The model outputs:
PASS → Answer is grounded in the context
FAIL → Answer contains hallucinations or unsupported claims
Prompt Template:
You are a system that detects hallucinations in RAG answers.
Decide whether the answer is fully supported by the context.
Reply with only one word: PASS or FAIL.
[CONTEXT]
{context}
[QUESTION]
{question}
[ANSWER]
{answer}
Judgment:
import requests
API_URL = "YOUR_HF_ENDPOINT_URL"
HF_TOKEN = "hf_xxx"
headers = {
"Authorization": f"Bearer {HF_TOKEN}",
"Content-Type": "application/json"
}
def judge(context, question, answer):
prompt = f"""You are a system that detects hallucinations in RAG answers.
Decide whether the answer is fully supported by the context.
Reply with only one word: PASS or FAIL.
[CONTEXT]
{context}
[QUESTION]
{question}
[ANSWER]
{answer}
Judgment:"""
payload = {
"inputs": prompt,
"parameters": {
"max_new_tokens": 5,
"do_sample": False,
"temperature": 0.0
}
}
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()[0]["generated_text"]
The model was trained on a labeled dataset of RAG examples from HaluBench:
| Field | Description |
|---|---|
| Context | Retrieved passages |
| Question | User query |
| Answer | LLM-generated answer |
| Label | PASS / FAIL |
The dataset is balanced between grounded and hallucinated answers.
✅ Evaluating RAG pipelines ✅ LLM-as-a-judge research ✅ Automatic hallucination detection ✅ Benchmarking grounding quality
❌ Not for open-ended chat ❌ Not a knowledge source
Optimized for low-latency inference using Hugging Face Text Generation Inference (TGI) endpoints.
Ahmed Abolfadl B.Sc. Computer Science & Engineering — German University in Cairo Research focus: ML, AI, Data Science
Uploaded on: 2026-01-26