Git Product home page Git Product logo

raccoon's Introduction

logo

Raccoon

Quick links:


Using LLMs for a project is great, but not if it ends up costing you a lot because a malicious prompt gets in.

Prompt Stress-Test

Are you concerned about the security of your AI-powered application or model? Worried that it might be vulnerable to attacks such as cross-site scripting? If so, the Prompt Stress-Test is just what you need!

What is the Prompt Stress-Test?

The Prompt Stress-Test is a tool designed to evaluate prompts for AI models and applications. By subjecting your prompts to rigorous testing, it helps you identify potential vulnerabilities and prevent attacks.

Prevention ๐Ÿšง

The best way to prevent cross-site scripting attacks is by using an allow list of acceptable input types. The Prompt Stress-Test uses this same approach to ensure that all inputs are safe and secure.

Other ways to create good prompts include understanding prompt design principles which can be found in our Prompt Engineering Guide.

How does it work?

To use the Prompt Stress-Test, you can use our web app or simply follow these steps:

  1. Configure run.py with your evaluation method.
  2. Run cps.py.
  3. Check results.

It's that simple!

Demonstration

Don't believe us? Try out our demo! The link should be by the Github description. OR: After cloning this repository, navigate into the root directory, run npm i, and create a configuration file called config.json with your OpenAI API key inside like so:

{
  "key": "OPENAI KEY"
}

Then start the server by running node server.js. Finally, run python3 cps.py in another terminal window and watch as we stress-test your chosen prompt(s)!

Other Resources

For more information on how to improve prompt performance and security in general, check out these other resources:

And if you have any contributions or feedback for us, please don't hesitate to make a pull request!

raccoon's People

Contributors

velocitatem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mspublic

raccoon's Issues

Stress-testing tools

We can stress-test tools:

  • We consider some LLM app to be an oracle
  • We do not know the tools it can use
  • We probe it with prompts to test for those tools
  • We assess the results
  • We now have an idea of what tools the oracle has

How does this help?

We can detect early on, possible windows for attacks on the LLM.

tool is underway on a branch

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.