from Hacker News

GPTGladiator: Make many draft responses, use second model to pick best

by wjessup on 5/23/23, 5:16 PM with 5 comments

  • by wjessup on 5/23/23, 5:16 PM

    We are experimenting with ways to use ChatGPT to get better answers more reliably, remove hallucinations, etc.

    This little library will generate multiple draft responses and then use a second model to judge the answers and pick a winner, which is then returned to the user. Google's Bard uses this same approach.

    With this library you can apply the pattern to gpt-3.5 and gpt-4.

    Drafts are generated in parallel and all drafts are evaluated with a single prompt.

    This will use a lot of tokens. For example to generate 3 drafts, you are at 3x + you need to feed those drafts into another prompt + get that response, so >7x.

    Streamlit demo: https://theoremone-gptgladiator-streamlit-ui-5ljwmm.streamli...

  • by jemc-dev on 5/24/23, 1:02 PM

    It could be interesting to use this approach in a product that also lets humans pick what they thought was the best answer (in the cases where they are curious about seeing all three).

    That data could be gathered internally by that product into an RLHF data set used to train future LLMs.

  • by arciniegasdev on 5/23/23, 5:56 PM

    Awesome! This will be me go-to for refactoring complex code snippets.