Hallucination Detection Middleware using RAG Based Model
Lakshmanan A,
Nithyanandh S and
Mohanapriya D
International Journal of Scientific Research in Computer Science, Engineering and Information Technology, 2026, vol. 12, issue 5, 360-372
Abstract:
Retrieval-augmented generation (RAG) gives a language model access to external evidence, but retrieval alone does not ensure that a generated answer is supported by that evidence. This paper presents VeriRAG, a middleware-oriented design that separates query screening and evidence retrieval from answer verification. According to the supplied project documentation, the first stage handles conversational or unsuitable requests and retrieves records through a TF–IDF index with unigram–bigram features, cosine similarity, content-word overlap, and a small set of attribute-specific rules. The second stage compares retrieved evidence with a candidate answer and returns a binary support decision, confidence, explanation, and interface status. The documented knowledge base contains 10,000 evidence–question–answer triplets, reported as equally divided between sUPPoRTED and HALLUcInATED labels. The system is exposed through FastAPI middleware and a Streamlit interface designed around progressive disclosure: an answer is shown first and supporting evidence and verification details are revealed on demand. The principal contribution is an inspectable division of responsibility between scope control, retrieval, and evidence-grounded classification rather than a claim that retrieval eliminates hallucination. Because the source archive, dataset, serialized estimators, Transformer checkpoint, and executable tests were not supplied, model priority, training history, dataset provenance, predictive accuracy, and latency could not be independently audited. Consequently, this study reports the documented architecture and a reproducible evaluation plan while treating artifact-level figures as project-reported values rather than experimental findings.
Keywords: retrieval-augmented generation; hallucination detection; factual consistency; guardrails; TF–IDF retrieval; evidence verification; FastAPI; human-centered interface (search for similar items in EconPapers)
Date: 2026
Note: Article URL: https://ijsrcseit.com/home/article/view/CSEIT2612556
References: Add references at CitEc
Citations:
Downloads: (external link)
https://ijsrcseit.com/home/article/view/CSEIT2612556 Article URL (text/html)
https://ijsrcseit.com/home/article/download/CSEIT2612556/CSEIT2612556 Full text (application/pdf)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:jbh:ijsrcs:v12:y2026:i5:id:2183
DOI: 10.32628/CSEIT2612556
Access Statistics for this article
More articles in International Journal of Scientific Research in Computer Science, Engineering and Information Technology from International Journal of Scientific Research in Computer Science, Engineering and Information Technology
Bibliographic data for series maintained by Pankaj Sharma ().