GithubHelp home page GithubHelp logo

persuasive-llms's Introduction

Code repository for 'The Persuasive Power of Large Language Models'

Using Llama 2 70b to understand effectiveness of arguments based on different social dimensions present in arguments.


Navigation:

  • conversation_generation/Inference_llama_personality.ipynb: This is the file where we generate all of the conversations with LLama. A Convincer and Skeptic agent is defined. The Convincer generates an argument based on a social dimension. The Skeptic will respond, and is queried for if the Agent got convinced. In the corresponding folder, all of the conversations are stored. Note, we did some additional checks with GREP to find and remove responses like As a language model[...].
  • [Result replication] tendims/classify_social_dims.ipynb: Here we parse all of the conversations from LLama described above. We utilize some code from https://github.com/lajello/tendimensions to follow their methodology. We check for the pressence of each social dimension. We also check which dimensions are the closest to the Baseline arguments generated. Additionally, we check how often the Skeptic was convinced per dimension.
  • mturk/select_prompts_for_mturk.ipynb: We find the arguments which convinced the Skeptic. From this, we select 5 of these arguments randomly per match. We correspondingly create SVGs for the arguments so they can be displayed as images.
  • mturk/create_mturk_batches.ipynb: We parse the selected matches above and generate the files to post on MTurk for human annotations. Additionally, we insert some control samples to detect unreliable annotators.
  • [Result replication] mturk/mturk_response_analysis.ipynb: We filter out the unreliable users based on the answers to control samples. We run the Bradley-Terry model on the responses from MTurk to see which social dimension is most effective according to the annotators. We also check the general annotator agreement for all samples, and see the level of agreement per matchup. We also examine the effect of removing matchups based of varying threshold of agreement to see how this changes the rankings of the Bradley-Terry model.

persuasive-llms's People

Contributors

andersgiovanni 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.