Code Monkey home page Code Monkey logo

many-shot's Introduction

Many-Shot Predictions

Watch the demo video

Demo GIF

Overview

The Many-Shot Prediction App is a powerful tool for comparing and analyzing the performance of various AI models. It allows users to run multiple predictions on the same prompt using different models, including those from OpenAI, Anthropic, Gemini, and a local model.

Recent research has shown that running the same prompt multiple times can lead to greater predictability in language model outputs. This app provides an intuitive interface to run a prompt N times and visualize the results, helping you understand the distribution and consistency of model responses.

Features

  • Support for multiple AI platforms: OpenAI, Anthropic, Gemini, and a local model
  • Customizable number of prediction runs
  • Input for questions and multiple answer options
  • Visualization of prediction results
  • Easy comparison of model performances

Getting Started

  1. Clone the repository:

    git clone https://github.com/btahir/many-shot.git
    cd many-shot-predictions
  2. Install dependencies:

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Set up environment variables (see below)

  4. Run the development server:

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  5. Open http://localhost:3000 in your browser to use the app.

Environment Variables

Create a .env.local file in the root directory and add your API keys:

OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
GEMINI_API_KEY=your_gemini_api_key

Note: The app will only work for the platforms whose API keys you have provided. If you want to test it out quickly, you can use the local model option, although it may be slower.

Demo App

You can try out the demo app here. Please note that the demo version only works with the local model option.

Contributing

We welcome contributions! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

many-shot's People

Contributors

btahir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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