Skip to main content

AI Verify advances Gen AI testing with Project Moonshot.

Project description

Moonshot Logo

Version 0.7.6

A simple and modular tool to evaluate any LLM-based AI systems.

Python 3.11

🎯 Motivation

Developed by the AI Verify Foundation, Moonshot is a tool to bring Benchmarking and Red-Teaming together to help AI developers, compliance teams evaluate LLM-based Apps and LLMs.


🚀 Why Moonshot

In the rapidly evolving landscape of Generative AI, ensuring safety, reliability, and performance of LLM applications is paramount. Moonshot addresses this critical need by providing a unified platform for:

  • Benchmark Tests: Systematically test LLM Apps or LLMs across critical trust & safety risks using a wide array of open-source benchmark dataset and metrics, including guided workflows to implement IMDA's Starter Kit for LLM-based App Testing.
  • Red Team Attacks: Proactively identify vulnerabilities and potential misuse scenarios in your LLM applications through streamlined adversarial prompting.

🔑 Key Features

  • User-friendly Interfaces: Interact with Moonshot via an intuitive Web UI for visual insights, and an interactive Command Line Interface (CLI) for quick operations.
  • Comprehensive Benchmarking:
  • Powerful Red-Teaming:
    • View list of available attack modules
    • Simplify adversarial prompt generation using algorithmic strategies or generative LLM to uncover potential misuse.
    • Leverage prompt templates, context strategies, and automated attack modules.
  • Customizable Recipes: Build your own benchmark tests with custom datasets (input-target pairs), prompt templates (optional), evaluation metric, and grading scales. View available pre-built Recipes
  • Insightful Reporting: Use our HTML reports with interactive charts for clear visualization of test results, and download detailed raw JSON results for deeper programmatic analysis.
  • Extensible & Modular: Designed for easy extension and integration with new LLM applications, benchmarks, and attack techniques.

Getting Started

Moonshot can be used through several interfaces:


💻 Let's Go!

This section will guide you through getting Moonshot up and running.


✅ Prerequisites

  1. Python: Version 3.11 is required.

  2. Git Version Control: Git is essential for cloning the repository.

  3. (Optional) Virtual Environment: Highly recommended to manage dependencies.

    # Create a virtual environment
    python -m venv venv
    
    # Activate the virtual environment
    source venv/bin/activate
    
  4. If you plan to install our Web UI, you will also need Node.js version 20.11.1 LTS and above


⬇️ Installation

You can install Moonshot in various ways depending on your needs

1. Using pip (Recommended for most users)

# Install Project Moonshot's Python Library, which includes Moonshot's full functionalities (Library APIs, CLI and Web APIs)
pip install "aiverify-moonshot[all]"

# Clone and install test assets and Web UI
python -m moonshot -i moonshot-data -i moonshot-ui

⚠️ You will need to have test assets from moonshot-data before you can run any tests.

🖼️ If you plan to install our Web UI, you will also need moonshot-ui

Check out our Installation Guide for more details.


2. From Source Code (For developers and contributors)

# To install from source code (Full functionalities)
git clone git@github.com:aiverify-foundation/moonshot.git
cd moonshot
pip install -r requirements.txt

If you have installation issues, please take a look at the Troubleshooting Guide.

Other installation options Here's a summary of other installation commands available:
# To install Moonshot library APIs only
pip install aiverify-moonshot

# To install Moonshot library APIs and Web APIs only
pip install "aiverify-moonshot[web-api]"

# To install Moonshot library APIs and CLI only
pip install "aiverify-moonshot[cli]"

Check out our Installation Guide for more details.


🏃‍♀️ Run Moonshot

Running the Web UI

python -m moonshot web

Open http://localhost:3000/ in a browser and you should see this homepage:

Moonshot UI Home

Refer to this guide to discover the rich features available in Moonshot Web UI


Running the Interactive CLI

python -m moonshot cli interactive

Moonshot cli

Refer to this Command List to discover the list of CLI commands for Moonshot



📚 Documentation & User Guides

For detailed information on configuring, using, and extending Moonshot, please refer to our comprehensive documentation:

Guides for Moonshot Web UI

Guides for Moonshot Interactive CLI

For Users Interested in trying Out Moonshot using Jupyter Notebook


🤝 Contribution

Moonshot is an open-source project, and we welcome contributions from the community! Whether fixing a bug, adding a new feature, improving documentation, or suggesting an enhancement, your efforts are highly valued.

Please refer to our Contributor Guide for details on how to get started.


✨ Project Status

Moonshot is currently in beta. We are actively developing new features, improving existing ones, and enhancing stability. We encourage you to try it out and provide feedback!


📜 License

Moonshot is released under the Apache Software License 2.0


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiverify_moonshot-0.7.6.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiverify_moonshot-0.7.6-py3-none-any.whl (243.8 kB view details)

Uploaded Python 3

File details

Details for the file aiverify_moonshot-0.7.6.tar.gz.

File metadata

  • Download URL: aiverify_moonshot-0.7.6.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aiverify_moonshot-0.7.6.tar.gz
Algorithm Hash digest
SHA256 1320b26243d79442b44c9d3a7dc38bce2840cf01bb6cf539e16510bcfb06d11a
MD5 6d88e68ff95bbe19411e0476ee380a37
BLAKE2b-256 5bfd1e0bfa0bd9a5e949ca8dec1f853b6ec0a4526b124f8772955b75eaf59945

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiverify_moonshot-0.7.6.tar.gz:

Publisher: pypi-deployment.yaml on aiverify-foundation/moonshot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiverify_moonshot-0.7.6-py3-none-any.whl.

File metadata

File hashes

Hashes for aiverify_moonshot-0.7.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b78af0b7ea03e212196a886802ccb0f08b4930db12f396546043baf0e4b1e90a
MD5 43fe28559be8bba0113c9bd97a7f9713
BLAKE2b-256 58be88db60c34facbc064bd02ffa8ee6b41404e5cb1e86f11393a9d70d295d2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiverify_moonshot-0.7.6-py3-none-any.whl:

Publisher: pypi-deployment.yaml on aiverify-foundation/moonshot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page