Lightweight prompt injection detection for LLM applications
Project description
[[github_repo_name]]
[[github_repo_description]]
Welcome to your new service
We've created an empty service structure to show you the setup and workflow with Canaveral.
High Level Pipeline
- Load dataset.
- For each prompt in the dataset:
- Generate a response using the LLM.
- Check the response against your safety policy (e.g. forbidden words, length checks, classification models).
- Store and record whether the response is safe or not (along with metadata such as reason, severity score, etc.).
- Aggregate results and produce a report.
Directory Structure
The top level directory of your repository should be set up like this:
README.md: this file contains a textual description of the repository..circleci/: this directory contains CircleCI'sconfig.ymlfile.hooks/: this directory, if present, can contain ad hoc scripts that customize your build.package/: add yourDockerfileunderpackage/docker/to build a docker image. (Note: You can refer to files and folders directly in yourDockerfilebecause all files and folders underservices/will be copied into the same folder as theDockerfileduring build.)services/: this directory should have a subdirectory for eachservice, e.g.services/my-service/. Each subdirectory (often there is only one) would contain the definition (source and tests) for the service.blueprint.json: this file, if present, contains instructions for Canaveral to deploy the service.
Build
Canaveral uses CircleCI for building, packaging, and alerting its Deployment Engine. Your repository should have been registered with CircleCI when it was provisioned. Here are some additional steps you should follow to ensure proper builds:
Ensure .circleci/config.yml has the correct variables (docker image only)
- Specify your preferred
CANAVERAL_BUILD_SYSTEM(default is noop) - Specify your preferred
CANAVERAL_PACKAGE_TOOLS(use "docker" if deploying a docker image, use "noop" if no packaging is needed) - [OPTIONAL] Specify the target
DOCKERFILE_NAMEto use (default is Dockerfile)
You'll be able to monitor the build at circleci.canaveral-corp.us-west-2.aws
Deployment
To use Canaveral for deployment, blueprint.json should be placed at the top level of the repo. Spec for the blueprint can be found at Canaveral Blueprint Spec.
Questions, issues or suggestions? Reach us at https://nutanix.slack.com/messages/canaveral-onboarding/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompt_injection_defense-0.1.0.tar.gz.
File metadata
- Download URL: prompt_injection_defense-0.1.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05c4a66862b1525f57c674e2b07af3fe80fecbcc3ac5001eb73a53d521fac52d
|
|
| MD5 |
c20b01ffaee68e09602c87af6744dbe8
|
|
| BLAKE2b-256 |
9b10ee55e996ec279012f23d65e2153efb780f9e7f74e5d9bf20cd566d5f60ae
|
File details
Details for the file prompt_injection_defense-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prompt_injection_defense-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2887d11ee43a0ae1453e04856718add4f756929b5c94408682e9e80cde336d78
|
|
| MD5 |
2d0602e9a305ab1370e3035202e077cf
|
|
| BLAKE2b-256 |
c8641dacf8d626298f3cf230c909ba0be1f9cc07da9742a9a7f70a04935910cc
|