IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v13y2025i11p1831-d1668467.html
   My bibliography  Save this article

Context and Layers in Harmony: A Unified Strategy for Mitigating LLM Hallucinations

Author

Listed:
  • Sangyeon Yu

    (School of Computing, Gachon University, 1342, Seongnam-daero, Sujeong-gu, Seongnam-si 13120, Republic of Korea)

  • Gyunyeop Kim

    (School of Computing, Gachon University, 1342, Seongnam-daero, Sujeong-gu, Seongnam-si 13120, Republic of Korea)

  • Sangwoo Kang

    (School of Computing, Gachon University, 1342, Seongnam-daero, Sujeong-gu, Seongnam-si 13120, Republic of Korea)

Abstract

Large language models, despite their strong performance, frequently produce hallucinated content due to excessive reliance on pre-trained knowledge while insufficiently integrating newly provided context. We introduce LACD, a technique that dynamically rebalances probability distributions across layers, ensuring critical context is not overshadowed. By emphasizing new prompt information, LACD alleviates lower-layer dominance and mitigates hallucinations. On the HotPotQA dataset, LACD outperforms basic context injection baselines by approximately 2.2% in exact match (EM) and matches or exceeds advanced methods such as DoLa and CAD. LACD also demonstrates robust gains on SQuAD, underscoring its capacity to reduce hallucinations while improving factual consistency. Overall, these findings highlight the importance of carefully integrating newly provided context with pre-trained knowledge to achieve more reliable language generation.

Suggested Citation

  • Sangyeon Yu & Gyunyeop Kim & Sangwoo Kang, 2025. "Context and Layers in Harmony: A Unified Strategy for Mitigating LLM Hallucinations," Mathematics, MDPI, vol. 13(11), pages 1-16, May.
  • Handle: RePEc:gam:jmathe:v:13:y:2025:i:11:p:1831-:d:1668467
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/13/11/1831/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/13/11/1831/
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:13:y:2025:i:11:p:1831-:d:1668467. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.