Skip to main content

Prompt Pattern Matching Framework for Generative AI

Project description

NOVA: The Prompt Pattern Matching

NOVA Logo

Generative AI systems are rapidly being adopted and deployed across organizations. While they enhance productivity and efficiency, they also expand the attack surface.

How do you detect abusive usage of your system? How do you hunt for malicious prompts? Whether it is identifying jailbreaking attempts, preventing reputational damage, or spotting unexpected behaviors, tracking prompt TTPs can be very useful to track the usage of your AI systems.

That's where NOVA comes in!

🚧 Disclaimer: NOVA is currently in beta. Expect potential bugs, incomplete features, and ongoing improvements. If you identify a bug, please report it here.

NOVA is an open-source prompt pattern matching system combining keyword detection, semantic similarity, and LLM-based evaluation to analyze and detect prompt content.

asciicast

Features

  • 🔍 Keyword Detection: Flag suspicious prompts using predefined keywords or regex.
  • 💬 Semantic Similarity: Identify pattern variations using configurable thresholds.
  • LLM Matching: Create matching rules using natural language evaluated by LLM.

Inspired by YARA syntax, NOVA rules are readable and flexible, ideal for prompt hunting and threat detection.

Anatomy of a NOVA Rule

rule RuleName
{
    meta:
        description = "Rule description"
        author = "Author name"

    keywords:
        $keyword1 = "exact text"
        $keyword2 = /regex pattern/i

    semantics:
        $semantic1 = "semantic pattern" (0.6)

    llm:
        $llm_check = "LLM evaluation prompt" (0.7)

    condition:
        keywords.$keyword1 or semantics.$semantic1 or llm.$llm_check
}

Getting Started

pip install nova-hunting

License

This project is licensed under the MIT License.

Credits

Created and maintained by fr0gger.

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

nova_hunting-0.1.2.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

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

nova_hunting-0.1.2-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file nova_hunting-0.1.2.tar.gz.

File metadata

  • Download URL: nova_hunting-0.1.2.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for nova_hunting-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d85a4bc1b5dbf5b770e369cdce988edcd9d9d0896e3df1322ac278e5dfc5426f
MD5 0db8d51b4d451a4a95b847eba8ad1315
BLAKE2b-256 4daf3687cbe67c01dceed971ab7947bb0f6999c38651ec066dc6b2b5aa6367bb

See more details on using hashes here.

File details

Details for the file nova_hunting-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nova_hunting-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for nova_hunting-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5c892014e20a93bd06b2cd7c62b2a9f6a23522b4073e8a2ee954dab52bb2faf4
MD5 66e5f083044c505b1b9e8f1fea9f0aee
BLAKE2b-256 78efa978e00c67693b740b67757c47bf7c699df13b64ca16a9a4f18f0c0f7e06

See more details on using hashes here.

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