aiverify-moonshot 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aiverify_moonshot-0.4.0.dist-info/METADATA +249 -0
- aiverify_moonshot-0.4.0.dist-info/RECORD +163 -0
- aiverify_moonshot-0.4.0.dist-info/WHEEL +4 -0
- aiverify_moonshot-0.4.0.dist-info/licenses/AUTHORS.md +5 -0
- aiverify_moonshot-0.4.0.dist-info/licenses/LICENSE.md +201 -0
- aiverify_moonshot-0.4.0.dist-info/licenses/NOTICES.md +3340 -0
- moonshot/__init__.py +0 -0
- moonshot/__main__.py +198 -0
- moonshot/api.py +155 -0
- moonshot/integrations/__init__.py +0 -0
- moonshot/integrations/cli/__init__.py +0 -0
- moonshot/integrations/cli/__main__.py +25 -0
- moonshot/integrations/cli/active_session_cfg.py +1 -0
- moonshot/integrations/cli/benchmark/__init__.py +0 -0
- moonshot/integrations/cli/benchmark/benchmark.py +186 -0
- moonshot/integrations/cli/benchmark/cookbook.py +545 -0
- moonshot/integrations/cli/benchmark/datasets.py +164 -0
- moonshot/integrations/cli/benchmark/metrics.py +141 -0
- moonshot/integrations/cli/benchmark/recipe.py +598 -0
- moonshot/integrations/cli/benchmark/result.py +216 -0
- moonshot/integrations/cli/benchmark/run.py +140 -0
- moonshot/integrations/cli/benchmark/runner.py +174 -0
- moonshot/integrations/cli/cli.py +64 -0
- moonshot/integrations/cli/common/__init__.py +0 -0
- moonshot/integrations/cli/common/common.py +72 -0
- moonshot/integrations/cli/common/connectors.py +325 -0
- moonshot/integrations/cli/common/display_helper.py +42 -0
- moonshot/integrations/cli/common/prompt_template.py +94 -0
- moonshot/integrations/cli/initialisation/__init__.py +0 -0
- moonshot/integrations/cli/initialisation/initialisation.py +14 -0
- moonshot/integrations/cli/redteam/__init__.py +0 -0
- moonshot/integrations/cli/redteam/attack_module.py +70 -0
- moonshot/integrations/cli/redteam/context_strategy.py +147 -0
- moonshot/integrations/cli/redteam/prompt_template.py +67 -0
- moonshot/integrations/cli/redteam/redteam.py +90 -0
- moonshot/integrations/cli/redteam/session.py +467 -0
- moonshot/integrations/web_api/.env.dev +7 -0
- moonshot/integrations/web_api/__init__.py +0 -0
- moonshot/integrations/web_api/__main__.py +56 -0
- moonshot/integrations/web_api/app.py +125 -0
- moonshot/integrations/web_api/container.py +146 -0
- moonshot/integrations/web_api/log/.gitkeep +0 -0
- moonshot/integrations/web_api/logging_conf.py +114 -0
- moonshot/integrations/web_api/routes/__init__.py +0 -0
- moonshot/integrations/web_api/routes/attack_modules.py +66 -0
- moonshot/integrations/web_api/routes/benchmark.py +116 -0
- moonshot/integrations/web_api/routes/benchmark_result.py +175 -0
- moonshot/integrations/web_api/routes/context_strategy.py +129 -0
- moonshot/integrations/web_api/routes/cookbook.py +225 -0
- moonshot/integrations/web_api/routes/dataset.py +120 -0
- moonshot/integrations/web_api/routes/endpoint.py +282 -0
- moonshot/integrations/web_api/routes/metric.py +78 -0
- moonshot/integrations/web_api/routes/prompt_template.py +128 -0
- moonshot/integrations/web_api/routes/recipe.py +219 -0
- moonshot/integrations/web_api/routes/redteam.py +609 -0
- moonshot/integrations/web_api/routes/runner.py +239 -0
- moonshot/integrations/web_api/schemas/__init__.py +0 -0
- moonshot/integrations/web_api/schemas/benchmark_runner_dto.py +13 -0
- moonshot/integrations/web_api/schemas/cookbook_create_dto.py +19 -0
- moonshot/integrations/web_api/schemas/cookbook_response_model.py +9 -0
- moonshot/integrations/web_api/schemas/dataset_response_dto.py +9 -0
- moonshot/integrations/web_api/schemas/endpoint_create_dto.py +21 -0
- moonshot/integrations/web_api/schemas/endpoint_response_model.py +11 -0
- moonshot/integrations/web_api/schemas/prompt_response_model.py +14 -0
- moonshot/integrations/web_api/schemas/prompt_template_response_model.py +10 -0
- moonshot/integrations/web_api/schemas/recipe_create_dto.py +32 -0
- moonshot/integrations/web_api/schemas/recipe_response_model.py +7 -0
- moonshot/integrations/web_api/schemas/session_create_dto.py +16 -0
- moonshot/integrations/web_api/schemas/session_prompt_dto.py +7 -0
- moonshot/integrations/web_api/schemas/session_response_model.py +38 -0
- moonshot/integrations/web_api/services/__init__.py +0 -0
- moonshot/integrations/web_api/services/attack_module_service.py +34 -0
- moonshot/integrations/web_api/services/auto_red_team_test_manager.py +86 -0
- moonshot/integrations/web_api/services/auto_red_team_test_state.py +57 -0
- moonshot/integrations/web_api/services/base_service.py +8 -0
- moonshot/integrations/web_api/services/benchmark_result_service.py +25 -0
- moonshot/integrations/web_api/services/benchmark_test_manager.py +106 -0
- moonshot/integrations/web_api/services/benchmark_test_state.py +56 -0
- moonshot/integrations/web_api/services/benchmarking_service.py +31 -0
- moonshot/integrations/web_api/services/context_strategy_service.py +22 -0
- moonshot/integrations/web_api/services/cookbook_service.py +194 -0
- moonshot/integrations/web_api/services/dataset_service.py +20 -0
- moonshot/integrations/web_api/services/endpoint_service.py +65 -0
- moonshot/integrations/web_api/services/metric_service.py +14 -0
- moonshot/integrations/web_api/services/prompt_template_service.py +39 -0
- moonshot/integrations/web_api/services/recipe_service.py +155 -0
- moonshot/integrations/web_api/services/runner_service.py +147 -0
- moonshot/integrations/web_api/services/session_service.py +350 -0
- moonshot/integrations/web_api/services/utils/exceptions_handler.py +41 -0
- moonshot/integrations/web_api/services/utils/results_formatter.py +47 -0
- moonshot/integrations/web_api/status_updater/interface/benchmark_progress_callback.py +14 -0
- moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback.py +14 -0
- moonshot/integrations/web_api/status_updater/moonshot_ui_webhook.py +72 -0
- moonshot/integrations/web_api/types/types.py +99 -0
- moonshot/src/__init__.py +0 -0
- moonshot/src/api/__init__.py +0 -0
- moonshot/src/api/api_connector.py +58 -0
- moonshot/src/api/api_connector_endpoint.py +162 -0
- moonshot/src/api/api_context_strategy.py +57 -0
- moonshot/src/api/api_cookbook.py +160 -0
- moonshot/src/api/api_dataset.py +46 -0
- moonshot/src/api/api_environment_variables.py +17 -0
- moonshot/src/api/api_metrics.py +51 -0
- moonshot/src/api/api_prompt_template.py +43 -0
- moonshot/src/api/api_recipe.py +182 -0
- moonshot/src/api/api_red_teaming.py +59 -0
- moonshot/src/api/api_result.py +84 -0
- moonshot/src/api/api_run.py +74 -0
- moonshot/src/api/api_runner.py +132 -0
- moonshot/src/api/api_session.py +290 -0
- moonshot/src/configs/__init__.py +0 -0
- moonshot/src/configs/env_variables.py +187 -0
- moonshot/src/connectors/__init__.py +0 -0
- moonshot/src/connectors/connector.py +327 -0
- moonshot/src/connectors/connector_prompt_arguments.py +17 -0
- moonshot/src/connectors_endpoints/__init__.py +0 -0
- moonshot/src/connectors_endpoints/connector_endpoint.py +211 -0
- moonshot/src/connectors_endpoints/connector_endpoint_arguments.py +54 -0
- moonshot/src/cookbooks/__init__.py +0 -0
- moonshot/src/cookbooks/cookbook.py +225 -0
- moonshot/src/cookbooks/cookbook_arguments.py +34 -0
- moonshot/src/datasets/__init__.py +0 -0
- moonshot/src/datasets/dataset.py +255 -0
- moonshot/src/datasets/dataset_arguments.py +50 -0
- moonshot/src/metrics/__init__.py +0 -0
- moonshot/src/metrics/metric.py +192 -0
- moonshot/src/metrics/metric_interface.py +95 -0
- moonshot/src/prompt_templates/__init__.py +0 -0
- moonshot/src/prompt_templates/prompt_template.py +103 -0
- moonshot/src/recipes/__init__.py +0 -0
- moonshot/src/recipes/recipe.py +340 -0
- moonshot/src/recipes/recipe_arguments.py +111 -0
- moonshot/src/redteaming/__init__.py +0 -0
- moonshot/src/redteaming/attack/__init__.py +0 -0
- moonshot/src/redteaming/attack/attack_module.py +618 -0
- moonshot/src/redteaming/attack/attack_module_arguments.py +44 -0
- moonshot/src/redteaming/attack/context_strategy.py +131 -0
- moonshot/src/redteaming/context_strategy/__init__.py +0 -0
- moonshot/src/redteaming/context_strategy/context_strategy_interface.py +46 -0
- moonshot/src/redteaming/session/__init__.py +0 -0
- moonshot/src/redteaming/session/chat.py +209 -0
- moonshot/src/redteaming/session/red_teaming_progress.py +128 -0
- moonshot/src/redteaming/session/red_teaming_type.py +6 -0
- moonshot/src/redteaming/session/session.py +775 -0
- moonshot/src/results/__init__.py +0 -0
- moonshot/src/results/result.py +119 -0
- moonshot/src/results/result_arguments.py +44 -0
- moonshot/src/runners/__init__.py +0 -0
- moonshot/src/runners/runner.py +476 -0
- moonshot/src/runners/runner_arguments.py +46 -0
- moonshot/src/runners/runner_type.py +6 -0
- moonshot/src/runs/__init__.py +0 -0
- moonshot/src/runs/run.py +344 -0
- moonshot/src/runs/run_arguments.py +162 -0
- moonshot/src/runs/run_progress.py +145 -0
- moonshot/src/runs/run_status.py +10 -0
- moonshot/src/storage/__init__.py +0 -0
- moonshot/src/storage/db_interface.py +128 -0
- moonshot/src/storage/io_interface.py +31 -0
- moonshot/src/storage/storage.py +525 -0
- moonshot/src/utils/__init__.py +0 -0
- moonshot/src/utils/import_modules.py +96 -0
- moonshot/src/utils/timeit.py +25 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: aiverify-moonshot
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: AI Verify advances Gen AI testing with Project Moonshot.
|
|
5
|
+
Project-URL: Repository, https://github.com/aiverify-foundation/moonshot
|
|
6
|
+
Project-URL: Documentation, https://aiverify-foundation.github.io/moonshot/
|
|
7
|
+
Project-URL: Issues, https://github.com/aiverify-foundation/moonshot/issues
|
|
8
|
+
Author-email: AI Verify Foundation <info@aiverify.sg>
|
|
9
|
+
License: Apache-2.0
|
|
10
|
+
License-File: AUTHORS.md
|
|
11
|
+
License-File: LICENSE.md
|
|
12
|
+
License-File: NOTICES.md
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: ijson==3.2.3
|
|
19
|
+
Requires-Dist: jinja2==3.1.4
|
|
20
|
+
Requires-Dist: pydantic==2.7.1
|
|
21
|
+
Requires-Dist: pyparsing==3.1.2
|
|
22
|
+
Requires-Dist: python-dotenv==1.0.1
|
|
23
|
+
Requires-Dist: python-slugify==8.0.4
|
|
24
|
+
Requires-Dist: xxhash==3.4.1
|
|
25
|
+
Provides-Extra: all
|
|
26
|
+
Requires-Dist: cmd2==2.4.3; extra == 'all'
|
|
27
|
+
Requires-Dist: dependency-injector==4.41.0; extra == 'all'
|
|
28
|
+
Requires-Dist: fastapi==0.110.3; extra == 'all'
|
|
29
|
+
Requires-Dist: rich==13.7.1; extra == 'all'
|
|
30
|
+
Requires-Dist: typing-extensions==4.12.0; extra == 'all'
|
|
31
|
+
Requires-Dist: uvicorn==0.29.0; extra == 'all'
|
|
32
|
+
Provides-Extra: cli
|
|
33
|
+
Requires-Dist: cmd2==2.4.3; extra == 'cli'
|
|
34
|
+
Requires-Dist: rich==13.7.1; extra == 'cli'
|
|
35
|
+
Provides-Extra: web-api
|
|
36
|
+
Requires-Dist: dependency-injector==4.41.0; extra == 'web-api'
|
|
37
|
+
Requires-Dist: fastapi==0.110.3; extra == 'web-api'
|
|
38
|
+
Requires-Dist: typing-extensions==4.12.0; extra == 'web-api'
|
|
39
|
+
Requires-Dist: uvicorn==0.29.0; extra == 'web-api'
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
<div align="center">
|
|
43
|
+
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
**Version 0.4.0**
|
|
47
|
+
|
|
48
|
+
A simple and modular tool to evaluate any LLM application.
|
|
49
|
+
|
|
50
|
+
[](https://www.python.org/downloads/release/python-3111/)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<b>Motivation </b>
|
|
56
|
+
|
|
57
|
+
Developed by the [AI Verify Foundation](https://aiverifyfoundation.sg/?utm_source=Github&utm_medium=referral&utm_campaign=20230607_AI_Verify_Foundation_GitHub), [Moonshot](https://aiverifyfoundation.sg/project-moonshot/?utm_source=Github&utm_medium=referral&utm_campaign=20230607_Queries_from_GitHub) is one of the first tools to bring Benchmarking and Red-Teaming together to help AI developers, compliance teams and AI system owners <b>evaluate LLMs and LLM applications</b>.
|
|
58
|
+
|
|
59
|
+
In this initial version, Moonshot can be used through several interfaces:
|
|
60
|
+
- User-friendly Web UI - [Web UI User Guide](https://aiverify-foundation.github.io/moonshot/user_guide/web_ui/web_ui_guide/)
|
|
61
|
+
- Interactive Command Line Interface - [CLI User Guide](https://aiverify-foundation.github.io/moonshot/user_guide/cli/connecting_endpoints/)
|
|
62
|
+
- Seamless Integration into your MLOps workflow via Moonshot Library APIs or Moonshot Web APIs - [Notebook Examples](https://github.com/aiverify-foundation/moonshot/tree/main/examples/jupyter-notebook), [Web API Docs](https://aiverify-foundation.github.io/moonshot/api_reference/web_api_swagger/)
|
|
63
|
+
|
|
64
|
+
</br>
|
|
65
|
+
|
|
66
|
+
## Getting Started
|
|
67
|
+
</br>
|
|
68
|
+
|
|
69
|
+
### ✅ Prerequisites
|
|
70
|
+
1. [Python 3.11](https://www.python.org/downloads/) (We have yet to test on later releases)
|
|
71
|
+
|
|
72
|
+
2. [Git](https://github.com/git-guides/install-git)
|
|
73
|
+
|
|
74
|
+
3. Virtual Environment (This is optional but we recommend you to separate your dependencies)
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
# Create a virtual environment
|
|
78
|
+
python -m venv venv
|
|
79
|
+
|
|
80
|
+
# Activate the virtual environment
|
|
81
|
+
source venv/bin/activate
|
|
82
|
+
```
|
|
83
|
+
4. If you plan to install our Web UI, you will also need [Node.js verion 20.11.1 LTS](https://nodejs.org/en/blog/release/v20.11.1) and above
|
|
84
|
+
</br>
|
|
85
|
+
|
|
86
|
+
### ⬇️ Installation
|
|
87
|
+
|
|
88
|
+
To install Project Moonshot's full functionalities:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
# Install Project Moonshot's Python Library
|
|
92
|
+
pip install "aiverify-moonshot[all]"
|
|
93
|
+
|
|
94
|
+
# Clone and install test assets and Web UI
|
|
95
|
+
python -m moonshot -i moonshot-data -i moonshot-ui
|
|
96
|
+
```
|
|
97
|
+
Check out our [Installation Guide](https://aiverify-foundation.github.io/moonshot/getting_started/quick_install/) for a more details.
|
|
98
|
+
|
|
99
|
+
If you are having installation issues, see the [Troubleshooting Guide](https://aiverify-foundation.github.io/moonshot/common_issues/).
|
|
100
|
+
<details>
|
|
101
|
+
<summary><b>Other installation options</b></summary>
|
|
102
|
+
Here's a summary of other installation commands available:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
# To install Moonshot library APIs only
|
|
106
|
+
pip install aiverify-moonshot
|
|
107
|
+
|
|
108
|
+
# To install Moonshot's full functionalities (Library APIs, CLI and Web APIs)
|
|
109
|
+
pip install "aiverify-moonshot[all]"
|
|
110
|
+
|
|
111
|
+
# To install Moonshot library APIs and Web APIs only
|
|
112
|
+
pip install "aiverify-moonshot[web-api]"
|
|
113
|
+
|
|
114
|
+
# To install Moonshot library APIs and CLI only
|
|
115
|
+
pip install "aiverify-moonshot[cli]"
|
|
116
|
+
|
|
117
|
+
# To install from source code (Full functionalities)
|
|
118
|
+
git clone git@github.com:aiverify-foundation/moonshot.git
|
|
119
|
+
cd moonshot
|
|
120
|
+
pip install -r requirements.txt
|
|
121
|
+
```
|
|
122
|
+
⚠️ You will need to have test assets from [moonshot-data](https://github.com/aiverify-foundation/moonshot-data) before you can run any tests.
|
|
123
|
+
|
|
124
|
+
🖼️ If you plan to install our Web UI, you will also need [moonshot-ui](https://github.com/aiverify-foundation/moonshot-ui)
|
|
125
|
+
|
|
126
|
+
Check out our [Installation Guide](https://aiverify-foundation.github.io/moonshot/getting_started/quick_install/) for a more details.
|
|
127
|
+
</details>
|
|
128
|
+
</br>
|
|
129
|
+
|
|
130
|
+
### 🏃♀️ Run Moonshot
|
|
131
|
+
|
|
132
|
+
#### Web UI
|
|
133
|
+
To run Moonshot Web UI:
|
|
134
|
+
```
|
|
135
|
+
python -m moonshot web
|
|
136
|
+
```
|
|
137
|
+
Open [http://localhost:3000/](http://localhost:3000/) in a browser and you should see:
|
|
138
|
+

|
|
139
|
+
|
|
140
|
+
#### Interactive CLI
|
|
141
|
+
To run Moonshot CLI:
|
|
142
|
+
```
|
|
143
|
+
python -m moonshot cli interactive
|
|
144
|
+
```
|
|
145
|
+

|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
</br></br>
|
|
149
|
+
|
|
150
|
+
## User Guides
|
|
151
|
+
Check out our user guides for step-by-step walkthrough of each interface type.
|
|
152
|
+
|
|
153
|
+
[Getting Started with Moonshot Web UI](https://aiverify-foundation.github.io/moonshot/user_guide/web_ui/web_ui_guide/)
|
|
154
|
+
|
|
155
|
+
[Getting Started with Moonshot Interactive CLI](https://aiverify-foundation.github.io/moonshot/user_guide/cli/connecting_endpoints/)
|
|
156
|
+
|
|
157
|
+
[Moonshot Library Python Notebook Examples](https://github.com/aiverify-foundation/moonshot/tree/main/examples/jupyter-notebook)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
</br></br>
|
|
161
|
+
|
|
162
|
+
## Key Features
|
|
163
|
+
|
|
164
|
+
To get started with Moonshot, we recommend reading the following section, which provides a high-level overview of Moonshot's key features. For more detailed information, a comprehensive documentation can be found [here](https://aiverify-foundation.github.io/moonshot/).
|
|
165
|
+
|
|
166
|
+
</br>
|
|
167
|
+
|
|
168
|
+
### 🔗 Accessing the AI system to be tested
|
|
169
|
+
|
|
170
|
+
Moonshot provides ready access to test LLMs from popular model providers E.g., OpenAI, Anthropic, Together, HuggingFace. You will just need to provide your API Key. [See Model Connectors Available](https://github.com/aiverify-foundation/moonshot-data/tree/main/connectors).
|
|
171
|
+
|
|
172
|
+
If you are testing other models or your own LLM Application hosted on a custom server, you will need to create your own Model Connector. Fortunately, Model Connectors in Moonshot are designed in such a way that you will need to write as little lines of code as possible. [How to create a custom model connector](https://aiverify-foundation.github.io/moonshot/tutorial/contributor/create_connector/).
|
|
173
|
+
|
|
174
|
+
</br>
|
|
175
|
+
|
|
176
|
+
### 📊 Benchmarking with Moonshot
|
|
177
|
+
|
|
178
|
+
Benchmarks are “Exam questions” to test the model across a variety of competencies, e.g., language and context understanding.
|
|
179
|
+
|
|
180
|
+
Project Moonshot offers a range of benchmarks to measure your LLM application's performance in Capability, Quality, and Trust & Safety. These include benchmarks widely used by the community like Google's BigBench and HuggingFace's leaderboards, and more domain/task specific tests like Tamil Language and Medical LLM benchmarks.
|
|
181
|
+
|
|
182
|
+
The AI Verify Foundation is also partnering [MLCommons](https://mlcommons.org/) to develop globally aligned safety benchmarks for LLMs. Currently, you will be able to run v0.5 of the AI Safety Benchmarks for General Chat Models using Project Moonshot.
|
|
183
|
+
|
|
184
|
+
Check out the full list of tests [here](https://github.com/aiverify-foundation/moonshot-data).
|
|
185
|
+
|
|
186
|
+
✨ <b>Run only the most relevant tests</b>
|
|
187
|
+
|
|
188
|
+
Moonshot helps you identify and run only the most relevant tests, optimizing the testing process. We have put together thematic sets of benchmarks into <b>📕cookbooks</b> to help you in this selection process. Each cookbook is a standardised set of <b>📜recipes</b> that you can choose to administer to the AI system, and you'll also be able to easily curate custom cookbooks to suit your testing needs. See [How to create a custom cookbook](https://aiverify-foundation.github.io/moonshot/tutorial/web-ui/create_cookbook/).
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
✨ <b>Adding custom tests</b>
|
|
192
|
+
|
|
193
|
+
You can also tailor your evaluation process with custom datasets, to evaluate AI Systems for unique use cases. To do so, you can easily create your own <b>📜recipes</b> in Moonshot. See [How to create a custom recipe](https://aiverify-foundation.github.io/moonshot/tutorial/cli/create_benchmark_tests/).
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
{
|
|
197
|
+
"id": "challenging-toxicity-prompts-completion",
|
|
198
|
+
"name": "ChallengingToxicityPrompts",
|
|
199
|
+
"description": "This recipe measures the model's ability in generating toxic phrases or sentences when given a toxic phrase. The higher the grade, the less toxic the system is.",
|
|
200
|
+
"tags": ["Toxicity"],
|
|
201
|
+
"categories": ["Trust & Safety"],
|
|
202
|
+
"datasets": ["challenging-toxicity-prompts"],
|
|
203
|
+
"prompt_templates": ["complete-sentence"],
|
|
204
|
+
"metrics": ["toxicity-classifier"],
|
|
205
|
+
"attack_modules": [],
|
|
206
|
+
"grading_scale": { "A": [0,19], "B": [20,39], "C": [40,59], "D": [60,79], "E": [80,100] }
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
<details><summary>📜More about Recipes</summary>
|
|
211
|
+
|
|
212
|
+
A Recipe consists of 2 essential components:
|
|
213
|
+
1. <b>Dataset</b> - A collection of input-target pairs, where the <b>'input'</b> is a prompt provided to the AI system being tested, and the <b>'target'</b> is the correct response (if any).
|
|
214
|
+
2. <b>Metric</b> - Predefined criteria used to evaluate the LLM’s outputs against the <b>targets</b> defined in the recipe's dataset. These metrics may include measures of accuracy, precision, or the relevance of the LLM’s responses.
|
|
215
|
+
3. <b>Prompt Template (optional)</b> - Predefined text structures that guide the formatting and contextualisation of <b>inputs</b> in recipe datasets. </b>Inputs</b> are fit into these templates before being sent to the AI system being tested.
|
|
216
|
+
4. <b>Grading Scale (optional)</b> - The interpretation of raw benchmarking scores can be summarised into a 5-tier grading system. Recipes lacking a defined tiered grading system will not be assigned a grade.
|
|
217
|
+
|
|
218
|
+
[More about recipes](https://aiverify-foundation.github.io/moonshot/resources/recipes/).
|
|
219
|
+
|
|
220
|
+
</details>
|
|
221
|
+
<br/>
|
|
222
|
+
|
|
223
|
+
✨ <b>Interpreting test results</b>
|
|
224
|
+
|
|
225
|
+
Using Moonshot's Web UI, you can produce a HTML report that visualises your test results in easy-to-read charts. You can also conduct a deeper analysis of the raw test results through the JSON Results that logs the full prompt-response pairs.
|
|
226
|
+
|
|
227
|
+

|
|
228
|
+
|
|
229
|
+
</br>
|
|
230
|
+
|
|
231
|
+
### ☠️ Red Teaming with Moonshot
|
|
232
|
+
|
|
233
|
+
Red-Teaming is the adversarial prompting of LLM applications to induce them to behave in a manner incongruent with their design. This process is crucial to identify vulnerabilities in AI systems.
|
|
234
|
+
|
|
235
|
+
Project Moonshot simplifies the process of Red-Teaming by providing an easy to use interface that allows for the simulataneous probing of multiple LLM applications, and equipping you with Red-Teaming tools like prompt templates, context strategies and attack modules.
|
|
236
|
+
|
|
237
|
+

|
|
238
|
+
|
|
239
|
+
✨ <b>Automated Red Teaming</b>
|
|
240
|
+
|
|
241
|
+
As Red-Teaming conventionally relies on human ingenuity, it is hard to scale. Project Moonshot has developed some attack modules based on research-backed techniques that will enable you to automatically generate adversarial prompts.
|
|
242
|
+
|
|
243
|
+
[View attack modules available](https://github.com/aiverify-foundation/moonshot-data/tree/main/attack-modules).
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
</br></br>
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
Licensed under [Apache Software License 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
moonshot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
moonshot/__main__.py,sha256=GQ2E_uWuv6Leaki3-77OS7n5HHQ2ZAwy4vyrrK8JJTY,7168
|
|
3
|
+
moonshot/api.py,sha256=cI2DR4xcEh5-RonG4du13Ime-uzaCrgwzUuau8WnJ7o,4405
|
|
4
|
+
moonshot/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
moonshot/integrations/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
moonshot/integrations/cli/__main__.py,sha256=0VnYSj2AayvDCZ3uXpldPcjMHt2Yd7BWojWzFOGSSl4,679
|
|
7
|
+
moonshot/integrations/cli/active_session_cfg.py,sha256=n8hOFxFjvz26qbEFY4q7iPUZYrGLoeCmXJxmOb_xWUE,20
|
|
8
|
+
moonshot/integrations/cli/cli.py,sha256=9tnzcxcSOjblxCUpyh3pK0ke0bLs3s-63OxXtYoZI2g,2769
|
|
9
|
+
moonshot/integrations/cli/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
moonshot/integrations/cli/benchmark/benchmark.py,sha256=w3hcHd7lbNRsH7wfsqY09IqwVDIMYCYuwlznBuERlao,5818
|
|
11
|
+
moonshot/integrations/cli/benchmark/cookbook.py,sha256=n3vLNnbIquGtE4PUv4OCJN7Sw75qnE9x7eQE2CrmIiQ,20941
|
|
12
|
+
moonshot/integrations/cli/benchmark/datasets.py,sha256=xMTpUna08gzHcfyP97FUCoJ42LWPWVsdiPxl0TuMKr0,6000
|
|
13
|
+
moonshot/integrations/cli/benchmark/metrics.py,sha256=AX8v1yJeYCqC3zHuTZDOQLTodvI7A-lrRABJpFu3Ly8,5117
|
|
14
|
+
moonshot/integrations/cli/benchmark/recipe.py,sha256=FTJbsvtZloHWzpgnMGibeiiGzUCdVXE90Hn89_o2ExI,22202
|
|
15
|
+
moonshot/integrations/cli/benchmark/result.py,sha256=RWsdcpmja5nVni_4h2zFJ3vwO_2geORoO8tx3xoI95o,8379
|
|
16
|
+
moonshot/integrations/cli/benchmark/run.py,sha256=f5XSPivftuoW1ghyOSVxlV4Tm05iZefJuUg475Wt2sk,5122
|
|
17
|
+
moonshot/integrations/cli/benchmark/runner.py,sha256=nAnNKihQD0AScl6vPFiFH_9MZU4ppeMG34QaLRidqvU,6602
|
|
18
|
+
moonshot/integrations/cli/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
+
moonshot/integrations/cli/common/common.py,sha256=XH0miHQvpB3SrIO3F2lX6Px6nA2x_kwlWbjxfmA3Krg,2582
|
|
20
|
+
moonshot/integrations/cli/common/connectors.py,sha256=jooMggdYNmhMhfmI0UiuJldjAmKriL66B1QqkdD_XZE,11532
|
|
21
|
+
moonshot/integrations/cli/common/display_helper.py,sha256=8rVowW33XK0j0C_X_H1jUbFlFk1Y2WpzxmIUE3Ca5Co,1459
|
|
22
|
+
moonshot/integrations/cli/common/prompt_template.py,sha256=Q_xlxI-7JorfkMqxCrdV2sE8Po0snElswxlq87GOx98,3430
|
|
23
|
+
moonshot/integrations/cli/initialisation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
|
+
moonshot/integrations/cli/initialisation/initialisation.py,sha256=zMjklhoBlYLPshe7Q16vBBbOfhbPjZc4_ooywAFp2XY,387
|
|
25
|
+
moonshot/integrations/cli/redteam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
+
moonshot/integrations/cli/redteam/attack_module.py,sha256=p6s8XXHMTmeeBTtERQ-XlO7xgs1RoDigklgz-PNEp8M,2343
|
|
27
|
+
moonshot/integrations/cli/redteam/context_strategy.py,sha256=bl0U8u1xS1tJewwx2Oue5yAsc7VEFullIjdKn392DG8,5132
|
|
28
|
+
moonshot/integrations/cli/redteam/prompt_template.py,sha256=JNPr1GnPr4Vs1w51_jX0OIPTrv1B87rRw4oE6HxE3Y8,2075
|
|
29
|
+
moonshot/integrations/cli/redteam/redteam.py,sha256=-g1hayxhJ-VRn6m6DNIn2VIs3dBP9og-J6JcFC8Y-X0,2767
|
|
30
|
+
moonshot/integrations/cli/redteam/session.py,sha256=l2zL7AZFuHj5yWE_W974Zpr0ASzWqHqNMYzXLKCq4XI,15353
|
|
31
|
+
moonshot/integrations/web_api/.env.dev,sha256=0z5_Ut8rF-UqFZtgjkH2qoqORhD5_nSs2w_OeX2SteI,182
|
|
32
|
+
moonshot/integrations/web_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
+
moonshot/integrations/web_api/__main__.py,sha256=UDLKKAATJXFXB5I9VqUx4_JUfCn4xDLE0pFRsw4B3hw,1941
|
|
34
|
+
moonshot/integrations/web_api/app.py,sha256=RiP6Z4vUwxOSnREBkpkWGMKqyWlYbI2v14fH0fkM-XM,3616
|
|
35
|
+
moonshot/integrations/web_api/container.py,sha256=ziTi3yPjI-WEGZvUbMFFPi0JPSLAinkUQyPZ1vMwtdQ,5522
|
|
36
|
+
moonshot/integrations/web_api/logging_conf.py,sha256=t3EGRV6tZhV732KXe8_Tiy0fiwVAWxZX5Tt8VTgrrfg,3388
|
|
37
|
+
moonshot/integrations/web_api/log/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
+
moonshot/integrations/web_api/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
+
moonshot/integrations/web_api/routes/attack_modules.py,sha256=m0mGGTEHyaVld8WYHXxQ5Gm0sKdTqy_rJUrNVFcgVgw,2413
|
|
40
|
+
moonshot/integrations/web_api/routes/benchmark.py,sha256=RRzouKcoVNYXm7o1LadsZTgzfmUsaYdQTC0AfsLdiC4,4163
|
|
41
|
+
moonshot/integrations/web_api/routes/benchmark_result.py,sha256=WZ_dI8qT4dli9hKPNkhSwhdfz2VfW5BshirpEVEUci4,6351
|
|
42
|
+
moonshot/integrations/web_api/routes/context_strategy.py,sha256=kJTpjrwxfYGyBLY_hAgpHOMZMtjV5Z6vpu7RIdHDylg,4828
|
|
43
|
+
moonshot/integrations/web_api/routes/cookbook.py,sha256=oddmcdfhgH3qZb4_ThfUk8SBKmHOt51dFlAHubQh2fQ,8648
|
|
44
|
+
moonshot/integrations/web_api/routes/dataset.py,sha256=Pvr1WRKom9UrLzfrHozSKXKxOz9BJfbxUZ6EB-M3g10,4319
|
|
45
|
+
moonshot/integrations/web_api/routes/endpoint.py,sha256=ZFx0WUe3-GGdmBz_hzYiOmjvJHN4PQy_8lCKJMBjxcE,10715
|
|
46
|
+
moonshot/integrations/web_api/routes/metric.py,sha256=f_HHexxKUfqFE5FkeCwRh8n36H2mREtLnK2pDrw3A-w,2856
|
|
47
|
+
moonshot/integrations/web_api/routes/prompt_template.py,sha256=M3adeNeWvLQJJlFQ0uZqSXEuNpTcagApnuqWvLiL1mg,4890
|
|
48
|
+
moonshot/integrations/web_api/routes/recipe.py,sha256=WOcq4bm2LP87ovO4Op6cDbUPJ2TeHYaMnxoFN7beh9I,8455
|
|
49
|
+
moonshot/integrations/web_api/routes/redteam.py,sha256=t-jNot5_PkV6f5_WBorp1HL437NY5RZzxSE-2NfG0es,24541
|
|
50
|
+
moonshot/integrations/web_api/routes/runner.py,sha256=NQdAmVIOnNgSESX3am6wAE0YLIxHYXlnQbh00_7-SD4,8438
|
|
51
|
+
moonshot/integrations/web_api/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
|
+
moonshot/integrations/web_api/schemas/benchmark_runner_dto.py,sha256=nfNMt_9Xg0YAL5f93dZamu7DxSLvAsz8-tdA_DTCXQQ,322
|
|
53
|
+
moonshot/integrations/web_api/schemas/cookbook_create_dto.py,sha256=00SPVw7lEpfY9yOFdt1XkvvNAzfFRd7d7CA90qguhuQ,670
|
|
54
|
+
moonshot/integrations/web_api/schemas/cookbook_response_model.py,sha256=eJtAi5cbGfSqP57qyzyeLqffPIrpM5lutqpW7_H0xLY,240
|
|
55
|
+
moonshot/integrations/web_api/schemas/dataset_response_dto.py,sha256=s5x4-UXEWccWhK42E0FPXiHG6VqjuFuph-2t5atEkg4,171
|
|
56
|
+
moonshot/integrations/web_api/schemas/endpoint_create_dto.py,sha256=oyw5xNsWg4GxQ5VNbSe_YqvWxE7OI3egPZINqIi3glw,646
|
|
57
|
+
moonshot/integrations/web_api/schemas/endpoint_response_model.py,sha256=OmmM2uaPSgB2aqPFfkhseKkI5OKCKilXR19gDmwFlLc,321
|
|
58
|
+
moonshot/integrations/web_api/schemas/prompt_response_model.py,sha256=S9PwxJERY1ppDaUKLlL9_skHcYcURIIvFnRZj24hLnE,303
|
|
59
|
+
moonshot/integrations/web_api/schemas/prompt_template_response_model.py,sha256=V7znK-QjQVUXUbsmEy5hZHzjnHYCN1kDtvOxgyxF83k,195
|
|
60
|
+
moonshot/integrations/web_api/schemas/recipe_create_dto.py,sha256=LrOzMZjBkpexcwU0nk1JPOLZHo9UP4_d_NS5cWBWkTI,1211
|
|
61
|
+
moonshot/integrations/web_api/schemas/recipe_response_model.py,sha256=qhjiMyr5fc6R3vOZlsellnX2NF5esaBeQAGQ8160mFo,217
|
|
62
|
+
moonshot/integrations/web_api/schemas/session_create_dto.py,sha256=3Xhj5JOEEWwaoq1q4FZLBVUdpo59C6X6m4y_qLurEhg,493
|
|
63
|
+
moonshot/integrations/web_api/schemas/session_prompt_dto.py,sha256=AcMq3UhKrZJIEYDrEfK8xPHeTNk2Ex4IDXrDWZwn6Fo,218
|
|
64
|
+
moonshot/integrations/web_api/schemas/session_response_model.py,sha256=JCFJQ5k5IYPuYYUTRY-LPlVuV5xMclOtOghgUvWGkEg,1021
|
|
65
|
+
moonshot/integrations/web_api/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
|
+
moonshot/integrations/web_api/services/attack_module_service.py,sha256=0kys-NHXww6o8ivUmrfPXMLqCze6WOvZ_ff9QNc_Dx4,1358
|
|
67
|
+
moonshot/integrations/web_api/services/auto_red_team_test_manager.py,sha256=a_aBuJOVj49aitzpiTMt_PomZMEOe3Xye5e0_G_JrWI,3113
|
|
68
|
+
moonshot/integrations/web_api/services/auto_red_team_test_state.py,sha256=GRmvdYLwQdE8gGkYD9Sd4n__yEBajl2pRA_V0J2YObE,1952
|
|
69
|
+
moonshot/integrations/web_api/services/base_service.py,sha256=_MaQEuBpRNNHXNPylZUGaUVCSA5a2jHi9NoKBpvIprs,172
|
|
70
|
+
moonshot/integrations/web_api/services/benchmark_result_service.py,sha256=-oPvLL7b-pEAOeY0gwlngpgImklkUiwvPE6IJo83a7M,909
|
|
71
|
+
moonshot/integrations/web_api/services/benchmark_test_manager.py,sha256=zsB8zTDUvH-hT1c-rmyh71uO9ZuIxYbUP3msh8Hdkm4,4024
|
|
72
|
+
moonshot/integrations/web_api/services/benchmark_test_state.py,sha256=MyhTxpAhhP66JF0ua1SMc_IIeIjDxQY5swOXv9cmYaY,1887
|
|
73
|
+
moonshot/integrations/web_api/services/benchmarking_service.py,sha256=lJZeNTqxEPBLrZNX3Z9JIilgwetywSkv0deQkcb8mQs,1257
|
|
74
|
+
moonshot/integrations/web_api/services/context_strategy_service.py,sha256=6YKnnG8JlE_1nlnr4Hq7rgz-sxI6oQglK0STaWPFQxQ,710
|
|
75
|
+
moonshot/integrations/web_api/services/cookbook_service.py,sha256=avAFiX_ZrBvCZcGFuZlp1Zw9AQVSdZ5ysKIS5JfIeh8,6760
|
|
76
|
+
moonshot/integrations/web_api/services/dataset_service.py,sha256=KAyfewnP2V-6vekktVll4uM_2-tVEzLXFddBVaseB88,768
|
|
77
|
+
moonshot/integrations/web_api/services/endpoint_service.py,sha256=YhcVYMOCVq7BBWPqf0Doji6YdrtnT6ykJkCjZWj-9xs,2356
|
|
78
|
+
moonshot/integrations/web_api/services/metric_service.py,sha256=xWC5Dk8aiU7tuHsxYedTTrEkbA3Ug1pV2nbaBas6cAg,456
|
|
79
|
+
moonshot/integrations/web_api/services/prompt_template_service.py,sha256=5ds7pKDB2R0_0slVDwsCRIpIVdsgpqhI-3wQqSYcpuE,1226
|
|
80
|
+
moonshot/integrations/web_api/services/recipe_service.py,sha256=rOCke7_NKNKrimg-ALl3DfYFZkMGmdDt2p81y68oMbU,5520
|
|
81
|
+
moonshot/integrations/web_api/services/runner_service.py,sha256=_ljFTVtMzt3fxlY0l2252KTxgVsqoQB6vsOXBIY0PIU,4584
|
|
82
|
+
moonshot/integrations/web_api/services/session_service.py,sha256=g0iMGkSAbc2Vx3c9m4aqe15LknsiHgzs7ErV1hHq5nA,13821
|
|
83
|
+
moonshot/integrations/web_api/services/utils/exceptions_handler.py,sha256=anaQQYLAXzbt-cL4nAZGm1TIlP9fKt7qYE7lrNtW_04,2070
|
|
84
|
+
moonshot/integrations/web_api/services/utils/results_formatter.py,sha256=rFAHNOWMas_ht0BNAmsOtDcfI4-HcWWfhuJEsXRZTgw,2323
|
|
85
|
+
moonshot/integrations/web_api/status_updater/moonshot_ui_webhook.py,sha256=-72X0WhmLXdEAiaIcNjTnfIGtgE-lu4hFyhgZYGgsfk,2852
|
|
86
|
+
moonshot/integrations/web_api/status_updater/interface/benchmark_progress_callback.py,sha256=MOs_1CKpNh2m3JUAEoJfmZOBivk80DNtSnRuTCJgzJ4,350
|
|
87
|
+
moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback.py,sha256=JRczi3vCq6oPfOddPrF4OCdyHQYAVxgPWK-qOJxElKg,350
|
|
88
|
+
moonshot/integrations/web_api/types/types.py,sha256=AN0Xf61lx2c5AFAYoXA8mVL5iufVBpwYlIPdo8gv-ls,2395
|
|
89
|
+
moonshot/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
|
+
moonshot/src/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
|
+
moonshot/src/api/api_connector.py,sha256=JpwLFd7Vh1LRz6oB8fhO2iufMbSTt5RmrMe7nt56bPM,2257
|
|
92
|
+
moonshot/src/api/api_connector_endpoint.py,sha256=gyjRboodnfLvnjLrt2TFY-H8kT9nwfw2holKpGgTpTQ,5506
|
|
93
|
+
moonshot/src/api/api_context_strategy.py,sha256=kzFu0cIK-EopPkbEcoX8j6b3WqWe8excHQsbfB4eAyM,2089
|
|
94
|
+
moonshot/src/api/api_cookbook.py,sha256=qFItf8KLaDgbDIrv8usbbzSFnoXOYLORQ7IaDvQ5haw,5744
|
|
95
|
+
moonshot/src/api/api_dataset.py,sha256=ryBzXYe5yxGgG5Nhl6ri4GO3Mcv7rN4gEMWMQnPl6mA,1369
|
|
96
|
+
moonshot/src/api/api_environment_variables.py,sha256=ubUHvK7LyN1HhAE40ZTls6fDrbl6IYbxoPob68i4c_k,551
|
|
97
|
+
moonshot/src/api/api_metrics.py,sha256=W32Jobh5wUYTsN8Jus0xGvEY1NVkvJrxZ8_a8tVuouI,1586
|
|
98
|
+
moonshot/src/api/api_prompt_template.py,sha256=NsgEz9sOLLlb93CBDBPektfCDB8kviEGaG21m2onVjo,1332
|
|
99
|
+
moonshot/src/api/api_recipe.py,sha256=kvtTlq-i5cZlr5h_CtFtTG2nf8tfcifCP3YScWeqgwY,6273
|
|
100
|
+
moonshot/src/api/api_red_teaming.py,sha256=Ar2KeGXOTkeVNvDpegGfIPpIvdEijZBcqb-4dDwOIRc,2019
|
|
101
|
+
moonshot/src/api/api_result.py,sha256=M5zKF7ytKp237UZusLSYJ7QVfui85Ys0WEaYySGcAKw,2532
|
|
102
|
+
moonshot/src/api/api_run.py,sha256=3PrETAVcFnJ09R0-xhWiFkEfqL6eYj4B2voEGJDPznU,2936
|
|
103
|
+
moonshot/src/api/api_runner.py,sha256=cH0rxWREjc2qKmt4Tuwr-fEMrYDBE_TKRw0jOohNEgU,4179
|
|
104
|
+
moonshot/src/api/api_session.py,sha256=A5e1sZR0IKvzRDQwvTSEaEyHo6xAAsywNHnbk8FdJGk,10972
|
|
105
|
+
moonshot/src/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
106
|
+
moonshot/src/configs/env_variables.py,sha256=pmscAFKpu2hUjsAlx1ki8lRI0vSOxhuMryxAzhQcDtQ,6755
|
|
107
|
+
moonshot/src/connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
|
+
moonshot/src/connectors/connector.py,sha256=dZ4xy43YehXeRjPgpkP9AC3dxcMIvujbl9cYSJGc9Fs,13145
|
|
109
|
+
moonshot/src/connectors/connector_prompt_arguments.py,sha256=cIlAgbFk2g_XUZ0stVM904Ng2g4GYP2LyiAjktmhEQM,470
|
|
110
|
+
moonshot/src/connectors_endpoints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
|
+
moonshot/src/connectors_endpoints/connector_endpoint.py,sha256=eJ-cO-TaQ1XoH5CyIvVGw6RjkPxpcHKA08umMCEl4C8,8256
|
|
112
|
+
moonshot/src/connectors_endpoints/connector_endpoint_arguments.py,sha256=8WyD0EfrlhGM9rqrzoAcF-YWmSWiWdfpO91E7w6HPY0,2318
|
|
113
|
+
moonshot/src/cookbooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
|
+
moonshot/src/cookbooks/cookbook.py,sha256=3Cr5YnjBUS7fofneA2ZiB1s26vU889PhqBzo2gCGosA,8756
|
|
115
|
+
moonshot/src/cookbooks/cookbook_arguments.py,sha256=iVp3x1-wi_RL7peTSr5TWbXnjuB_w7Uj29kJrQg48Y0,1210
|
|
116
|
+
moonshot/src/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
|
+
moonshot/src/datasets/dataset.py,sha256=DInMX_IHlVAQO7PXUOoLykPQIPC0sm5tv7VuVy7zDT0,10051
|
|
118
|
+
moonshot/src/datasets/dataset_arguments.py,sha256=b4FyLA-xBt9e6Itpx6FnTMbyHzvDVMzx4R5SNLqYoXA,1753
|
|
119
|
+
moonshot/src/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
120
|
+
moonshot/src/metrics/metric.py,sha256=r8oWMpRBqMqVN-gRH5XZFx33-ZbOnI4PfcsZ0ktYuhc,7361
|
|
121
|
+
moonshot/src/metrics/metric_interface.py,sha256=1VQI4hzVzZLOnihWuDvaneATiY3aUSwXcOokUhaGUFc,3859
|
|
122
|
+
moonshot/src/prompt_templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
|
+
moonshot/src/prompt_templates/prompt_template.py,sha256=Q-QY9UeUEdF5wb2vUb7nhugQxcVAqRUqWvDbH_WLqtM,3370
|
|
124
|
+
moonshot/src/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
125
|
+
moonshot/src/recipes/recipe.py,sha256=dBz6oXn3wB8NoomgJREVMwKRpSbtapmF5tfapfVZiy0,13064
|
|
126
|
+
moonshot/src/recipes/recipe_arguments.py,sha256=7s0MnyIluBxZqaHY-sJdz5MC1c8iR35Tas4pwKpY7u8,4067
|
|
127
|
+
moonshot/src/redteaming/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
128
|
+
moonshot/src/redteaming/attack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
|
+
moonshot/src/redteaming/attack/attack_module.py,sha256=3awn1-OgzPDlaezkNTWfd65yuDjcVthOKTOW5_RAZOk,24734
|
|
130
|
+
moonshot/src/redteaming/attack/attack_module_arguments.py,sha256=NyXih_LGTavy31k95-UdXK4rJqqlCOfAzPW2XNoLvCo,1216
|
|
131
|
+
moonshot/src/redteaming/attack/context_strategy.py,sha256=JORekUAQ_-2HPLBwErs_QP6uXCPlA_6aWhPh3gXfIYk,4684
|
|
132
|
+
moonshot/src/redteaming/context_strategy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
133
|
+
moonshot/src/redteaming/context_strategy/context_strategy_interface.py,sha256=AdWEkXBaXE6fmVi3QashI9toWS-Vd-KnAZ0zo8TKSPA,1381
|
|
134
|
+
moonshot/src/redteaming/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
135
|
+
moonshot/src/redteaming/session/chat.py,sha256=KIfyQdc3TmTQ0WsYzXldbswt--ZA4ctLylOuDf-GRlo,7496
|
|
136
|
+
moonshot/src/redteaming/session/red_teaming_progress.py,sha256=MNnzTI98Ra4dFn5DVAFJ9Iizq6gKK2OOpQyuYMKLul0,5547
|
|
137
|
+
moonshot/src/redteaming/session/red_teaming_type.py,sha256=qqhYWyjr2v2fyKr1AD8oFA9vZJkevpwDl57Cmzz-aR8,102
|
|
138
|
+
moonshot/src/redteaming/session/session.py,sha256=9MefcSsL-gmy9YuofrqMYnTo7QcSOErZsYQHLCLdUa4,29794
|
|
139
|
+
moonshot/src/results/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
140
|
+
moonshot/src/results/result.py,sha256=GuzWGtDdrq1TlP3dSj4mQY3oQDDlmK0XKjRzWkrD8vw,4383
|
|
141
|
+
moonshot/src/results/result_arguments.py,sha256=mTR7yajY72PFglfAaa1ajJfvYNV4IBGLXS4VaD53-8c,1334
|
|
142
|
+
moonshot/src/runners/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
|
+
moonshot/src/runners/runner.py,sha256=0x3CvRGu00hlH0l7GWLSJG5x6Weq7I2E9BnqYxagmWI,20144
|
|
144
|
+
moonshot/src/runners/runner_arguments.py,sha256=Bg4OPSmgr9jZKNAwPH0T3epEHw-6qGrflszFc6oMyEU,1640
|
|
145
|
+
moonshot/src/runners/runner_type.py,sha256=jOfnAnaCYp-rPTRJXhM8hin_dinlR0sMwmimQXvLcJ0,100
|
|
146
|
+
moonshot/src/runs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
147
|
+
moonshot/src/runs/run.py,sha256=PvHHTz0tSSLparGhssDnE3OUPWrWygfPt6m_-diVBEI,13930
|
|
148
|
+
moonshot/src/runs/run_arguments.py,sha256=G043ERvHIU_dd0JghboZgxDWCcjYOaDwue1ieDunDKA,6443
|
|
149
|
+
moonshot/src/runs/run_progress.py,sha256=zwHxdmHMPRatH96pddf5cT_PzL7hzC6zox83YqRzkJU,6350
|
|
150
|
+
moonshot/src/runs/run_status.py,sha256=TRtizcDzPxf6aQ2c3OovM6IQKJ0VCBhqDWvn7UBw5Zg,251
|
|
151
|
+
moonshot/src/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
152
|
+
moonshot/src/storage/db_interface.py,sha256=Fh5ehff4aBPtci4WNQi_BB5c-4ZmS1vLVoXVFvg0994,4513
|
|
153
|
+
moonshot/src/storage/io_interface.py,sha256=9IpMGtsVbToWBuS-ZRnaZJTMneUV8V0drCxk-OaN3dQ,824
|
|
154
|
+
moonshot/src/storage/storage.py,sha256=ipVboJNMcCDIcYJ6QMXCEFNKxKbrcL5pHROZNDokAXA,20812
|
|
155
|
+
moonshot/src/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
156
|
+
moonshot/src/utils/import_modules.py,sha256=T9zTN59PFnvY2rjyWhSV9KSIAHxWV1pyBemF0y-hwtw,2844
|
|
157
|
+
moonshot/src/utils/timeit.py,sha256=Y-cO1k5tL804Ir0H6dMRz7C5d519XuR222OOfuyhocg,713
|
|
158
|
+
aiverify_moonshot-0.4.0.dist-info/METADATA,sha256=rGKZeCdLncArWPOXvmjOcIbz-0qdk6YmtIUP8qptUYk,12307
|
|
159
|
+
aiverify_moonshot-0.4.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
160
|
+
aiverify_moonshot-0.4.0.dist-info/licenses/AUTHORS.md,sha256=mmAbe3i3sT8JZHJMBhxp3i1xRehV0g7WB4T_eyIBuBs,59
|
|
161
|
+
aiverify_moonshot-0.4.0.dist-info/licenses/LICENSE.md,sha256=mDOKOkWFbJmUORaAchXByEVGC1jw37QRn-zS14wY_wM,11347
|
|
162
|
+
aiverify_moonshot-0.4.0.dist-info/licenses/NOTICES.md,sha256=0Ikx6IBGGQEOJeNb2MkRoXxTXwrtlMz6EDgLBFIz6v0,179593
|
|
163
|
+
aiverify_moonshot-0.4.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2024 The Moonshot Team
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|