{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/chain-of-natural-language-inference-for","title":"Chain of Natural Language Inference for Reducing Large Language Model Ungrounded Hallucinations","arxiv_id":"2310.03951","date":"2023-10-06","proceeding":null,"authors":["Deren Lei","Yaxi Li","Mengya Hu","Mingyu Wang","Vincent Yun","Emily Ching","Eslam Kamal"],"abstract":"Large language models (LLMs) can generate fluent natural language texts when given relevant documents as background context. This ability has attracted considerable interest in developing industry applications of LLMs. However, LLMs are prone to generate hallucinations that are not supported by the provided sources. In this paper, we propose a hierarchical framework to detect and mitigate such ungrounded hallucination. Our framework uses Chain of Natural Language Inference (CoNLI) for hallucination detection and hallucination reduction via post-editing. Our approach achieves state-of-the-art performance on hallucination detection and enhances text quality through rewrite, using LLMs without any fine-tuning or domain-specific prompt engineering. We show that this simple plug-and-play framework can serve as an effective choice for hallucination detection and reduction, achieving competitive performance across various contexts.","url_abs":"https://arxiv.org/abs/2310.03951v2","url_pdf":"https://arxiv.org/pdf/2310.03951v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"chain-of-natural-language-inference-for","repo_url":"https://github.com/microsoft/conli_hallucination","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"hallucination","task_name":"Hallucination"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"natural-language-inference","task_name":"Natural Language Inference"},{"task_slug":"prompt-engineering","task_name":"Prompt Engineering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2310.03951","atlas_url":"https://app.syntology.ai/?focus=2310.03951","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.03951"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/conli_hallucination","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6},"by_repo_kind":{"official":{"samples":6,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"148f24e5d98bded3","entry":"clean_span","repo":"microsoft/conli_hallucination","repo_kind":"official","path":"CoNLI/CoNLI/run_hallucination_evaluator.py","file_url":"https://github.com/microsoft/conli_hallucination/blob/HEAD/CoNLI/CoNLI/run_hallucination_evaluator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"148f24e5d98bded3"}},{"code_sha256_prefix":"89115682f5989ce7","entry":"count_tokens","repo":"microsoft/conli_hallucination","repo_kind":"official","path":"CoNLI/CoNLI/modules/hallucination_detector.py","file_url":"https://github.com/microsoft/conli_hallucination/blob/HEAD/CoNLI/CoNLI/modules/hallucination_detector.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"89115682f5989ce7"}},{"code_sha256_prefix":"5ca9b0d44540ff90","entry":"create_openai_arguments","repo":"microsoft/conli_hallucination","repo_kind":"official","path":"CoNLI/CoNLI/modules/arguments.py","file_url":"https://github.com/microsoft/conli_hallucination/blob/HEAD/CoNLI/CoNLI/modules/arguments.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5ca9b0d44540ff90"}},{"code_sha256_prefix":"d56a5a7a9e1bd244","entry":"create_ta_arguments","repo":"microsoft/conli_hallucination","repo_kind":"official","path":"CoNLI/CoNLI/modules/arguments.py","file_url":"https://github.com/microsoft/conli_hallucination/blob/HEAD/CoNLI/CoNLI/modules/arguments.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d56a5a7a9e1bd244"}},{"code_sha256_prefix":"4860d7cabcaf1622","entry":"get_optional_field","repo":"microsoft/conli_hallucination","repo_kind":"official","path":"CoNLI/CoNLI/run_hallucination_detection.py","file_url":"https://github.com/microsoft/conli_hallucination/blob/HEAD/CoNLI/CoNLI/run_hallucination_detection.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4860d7cabcaf1622"}},{"code_sha256_prefix":"240f39e05a931cbf","entry":"get_required_field","repo":"microsoft/conli_hallucination","repo_kind":"official","path":"CoNLI/CoNLI/run_hallucination_detection.py","file_url":"https://github.com/microsoft/conli_hallucination/blob/HEAD/CoNLI/CoNLI/run_hallucination_detection.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"240f39e05a931cbf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}