Git Product home page Git Product logo

molecular_facts's Introduction

Molecular Facts: Desiderata for Decontextualization in LLM Fact Verification

Authors: Anisha Gunjal, Greg Durrett

Please check out our work here ๐Ÿ“ƒ

Description

This work evaluates the impact of context and granularity on the factual verification of atomic claims generated by large language models (LLMs). We introduce a framework termed molecular facts, which are optimized for both completeness and brevity. The molecular facts are characterized by two principal attributes:

  1. Decontextuality - The ability of claims to be understood independently of additional contextual information.
  2. Minimality - The minimum amount of information required to ensure claims are self-sufficient.

We quantify the impact of decontextualization on minimality, then present a baseline methodology for generating molecular facts automatically, aiming to add the right amount of information.

Usage

An example of generating molecular facts is provided in demo.ipynb.

import os
openai_key = os.environ["OPENAI_API_KEY"]
  1. Step 1: Check for ambiguity in a claim
from src.utils import ambiguity_check
llm_response = <llm-response> # long form LLM response
claim = <claim> # extracted from LLM response
disambig_dict, _, _ = ambiguity_check(claim, openai_key=openai_key)

  1. Step 2: Decontextualize to generate molecular facts
from src.utils import decontextualize_ambiguity
disambig_decontext, _, _ = decontextualize_ambiguity(claim, disambig_dict, llm_response, openai_key=openai_key)

Citation

If you found our work useful, please consider citing our work.

@misc{gunjal2024molecular,
    title={Molecular Facts: Desiderata for Decontextualization in LLM Fact Verification},
    author={Anisha Gunjal and Greg Durrett},
    year={2024},
    eprint={2406.20079},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

molecular_facts's People

Contributors

anisha2102 avatar

Stargazers

dumbol avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.