LogoAISecKit
icon of StruQ

StruQ

Official implementation of StruQ, which defends against prompt injection attacks using structured queries.

Introduction

StruQ Overview

StruQ is an innovative solution designed to defend against prompt injection attacks targeting large language models (LLMs). It employs a structured query approach that separates trusted prompts from user-provided data, effectively mitigating manipulation risks.

Key Features
  • Structured Queries: Enables a clear distinction between prompts and data, enhancing security.
  • Fine-Tuning Strategy: Trains LLMs to ignore potentially harmful instructions embedded within user data.
  • Enhanced Model Robustness: Significantly improves resistance to prompt injection attacks without sacrificing performance utility.
Benefits
  • Security: Protects applications from the prevalent threat of prompt injection attacks.
  • Usability: Retains high utility for applications leveraging LLM capabilities.
  • Flexibility: Accommodates various implementations through its structured framework.
Highlights
  • The system includes a secure front-end for formatting queries and a specially trained LLM for optimal output generation.
  • Users can easily clone the repository and set up the environment for training and testing models.

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates