Skip to content

Commit

Permalink
add code structs
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwei37 committed Jun 5, 2023
1 parent 19b13b7 commit 4ebb3ba
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 18 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Project Status: Active](https://img.shields.io/badge/Project%20Status-Active-brightgreen)

Prompt injection is one of the major safety concerns of LLMs like ChatGPT。

This repository serves as a comprehensive resource on the study and practice of prompt-injection attacks, defenses, and interesting examples. It contains a collection of examples, case studies, and detailed notes aimed at researchers, students, and security professionals interested in this topic.

本仓库是关于提示词注入攻防及其有趣示例的收集资源。
Expand All @@ -10,22 +12,19 @@ This repository serves as a comprehensive resource on the study and practice of

In this repository, you'll find:

### **📖 Introduction**

This section presents basic concepts and background knowledge on prompt-injection attacks, defenses, and interesting examples. It also contains some review materials.

这部分介绍了提示词注入攻防及其有趣示例的基本概念和背景知识,也包含一些综述材料。
### **📖 Introductions and Documents**

- [**提示词注入简介 Introduction to Prompt-Injection**](./introductions/intro.md)
- [**提示词反向工程 Prompt Reverse Engineering**](./introductions/reverse.md)
- [**提示词攻击 Prompt Attacks**](./introductions/attack.md)
- [**提示词防御 Prompt Defense**](./introductions/defense.md)
这部分介绍了提示词注入攻防及其有趣示例的基本概念和背景知识,也包含一些完整的示例。

### **🔧 Prompt Reverse Engineering**
- [**提示词对抗简介**](./introductions/intro.md)
- [**Example: Copilot Reverse Engineering**](reverse/copilot.md)

This section provides detailed steps and examples of prompt reverse engineering, including the techniques and tools used.
### **📝 Prompt Collections**

- [**Example: Copilot Reverse Engineering**](reverse/copilot.md)
- [**提示词逆向工程的对应提示词 Prompt Reverse Engineering prompts**](reverse/README.md)
- [**提示词防御的对应提示词 Prompt Defense prompts**](defense/README.md)
- [**提示词攻击的对应提示词 Prompt Attacks prompts**](attack/README.md)
- [**提示词防御的对应提示词 Prompt Defense prompts**](defense/README.md)

### **🔗 相关资源 Related Resources**

Expand Down
1 change: 1 addition & 0 deletions defense/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Prompt Defense prompts
1 change: 1 addition & 0 deletions documents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# documents and examples
File renamed without changes.
12 changes: 6 additions & 6 deletions introductions/intro.md → documents/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@

当您正在构建 LL 型模型时,非常重要的是保护免受提示攻击,这些攻击可能会绕过安全护栏并违反模型的指导原则。我们将在下面介绍此类示例。请注意,为了解决这里记录的某些问题,OpenAI 已经实现了更健壮的模型。在 2023 年 5月,对于 GPT-3.5 或 GPT4 而言,下面的大多数提示攻击的示例不再有效,但依然可以作为一个大致的参考案例,可供学习对应的思路。

> 完整的中文版本指南和更丰富的参考资料在 Github 和 Gitee 中,自动持续翻译更新:
> 🐙 关于提示词工程(prompt)的指南、论文、讲座、笔记本和资源大全
>
> - <https://github.com/yunwei37/Prompt-Engineering-Guide-zh-CN>
> - <https://gitee.com/yunwei37/Prompt-Engineering-Guide-zh-CN>
翻译和修改自:

<!-- TOC -->

Expand Down Expand Up @@ -301,4 +297,8 @@ Riley 提出的另一个[防御方法](https://twitter.com/goodside/status/15694
- [机器生成的文本:威胁模型和检测方法的全面调查](https://arxiv.org/abs/2210.07321) (2022年10月)
- [针对GPT-3的提示注入攻击](https://simonwillison.net/2022/Sep/12/prompt-injection/) (2022年9月)

> - 来源:<https://github.com/yunwei37/Awesome-Prompt-Engineering-ZH-CN>
> 完整的中文版本指南和更丰富的参考资料在 Github 和 Gitee 中,自动持续翻译更新:
> 🐙 关于提示词工程(prompt)的指南、论文、讲座、笔记本和资源大全
>
> - <https://github.com/yunwei37/Prompt-Engineering-Guide-zh-CN>
> - <https://gitee.com/yunwei37/Prompt-Engineering-Guide-zh-CN>
1 change: 1 addition & 0 deletions injections/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Prompt Injections prompts
1 change: 1 addition & 0 deletions jailbreak/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Jailbreak prompts
1 change: 1 addition & 0 deletions reverse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Reverse engineering prompts

0 comments on commit 4ebb3ba

Please sign in to comment.