Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 15, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 15, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 15, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 15, 2025

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025

      NVIDIA’s drivers are causing big problems for DOOM: The Dark Ages, but some fixes are available

      May 15, 2025

      Capcom breaks all-time profit records with 10% income growth after Monster Hunter Wilds sold over 10 million copies in a month

      May 15, 2025

      Microsoft plans to lay off 3% of its workforce, reportedly targeting management cuts as it changes to fit a “dynamic marketplace”

      May 15, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      A cross-platform Markdown note-taking application

      May 15, 2025
      Recent

      A cross-platform Markdown note-taking application

      May 15, 2025

      AI Assistant Demo & Tips for Enterprise Projects

      May 15, 2025

      Celebrating Global Accessibility Awareness Day (GAAD)

      May 15, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025
      Recent

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025

      NVIDIA’s drivers are causing big problems for DOOM: The Dark Ages, but some fixes are available

      May 15, 2025

      Capcom breaks all-time profit records with 10% income growth after Monster Hunter Wilds sold over 10 million copies in a month

      May 15, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Microsoft Researchers Combine Small and Large Language Models for Faster, More Accurate Hallucination Detection

    Microsoft Researchers Combine Small and Large Language Models for Faster, More Accurate Hallucination Detection

    August 31, 2024

    Large Language Models (LLMs) have demonstrated remarkable capabilities in various natural language processing tasks. However, they face a significant challenge: hallucinations, where the models generate responses that are not grounded in the source material. This issue undermines the reliability of LLMs and makes hallucination detection a critical area of research. While conventional methods like classification and ranking models have been effective, they often lack interpretability, which is crucial for user trust and mitigation strategies. The widespread adoption of LLMs has led researchers to explore using these models themselves for hallucination detection. Nevertheless, this approach introduces new challenges, particularly regarding latency, due to the enormous size of LLMs and the computational overhead required to process long source texts. This creates a significant obstacle for real-time applications that require quick response times.

    Researchers from Microsoft Responsible AI present a robust workflow to address the challenges of hallucination detection in LLMs. This approach aims to balance latency and interpretability by combining a small classification model, specifically a small language model (SLM), with a downstream LLM module called a “constrained reasoner.” The SLM performs initial hallucination detection, while the LLM module explains the detected hallucinations. This method utilizes the relatively infrequent occurrence of hallucinations in practical use, making the average time cost of using LLMs for reasoning on hallucinated texts manageable. Additionally, the approach capitalizes on LLMs’ pre-existing reasoning and explanation capabilities, eliminating the need for extensive domain-specific data and the significant computational cost associated with fine-tuning.

    This framework mitigates a potential issue in combining SLMs and LLMs: inconsistency between the SLM’s decisions and the LLM’s explanations. This problem is particularly relevant in hallucination detection, where alignment between detection and explanation is crucial. The study focuses on resolving this issue within the two-stage hallucination detection framework. Additionally, the researchers analyze LLM reasonings about SLM decisions and ground truth labels, exploring the potential of LLMs as feedback mechanisms for improving detection processes. The study makes two primary contributions: introducing a constrained reasoner for hallucination detection that balances latency and interpretability and providing a comprehensive analysis of upstream-downstream consistency, along with practical solutions to enhance alignment between detection and explanation. The effectiveness of this approach is demonstrated across multiple open-source datasets.

    The proposed framework addresses the dual challenges of latency and interpretability in hallucination detection for LLMs. It consists of two main components: an SLM for initial detection and a constrained reasoner based on an LLM for explanation.

    The SLM serves as a lightweight, efficient classifier trained to identify potential hallucinations in text. This initial step allows for rapid screening of input, significantly reducing the computational load on the system. When the SLM flags a piece of text as potentially containing a hallucination, it triggers the second stage of the process.

    The constrained reasoner, powered by an LLM, then takes over to provide a detailed explanation of the detected hallucination. This component takes advantage of the LLM’s advanced reasoning capabilities to analyze the flagged text in context, offering insights into why it was identified as a hallucination. The reasoner is “constrained” in the sense that it focuses solely on explaining the SLM’s decision, rather than performing an open-ended analysis.

    To tackle potential inconsistencies between the SLM’s decisions and the LLM’s explanations, the framework incorporates mechanisms to enhance alignment. This includes careful prompt engineering for the LLM and potential feedback loops where the LLM’s explanations can be used to refine the SLM’s detection criteria over time.

    The experimental setup of the proposed hallucination detection framework is designed to study the consistency of reasoning and explore effective approaches to filter inconsistencies. The researchers use GPT4-turbo as the constrained reasoner (R) to explain hallucination determinations with specific temperature and top-p settings. The experiments are conducted across four datasets: NHNET, FEVER, HaluQA, and HaluSum, with sampling applied to manage dataset sizes and resource limitations.

    To simulate an imperfect SLM classifier, the researchers sample both hallucinated and non-hallucinated responses from the datasets, assuming the upstream label as a hallucination. This creates a mix of true positive and false positive cases for analysis.

    The methodology focuses on three primary approaches:

    1. Vanilla: A baseline approach where R simply explains why the text was detected as a hallucination without addressing inconsistencies.

    2. Fallback: Introduces an “UNKNOWN” flag to indicate when R cannot provide a suitable explanation, signaling potential inconsistencies.

    3. Categorized: Refines the flagging mechanism by incorporating granular hallucination categories, including a specific category (hallu12) to signal inconsistencies where the text is not a hallucination.

    These approaches are compared to assess their effectiveness in handling inconsistencies between SLM decisions and LLM explanations to improve the overall reliability and interpretability of the hallucination detection framework.

    The experimental results demonstrate the effectiveness of the proposed hallucination detection framework, particularly the Categorized approach. In identifying inconsistencies between SLM decisions and LLM explanations, the Categorized approach achieved near-perfect performance across all datasets, with precision, recall, and F1 scores consistently above 0.998 on many datasets.

    Compared to the Fallback approach, which showed high precision but poor recall, the Categorized method excelled in both metrics. This superior performance translated into more effective inconsistency filtering. While the Vanilla approach exhibited high inconsistency rates, and the Fallback method showed limited improvement, the Categorized approach dramatically reduced inconsistencies to as low as 0.1-1% across all datasets after filtering.

    The Categorized approach also demonstrated strong potential as a feedback mechanism for improving the upstream SLM. It consistently outperformed the Fallback method in identifying false positives, achieving a macro-average F1 score of 0.781. This indicates its capability to accurately assess the SLM’s decisions against ground truth, making it a promising tool for refining the detection process.

    These results highlight the Categorized approach’s ability to enhance consistency between detection and explanation in the hallucination detection framework, while also providing valuable feedback for system improvement.

    This study presents a practical framework for efficient and interpretable hallucination detection by integrating an SLM for detection with an LLM for constrained reasoning. The proposed categorized prompting and filtering strategy presented by the researchers effectively aligns LLM explanations with SLM decisions, demonstrating empirical success across four hallucination and factual consistency datasets. Also, this approach holds potential as a feedback mechanism for refining SLMs, paving the way for more robust and adaptive systems. The findings offer broader implications for improving classification systems and enhancing SLMs through LLM-driven constrained interpretation.

    Check out the Paper. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on Twitter and join our Telegram Channel and LinkedIn Group. If you like our work, you will love our newsletter..

    Don’t Forget to join our 50k+ ML SubReddit

    Here is a highly recommended webinar from our sponsor: ‘Building Performant AI Applications with NVIDIA NIMs and Haystack’

    The post Microsoft Researchers Combine Small and Large Language Models for Faster, More Accurate Hallucination Detection appeared first on MarkTechPost.

    Source: Read More 

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleTell us how you use CSS with the State of CSS survey
    Next Article Cheshire-Cat: A Python Framework to Build Custom AIs on Top of Any Language Models

    Related Posts

    Development

    February 2025 Baseline monthly digest

    May 15, 2025
    Artificial Intelligence

    Markus Buehler receives 2025 Washington Award

    May 15, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Why you need a data backup plan for your Mac or PC – before disaster strikes

    News & Updates

    UGreen drops a stunning Genshin Impact collection of charging accessories AND it’s all on sale

    News & Updates

    Researchers Details macOS Remote Code Execution Vulnerability – CVE-2024-44236

    Security

    CVE-2025-4207 – PostgreSQL Buffer Over-Read Denial of Service

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Development

    Fine-tuning Pagination Links in Laravel

    February 13, 2025

    Master Laravel’s pagination display with onEachSide. Create adaptive navigation interfaces that adjust to your dataset…

    My information was stolen. Now what?

    November 21, 2024

    Can’t find a specific element generated in DevExpress

    August 4, 2024

    Microsoft shows off radically different Start menu in Windows 11, but it won’t ship

    May 13, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.