Contribute new test - base64_injection! #19
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This pull request introduces a new test, base64_injection. The purpose of this test is to enhance the robustness of LLMs by evaluating their response to encoded prompt injections. This test specifically addresses the scenario where prompts are encoded as base64 strings, which can be a potential vector for security vulnerabilities if not properly handled by the model.
Changes
Added Dependencies
fastparquet: This library has been added to efficiently handle reading from the .parquet file containing our prompt injection dataset. I updated setup.py as a result to ensure seamless integration and deployment.
Impact
The introduction of the base64_injection test is expected to significantly improve the security posture of our LLMs by providing a systematic approach to detect and mitigate prompt injection attacks. This will contribute to the overall reliability and trustworthiness of our models in production environments.
Testing
The new test has been integrated into our existing test suite and has been validated for correctness and performance impact. Detailed test results and logs can be found attached to this pull request.