Merge pull request #81 from maximum80/jp-pages
Add Japanese translated files to the jp-pages folderpull/85/head
commit
0db4fce48e
@ -0,0 +1,23 @@
|
||||
import type { AppProps } from 'next/app';
|
||||
import Script from 'next/script';
|
||||
import { Analytics } from '@vercel/analytics/react';
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
return (
|
||||
<>
|
||||
<Script async src="https://www.googletagmanager.com/gtag/js?id=G-ST7R3WQ353"/>
|
||||
<Script>{`
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-ST7R3WQ353');
|
||||
`}
|
||||
</Script>
|
||||
|
||||
<Component {...pageProps} />
|
||||
<Analytics />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default MyApp;
|
@ -0,0 +1,23 @@
|
||||
{
|
||||
"index": "Prompt Engineering",
|
||||
"introduction": "はじめに",
|
||||
"techniques": "テクニック",
|
||||
"applications": "アプリケーション",
|
||||
"models": "モデル",
|
||||
"risks": "リスクと誤用",
|
||||
"papers": "論文",
|
||||
"tools": "ツール",
|
||||
"notebooks": "ノートブック",
|
||||
"datasets": "データセット",
|
||||
"readings": "参考文献",
|
||||
"about": {
|
||||
"title": "About",
|
||||
"type": "page"
|
||||
},
|
||||
"contact": {
|
||||
"title": "Contact ↗",
|
||||
"type": "page",
|
||||
"href": "https://twitter.com/dair_ai",
|
||||
"newWindow": true
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
# プロンプトアプリケーション
|
||||
|
||||
import { Callout } from 'nextra-theme-docs'
|
||||
|
||||
このガイドでは、プロンプトエンジニアリングを使って便利でより高度なタスクを実行するための、高度で興味深い方法について説明します。
|
||||
|
||||
<Callout emoji="⚠️">
|
||||
このセクションは、現在開発が進んでいます。
|
||||
</Callout>
|
@ -0,0 +1,12 @@
|
||||
# データセット
|
||||
#### (名前順にソート(アルファベット順))
|
||||
|
||||
- [Anthropic's Red Team dataset](https://github.com/anthropics/hh-rlhf/tree/master/red-team-attempts), [(paper)](https://arxiv.org/abs/2209.07858)
|
||||
- [Awesome ChatGPT Prompts](https://huggingface.co/datasets/fka/awesome-chatgpt-prompts)
|
||||
- [DiffusionDB](https://github.com/poloclub/diffusiondb)
|
||||
- [Midjourney Prompts](https://huggingface.co/datasets/succinctly/midjourney-prompts)
|
||||
- [P3 - Public Pool of Prompts](https://huggingface.co/datasets/bigscience/P3)
|
||||
- [PartiPrompts](https://parti.research.google)
|
||||
- [Real Toxicity Prompts](https://allenai.org/data/real-toxicity-prompts)
|
||||
- [Stable Diffusion Dataset](https://huggingface.co/datasets/Gustavosta/Stable-Diffusion-Prompts)
|
||||
- [WritingPrompts](https://www.reddit.com/r/WritingPrompts)
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"settings": "LLM設定",
|
||||
"basics": "基本的なプロンプティング",
|
||||
"elements": "プロンプトの要素",
|
||||
"tips": "プロンプトをデザインする一般的なTips",
|
||||
"examples": "プロンプトの例"
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
# プロンプトの要素
|
||||
|
||||
プロンプトエンジニアリングで可能な例やアプリケーションをカバーするにつれて、プロンプトを構成する特定の要素があることに気づくでしょう。
|
||||
|
||||
プロンプトには、以下のいずれかのコンポーネントが含まれることがあります。
|
||||
|
||||
**命令** - モデルに実行してほしい特定のタスクまたは命令
|
||||
|
||||
**文脈** - 外部情報や追加の文脈が含まれる場合があり、モデルをより良い応答に導くことができます。
|
||||
|
||||
**入力データ** - 応答を見つけたい入力または質問
|
||||
|
||||
**出力指示子** - 出力のタイプや形式を示します。
|
||||
|
||||
すべてのコンポーネントが必要なわけではなく、フォーマットは手元のタスクに依存します。次のガイドで具体的な例を取り上げます。
|
@ -0,0 +1,11 @@
|
||||
# LLMの設定
|
||||
|
||||
プロンプトを使用する場合、APIを経由、または直接LLMと対話することになります。いくつかのパラメータを設定することで、プロンプトに異なる結果を得ることができます。
|
||||
|
||||
**Temperature** - 簡潔に言うと、この値が低ければ低いほど、最も確率が高い回答が常に選ばれるため、結果はより決定論的になります。この値を上げると、ランダム性が増し、より多様で創造的なアウトプットが可能になります。つまり、他の回答の可能性のある重みを増やすことになります。応用例としては、事実に基づくQAなどでは、この値を低くして、より事実に基づいた簡潔な回答を促すとよいでしょう。逆に、詩の生成やその他の創造的なタスクでは、temperatureを上げると効果的かもしれません。
|
||||
|
||||
**Top_p** - 同様に、核サンプリングと呼ばれるサンプリング手法であるtop_pでは、モデルが応答を生成する際の決定性をコントロールすることができます。正確で事実に基づいた回答を求めるのであれば、この値を低くしておきます。より多様な回答を求めるのであれば、より高い値にします。
|
||||
|
||||
一般的には、両方ではなく、どちらかを変更することをお勧めします。
|
||||
|
||||
基本的な例から始める前に、あなたの使っているLLMのバージョンによって結果が異なる可能性があることを予めご承知おきください。
|
@ -0,0 +1,107 @@
|
||||
# プロンプトの設計に関する一般的なヒント
|
||||
|
||||
プロンプトを設計する際には以下のことに注意するとよいでしょう。
|
||||
|
||||
### 簡単に始める
|
||||
プロンプトの設計を始める際には、最適な結果を得るために多くの実験が必要な反復的なプロセスであることを念頭に置く必要があります。OpenAIやCohereのようなシンプルなプレイグラウンドから始めると良いでしょう。
|
||||
|
||||
シンプルなプロンプトから始め、結果を向上させるために要素や文脈を追加していくことができます。そのためにはプロンプトのバージョン管理が重要です。このガイドを読むと、具体性、簡潔さ、明確さがより良い結果をもたらすことがわかるでしょう。
|
||||
|
||||
多くの異なるサブタスクを含む大きなタスクがある場合、タスクをよりシンプルなサブタスクに分解し、結果が改善されるにつれて徐々に構築していくことができます。これにより、プロンプトの設計プロセスにあまり複雑さを加えることがなくなります。
|
||||
|
||||
### 指示
|
||||
「書く」「分類する」「要約する」「翻訳する」「並べ替える」などのコマンドを使用して、モデルに達成したいことを指示することで、さまざまなシンプルなタスクに対する効果的なプロンプトを設計することができます。
|
||||
|
||||
最適な結果を得るためには、異なるキーワード、文脈、データを使用した異なる指示を試して、特定のユースケースやタスクに最適なものを見つける必要があります。通常、タスクに関連した文脈が具体的であるほど、結果が良くなります。次のガイドで、サンプリングやより多くの文脈を追加することの重要性について触れます。
|
||||
|
||||
また、指示はプロンプトの最初に配置し、指示と文脈を区切るために「###」のような明確な区切り記号を使用することが推奨されています。
|
||||
|
||||
例えば:
|
||||
|
||||
*プロンプト:*
|
||||
```
|
||||
### 指示 ###
|
||||
以下のテキストをスペイン語に翻訳してください。
|
||||
|
||||
Text: "hello!"
|
||||
```
|
||||
|
||||
*出力:*
|
||||
```
|
||||
¡Hola!
|
||||
```
|
||||
### 特異性
|
||||
モデルに実行してほしい指示やタスクについて、非常に具体的に説明してください。プロンプトが詳細で具体的であるほど、結果はよくなります。特定の出力やスタイルを望む場合には、特に重要です。より良い結果をもたらすトークンやキーワードはありません。良いフォーマットと詳細なプロンプトを用意することが重要です。実際、プロンプトに例を提供することは、特定のフォーマットで出力を得るために非常に効果的です。
|
||||
|
||||
プロンプトを設計する際には、プロンプトの長さに関する制限があるため、考慮する必要があります。どの程度具体的かつ詳細にするかを考える必要があります。余計な詳細を含めることは必ずしも良いアプローチではありません。詳細は関連性があり、課題に貢献する必要があります。これは多くの実験と反復を必要とすることです。アプリケーションに最適なプロンプトを最適化するために、多くの実験と反復をお勧めします。
|
||||
|
||||
例えば、次のテキストから特定の場所の名前を抽出する簡単なプロンプトを試してみましょう。
|
||||
|
||||
*プロンプト:*
|
||||
```
|
||||
以下のテキストから場所の名前を抽出してください。
|
||||
|
||||
望ましいフォーマット:
|
||||
Place: <comma_separated_list_of_company_names>
|
||||
|
||||
入力:「これらの進展は研究者にとって励みになっていますが、まだ多くのことが謎のままです。リスボンのシャンパリマウド・センター・フォー・ジ・アンノウンの神経免疫学者であるヘンリーク・ヴェイガ・フェルナンデスは、「脳と周辺部で見られる効果の間にはしばしばブラックボックスがあります」「治療的な文脈で使用したい場合、実際には作用機序を理解する必要があります。」」
|
||||
|
||||
```
|
||||
|
||||
*出力:*
|
||||
```
|
||||
Place: Champalimaud Centre for the Unknown, Lisbon
|
||||
```
|
||||
|
||||
入力テキストは、[このNature記事](https://www.nature.com/articles/d41586-023-00509-z)から取得されています。
|
||||
|
||||
### 不正確さを避ける
|
||||
|
||||
上記の詳細でフォーマットを改善するヒントに加えて、プロンプトについて賢くなりすぎて、不正確な説明を作り出すことが容易になります。具体的で直接的である方が良い結果が得られます。ここでの類似性は、効果的なコミュニケーションと非常に類似しています--直接的であるほど、効果的にメッセージが伝わります。
|
||||
|
||||
例えば、プロンプトエンジニアリングの概念を学びたいと思うかもしれません。
|
||||
|
||||
```
|
||||
プロンプトエンジニアリングの概念を説明してください。説明は短く、数文で、あまり詳しくしないでください。
|
||||
```
|
||||
|
||||
上記のプロンプトから、どのように文を数え、スタイルを指定するかは明確ではありません。上記のプロンプトでも、まだ良い回答を得ることができますが、非常に具体的かつ簡潔で、的を射たプロンプトの方が良いでしょう。以下のようなものです。
|
||||
|
||||
```
|
||||
高校生に対して、プロンプトエンジニアリングの概念を2〜3文で説明してください。
|
||||
```
|
||||
|
||||
### するかしないか?
|
||||
プロンプトを設計する際のもう一つの一般的なヒントは、「しないこと」を言わず、「すること」を言うことです。これにより、より具体的になり、モデルから良い回答を得るための詳細に焦点が当てられます。
|
||||
|
||||
以下は、映画の推薦チャットボットが、私が指示を書いた方法のために、正確にやりたくないことに失敗した例です--何をしないでくださいということに焦点を当てています。
|
||||
|
||||
*プロンプト:*
|
||||
```
|
||||
以下は、顧客に映画を推薦するエージェントです。興味を尋ねないで、個人情報を尋ねないでください。
|
||||
|
||||
顧客:私の興味に基づいて映画をお勧めください。
|
||||
エージェント:
|
||||
```
|
||||
|
||||
*出力:*
|
||||
```
|
||||
はい、あなたの興味に基づいて映画をお勧めできます。アクション、コメディ、ロマンス、それともその他の何か、どのような映画がお好きですか?
|
||||
```
|
||||
|
||||
以下は改善されたプロンプトです:
|
||||
|
||||
*プロンプト:*
|
||||
```
|
||||
以下は、顧客に映画を推薦するエージェントです。エージェントは、上位のグローバルトレンド映画から映画をお勧めする責任があります。ユーザーの好みを尋ねることを避け、個人情報を尋ねることを避ける必要があります。エージェントがおすすめ映画を持っていない場合は、「申し訳ありませんが、今日お勧めする映画が見つかりませんでした。」と返答する必要があります。
|
||||
|
||||
顧客:私の興味に基づいて映画をお勧めください。
|
||||
エージェント:
|
||||
```
|
||||
|
||||
*出力:*
|
||||
```
|
||||
申し訳ありませんが、あなたの興味に関する情報はありません。しかし、ここに今一番トレンディーな映画のリストがあります:[リストの映画]。お好きなものが見つかることを願っています!
|
||||
```
|
||||
|
||||
上記の例のいくつかは、['Best practices for prompt engineering with OpenAI API'](https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api)から採用されました。
|
@ -0,0 +1,9 @@
|
||||
# モデル
|
||||
|
||||
import { Callout } from 'nextra-theme-docs'
|
||||
|
||||
このセクションでは、最近の言語モデルを取り上げ、それらがどのように最新かつ最も高度なプロンプト工学技術をうまく適用しているかを説明します。さらに、これらの言語モデルの能力を、様々なタスクやプロンプトの設定、例えばfew-shotプロンプト、zero-shotプロンプト、chain-of-thoughtプロンプトについて説明します。これらの機能を理解することは、これらのモデルの限界を理解し、効果的に使用する方法として重要です。
|
||||
|
||||
<Callout emoji="⚠️">
|
||||
このセクションは、現在開発が進んでいます。
|
||||
</Callout>
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"flan": "Flan",
|
||||
"chatgpt": "ChatGPT",
|
||||
"gpt-4": "GPT-4"
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
# Prompt Engineering Notebooks
|
||||
|
||||
Contains a collection of noteooks we have designed to help you get started with prompt engineering. More to be added soon!
|
||||
|
||||
| Description | Notebook |
|
||||
| :------------ | :---------: |
|
||||
|Learn how to perform many different types of common tasks using the `openai` and `LangChain` library|[Getting Started with Prompt Engineering](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-lecture.ipynb)|
|
||||
|Learn how to use code as reasoning for solving common tasks using the Python interpreter in combination with the language model.|[Program-Aided Language Model](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-pal.ipynb)|
|
||||
|Learn more about how to make calls to the ChatGPT APIs using the `openai` library.|[ChatGPT API Intro](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-chatgpt-intro.ipynb)|
|
||||
|Learn how to use ChatGPT features using the `LangChain` library. |[ChatGPT API with LangChain](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-chatgpt-langchain.ipynb)|
|
||||
|Learn about adversarial prompting include defensive measures.|[Adversarial Prompt Engineering](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-chatgpt-adversarial.ipynb)|
|
@ -0,0 +1,154 @@
|
||||
# 論文
|
||||
|
||||
以下は、プロンプトエンジニアリングに関する最新の論文(リリース日順に並べ替え)です。私たちはこれを毎日更新し、新しい論文が入手可能になります。私たちは、これらの論文の要約を毎週、上記のガイドに取り入れています。
|
||||
|
||||
## 概要
|
||||
|
||||
- [Augmented Language Models: a Survey](https://arxiv.org/abs/2302.07842) (Feb 2023)
|
||||
- [A Survey for In-context Learning](https://arxiv.org/abs/2301.00234) (Dec 2022)
|
||||
- [Towards Reasoning in Large Language Models: A Survey](https://arxiv.org/abs/2212.10403) (Dec 2022)
|
||||
- [Reasoning with Language Model Prompting: A Survey](https://arxiv.org/abs/2212.09597) (Dec 2022)
|
||||
- [Emergent Abilities of Large Language Models](https://arxiv.org/abs/2206.07682) (Jun 2022)
|
||||
- [A Taxonomy of Prompt Modifiers for Text-To-Image Generation](https://arxiv.org/abs/2204.13988) (Apr 2022)
|
||||
- [Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing](https://arxiv.org/abs/2107.13586) (Jul 2021)
|
||||
|
||||
## 取り組み
|
||||
|
||||
- [Context-faithful Prompting for Large Language Models](https://arxiv.org/abs/2303.11315) (Mar 2023)
|
||||
- [Is Prompt All You Need? No. A Comprehensive and Broader View of Instruction Learning](https://arxiv.org/abs/2303.10475) (Mar 2023)
|
||||
- [UPRISE: Universal Prompt Retrieval for Improving Zero-Shot Evaluation](https://arxiv.org/abs/2303.08518) (Mar 2023)
|
||||
- [Model-tuning Via Prompts Makes NLP Models Adversarially Robust](https://arxiv.org/abs/2303.07320) (Mar 2023)
|
||||
- [Structure Pretraining and Prompt Tuning for Knowledge Graph Transfer](https://arxiv.org/abs/2303.03922) (March 2023)
|
||||
- [CoTEVer: Chain of Thought Prompting Annotation Toolkit for Explanation Verification](https://arxiv.org/abs/2303.03628) (March 2023)
|
||||
- [Larger language models do in-context learning differently](https://arxiv.org/abs/2303.03846) (March 2023)
|
||||
- [OpenICL: An Open-Source Framework for In-context Learning](https://arxiv.org/abs/2303.02913) (March 2023)
|
||||
- [Dynamic Prompting: A Unified Framework for Prompt Tuning](https://arxiv.org/abs/2303.02909) (March 2023)
|
||||
- [Multitask Prompt Tuning Enables Parameter-Efficient Transfer Learning](https://arxiv.org/abs/2303.02861) (March 2023)
|
||||
- [Effectiveness of Data Augmentation for Prefix Tuning with Limited Data](https://arxiv.org/abs/2303.02577) (March 2023)
|
||||
- [Mixture of Soft Prompts for Controllable Data Generation](https://arxiv.org/abs/2303.01580) (March 2023)
|
||||
- [Prompt, Generate, then Cache: Cascade of Foundation Models makes Strong Few-shot Learners](https://arxiv.org/abs/2303.02151) (March 2023)
|
||||
- [How Robust is GPT-3.5 to Predecessors? A Comprehensive Study on Language Understanding Tasks](https://arxiv.org/abs/2303.00293) (March 2023)
|
||||
- [Can ChatGPT Understand Too? A Comparative Study on ChatGPT and Fine-tuned BERT](https://arxiv.org/pdf/2302.10198.pdf) (Feb 2023)
|
||||
- [EvoPrompting: Language Models for Code-Level Neural Architecture Search](https://arxiv.org/abs/2302.14838) (Feb 2023)
|
||||
- [In-Context Instruction Learning](https://arxiv.org/abs/2302.14691) (Feb 2023)
|
||||
- [Chain of Hindsight Aligns Language Models with Feedback](https://arxiv.org/abs/2302.02676) (Feb 2023)
|
||||
- [Language Is Not All You Need: Aligning Perception with Language Models](https://arxiv.org/abs/2302.14045) (Feb 2023)
|
||||
- [Automatic Prompt Augmentation and Selection with Chain-of-Thought from Labeled Data](https://arxiv.org/abs/2302.12822) (Feb 2023)
|
||||
- [Active Prompting with Chain-of-Thought for Large Language Models](https://arxiv.org/abs/2302.12246) (Feb 2023)
|
||||
- [More than you've asked for: A Comprehensive Analysis of Novel Prompt Injection Threats to Application-Integrated Large Language Models](https://arxiv.org/abs/2302.12173) (Feb 2023)
|
||||
- [A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT](https://arxiv.org/abs/2302.11382) (Feb 2023)
|
||||
- [Guiding Large Language Models via Directional Stimulus Prompting](https://arxiv.org/abs/2302.11520) (Feb 2023)
|
||||
- [How Does In-Context Learning Help Prompt Tuning?](https://arxiv.org/abs/2302.11521) (Feb 2023)
|
||||
- [Scalable Prompt Generation for Semi-supervised Learning with Language Models](https://arxiv.org/abs/2302.09236) (Feb 2023)
|
||||
- [Bounding the Capabilities of Large Language Models in Open Text Generation with Prompt Constraints](https://arxiv.org/abs/2302.09185) (Feb 2023)
|
||||
- [À-la-carte Prompt Tuning (APT): Combining Distinct Data Via Composable Prompting](https://arxiv.org/abs/2302.07994) (Feb 2023)
|
||||
- [GraphPrompt: Unifying Pre-Training and Downstream Tasks for Graph Neural Networks](https://arxiv.org/abs/2302.08043) (Feb 2023)
|
||||
- [The Capacity for Moral Self-Correction in Large Language Models](https://arxiv.org/abs/2302.07459) (Feb 2023)
|
||||
- [SwitchPrompt: Learning Domain-Specific Gated Soft Prompts for Classification in Low-Resource Domains](https://arxiv.org/abs/2302.06868) (Feb 2023)
|
||||
- [Evaluating the Robustness of Discrete Prompts](https://arxiv.org/abs/2302.05619) (Feb 2023)
|
||||
- [Compositional Exemplars for In-context Learning](https://arxiv.org/abs/2302.05698) (Feb 2023)
|
||||
- [Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery](https://arxiv.org/abs/2302.03668) (Feb 2023)
|
||||
- [Multimodal Chain-of-Thought Reasoning in Language Models](https://arxiv.org/abs/2302.00923) (Feb 2023)
|
||||
- [Large Language Models Can Be Easily Distracted by Irrelevant Context](https://arxiv.org/abs/2302.00093) (Feb 2023)
|
||||
- [Synthetic Prompting: Generating Chain-of-Thought Demonstrations for Large Language Models](https://arxiv.org/abs/2302.00618) (Feb 2023)
|
||||
- [Progressive Prompts: Continual Learning for Language Models](https://arxiv.org/abs/2301.12314) (Jan 2023)
|
||||
- [Batch Prompting: Efficient Inference with LLM APIs](https://arxiv.org/abs/2301.08721) (Jan 2023)
|
||||
- [Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLP](https://arxiv.org/abs/2212.14024) (Dec 2022)
|
||||
- [On Second Thought, Let's Not Think Step by Step! Bias and Toxicity in Zero-Shot Reasoning](https://arxiv.org/abs/2212.08061) (Dec 2022)
|
||||
- [Constitutional AI: Harmlessness from AI Feedback](https://arxiv.org/abs/2212.08073) (Dec 2022)
|
||||
- [Successive Prompting for Decomposing Complex Questions](https://arxiv.org/abs/2212.04092) (Dec 2022)
|
||||
- [Large Language Models are reasoners with Self-Verification](https://arxiv.org/abs/2212.09561v1) (Dec 2022)
|
||||
- [Discovering Language Model Behaviors with Model-Written Evaluations](https://arxiv.org/abs/2212.09251) (Dec 2022)
|
||||
- [Structured Prompting: Scaling In-Context Learning to 1,000 Examples](https://arxiv.org/abs/2212.06713) (Dec 2022)
|
||||
- [PAL: Program-aided Language Models](https://arxiv.org/abs/2211.10435) (Nov 2022)
|
||||
- [Large Language Models Are Human-Level Prompt Engineers](https://arxiv.org/abs/2211.01910) (Nov 2022)
|
||||
- [Ignore Previous Prompt: Attack Techniques For Language Models](https://arxiv.org/abs/2211.09527) (Nov 2022)
|
||||
- [Machine Generated Text: A Comprehensive Survey of Threat Models and Detection Methods](https://arxiv.org/abs/2210.07321) (Nov 2022)
|
||||
- [Teaching Algorithmic Reasoning via In-context Learning](https://arxiv.org/abs/2211.09066) (Nov 2022)
|
||||
- [Enhancing Self-Consistency and Performance of Pre-Trained Language Models through Natural Language Inference](https://arxiv.org/abs/2211.11875) (Nov 2022)
|
||||
- [Ask Me Anything: A simple strategy for prompting language models](https://paperswithcode.com/paper/ask-me-anything-a-simple-strategy-for) (Oct 2022)
|
||||
- [Recitation-Augmented Language Models](https://arxiv.org/abs/2210.01296) (Oct 2022)
|
||||
- [ReAct: Synergizing Reasoning and Acting in Language Models](https://arxiv.org/abs/2210.03629) (Oct 2022)
|
||||
- [Prompting GPT-3 To Be Reliable](https://arxiv.org/abs/2210.09150) (Oct 2022)
|
||||
- [Decomposed Prompting: A Modular Approach for Solving Complex Tasks](https://arxiv.org/abs/2210.02406) (Oct 2022)
|
||||
- [Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thought](https://arxiv.org/abs/2210.01240v3) (Oct 2022)
|
||||
- [Evaluating the Susceptibility of Pre-Trained Language Models via Handcrafted Adversarial Examples](https://arxiv.org/abs/2209.02128) (Sep 2022)
|
||||
- [Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoning](https://arxiv.org/abs/2209.14610) (Sep 2022)
|
||||
- [Promptagator: Few-shot Dense Retrieval From 8 Examples](https://arxiv.org/abs/2209.11755) (Sep 2022)
|
||||
- [Atlas: Few-shot Learning with Retrieval Augmented Language Models](https://arxiv.org/abs/2208.03299) (Nov 2022)
|
||||
- [DocPrompting: Generating Code by Retrieving the Docs](https://arxiv.org/abs/2207.05987) (July 2022)
|
||||
- [On the Advance of Making Language Models Better Reasoners](https://arxiv.org/abs/2206.02336) (June 2022)
|
||||
- [Large Language Models are Zero-Shot Reasoners](https://arxiv.org/abs/2205.11916) (May 2022)
|
||||
- [Maieutic Prompting: Logically Consistent Reasoning with Recursive Explanations](https://arxiv.org/abs/2205.11822) (May 2022)
|
||||
- [MRKL Systems: A modular, neuro-symbolic architecture that combines large language models, external knowledge sources and discrete reasoning](https://arxiv.org/abs/2205.00445) (May 2022)
|
||||
- [PPT: Pre-trained Prompt Tuning for Few-shot Learning](https://aclanthology.org/2022.acl-long.576/) (Mqy 2022)
|
||||
- [Toxicity Detection with Generative Prompt-based Inference](https://arxiv.org/abs/2205.12390) (May 2022)
|
||||
- [Learning to Transfer Prompts for Text Generation](https://arxiv.org/abs/2205.01543) (May 2022)
|
||||
- [The Unreliability of Explanations in Few-shot Prompting for Textual Reasoning](https://arxiv.org/abs/2205.03401) (May 2022)
|
||||
- [A Taxonomy of Prompt Modifiers for Text-To-Image Generation](https://arxiv.org/abs/2204.13988) (Apr 2022)
|
||||
- [PromptChainer: Chaining Large Language Model Prompts through Visual Programming](https://arxiv.org/abs/2203.06566) (Mar 2022)
|
||||
- [Self-Consistency Improves Chain of Thought Reasoning in Language Models](https://arxiv.org/abs/2203.11171) (March 2022)
|
||||
- [Training language models to follow instructions with human feedback](https://arxiv.org/abs/2203.02155)
|
||||
- [Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?](https://arxiv.org/abs/2202.12837) (Feb 2022)
|
||||
- [Chain of Thought Prompting Elicits Reasoning in Large Language Models](https://arxiv.org/abs/2201.11903) (Jan 2022)
|
||||
- [Show Your Work: Scratchpads for Intermediate Computation with Language Models](https://arxiv.org/abs/2112.00114) (Nov 2021)
|
||||
- [AI Chains: Transparent and Controllable Human-AI Interaction by Chaining Large Language Model Prompts](https://arxiv.org/abs/2110.01691) (Oct 2021)
|
||||
- [Generated Knowledge Prompting for Commonsense Reasoning](https://arxiv.org/abs/2110.08387) (Oct 2021)
|
||||
- [Multitask Prompted Training Enables Zero-Shot Task Generalization](https://arxiv.org/abs/2110.08207) (Oct 2021)
|
||||
- [Reframing Instructional Prompts to GPTk's Language](https://arxiv.org/abs/2109.07830) (Sep 2021)
|
||||
- [Design Guidelines for Prompt Engineering Text-to-Image Generative Models](https://arxiv.org/abs/2109.06977) (Sep 2021)
|
||||
- [Making Pre-trained Language Models Better Few-shot Learners](https://aclanthology.org/2021.acl-long.295) (Aug 2021)
|
||||
- [Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity](https://arxiv.org/abs/2104.08786) (April 2021)
|
||||
- [BERTese: Learning to Speak to BERT](https://aclanthology.org/2021.eacl-main.316) (April 2021)
|
||||
- [The Power of Scale for Parameter-Efficient Prompt Tuning](https://arxiv.org/abs/2104.08691) (April 2021)
|
||||
- [Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm](https://arxiv.org/abs/2102.07350) (Feb 2021)
|
||||
- [Calibrate Before Use: Improving Few-Shot Performance of Language Models](https://arxiv.org/abs/2102.09690) (Feb 2021)
|
||||
- [Prefix-Tuning: Optimizing Continuous Prompts for Generation](https://arxiv.org/abs/2101.00190) (Jan 2021)
|
||||
- [Learning to Generate Task-Specific Adapters from Task Description](https://arxiv.org/abs/2101.00420) (Jan 2021)
|
||||
- [Making Pre-trained Language Models Better Few-shot Learners](https://arxiv.org/abs/2012.15723) (Dec 2020)
|
||||
- [Learning from Task Descriptions](https://aclanthology.org/2020.emnlp-main.105/) (Nov 2020)
|
||||
- [AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts](https://arxiv.org/abs/2010.15980) (Oct 2020)
|
||||
- [Language Models are Few-Shot Learners](https://arxiv.org/abs/2005.14165) (May 2020)
|
||||
- [How Can We Know What Language Models Know?](https://direct.mit.edu/tacl/article/doi/10.1162/tacl_a_00324/96460/How-Can-We-Know-What-Language-Models-Know) (July 2020)
|
||||
|
||||
## Applications
|
||||
|
||||
- [Can Generative Pre-trained Transformers (GPT) Pass Assessments in Higher Education Programming Courses?](https://arxiv.org/abs/2303.09325) (Mar 2023)
|
||||
- [SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models](https://arxiv.org/abs/2303.08896) (Mar 2023)
|
||||
- [ICL-D3IE: In-Context Learning with Diverse Demonstrations Updating for Document Information Extraction](https://arxiv.org/abs/2303.05063) (March 2023)
|
||||
- [MathPrompter: Mathematical Reasoning using Large Language Models](https://arxiv.org/abs/2303.05398) (March 2023)
|
||||
- [Prompt-Based Learning for Thread Structure Prediction in Cybersecurity Forums](https://arxiv.org/abs/2303.05400) (March 2023)
|
||||
- [Choice Over Control: How Users Write with Large Language Models using Diegetic and Non-Diegetic Prompting](https://arxiv.org/abs/2303.03199) (March 2023)
|
||||
- [Prompting Large Language Models with Answer Heuristics for Knowledge-based Visual Question Answering](https://arxiv.org/abs/2303.01903) (March 2023)
|
||||
- [Soft Prompt Guided Joint Learning for Cross-Domain Sentiment Analysis](https://arxiv.org/abs/2303.00815) (March 2023)
|
||||
- [SpeechPrompt v2: Prompt Tuning for Speech Classification Tasks](https://arxiv.org/abs/2303.00733) (March 2023)
|
||||
- [Goal Driven Discovery of Distributional Differences via Language Descriptions](https://arxiv.org/abs/2302.14233) (Feb 2023)
|
||||
- [Navigating the Grey Area: Expressions of Overconfidence and Uncertainty in Language Models](https://arxiv.org/abs/2302.13439) (Feb 2023)
|
||||
- [TabGenie: A Toolkit for Table-to-Text Generation](https://arxiv.org/abs/2302.14169) (Feb 2023)
|
||||
- [SGL-PT: A Strong Graph Learner with Graph Prompt Tuning](https://arxiv.org/abs/2302.12449) (Feb 2023)
|
||||
- [Few-Shot Table-to-Text Generation with Prompt-based Adapter](https://arxiv.org/abs/2302.12468) (Feb 2023)
|
||||
- [Language Models Are Few-shot Learners for Prognostic Prediction](https://arxiv.org/abs/2302.12692) (Feb 2023)
|
||||
- [STA: Self-controlled Text Augmentation for Improving Text Classifications](https://arxiv.org/abs/2302.12784) (Feb 2023)
|
||||
- [Check Your Facts and Try Again: Improving Large Language Models with External Knowledge and Automated Feedback](https://arxiv.org/abs/2302.12813) (Feb 2023)
|
||||
- [How Generative AI models such as ChatGPT can be (Mis)Used in SPC Practice, Education, and Research? An Exploratory Study](https://arxiv.org/abs/2302.10916) (Feb 2023)
|
||||
- [Grimm in Wonderland: Prompt Engineering with Midjourney to Illustrate Fairytales](https://arxiv.org/abs/2302.08961) (Feb 2023)
|
||||
- [LabelPrompt: Effective Prompt-based Learning for Relation Classification](https://arxiv.org/abs/2302.08068) (Feb 2023)
|
||||
- [Language Model Crossover: Variation through Few-Shot Prompting](https://arxiv.org/abs/2302.09236) (Feb 2023)
|
||||
- [Prompt Tuning of Deep Neural Networks for Speaker-adaptive Visual Speech Recognition](https://arxiv.org/abs/2302.08102) (Feb 2023)
|
||||
- [The Capacity for Moral Self-Correction in Large Language Models](https://arxiv.org/abs/2302.07459) (Feb 2023)
|
||||
- [Prompting for Multimodal Hateful Meme Classification](https://arxiv.org/abs/2302.04156) (Feb 2023)
|
||||
- [PLACES: Prompting Language Models for Social Conversation Synthesis](https://arxiv.org/abs/2302.03269) (Feb 2023)
|
||||
- [Commonsense-Aware Prompting for Controllable Empathetic Dialogue Generation](https://arxiv.org/abs/2302.01441) (Feb 2023)
|
||||
- [Crawling the Internal Knowledge-Base of Language Models](https://arxiv.org/abs/2301.12810) (Jan 2023)
|
||||
- [Legal Prompt Engineering for Multilingual Legal Judgement Prediction](https://arxiv.org/abs/2212.02199) (Dec 2022)
|
||||
- [Investigating Prompt Engineering in Diffusion Models](https://arxiv.org/abs/2211.15462) (Nov 2022)
|
||||
- [Learn to Explain: Multimodal Reasoning via Thought Chains for Science Question Answering](https://arxiv.org/abs/2209.09513v2) (Sep 2022)
|
||||
- [Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Language](https://arxiv.org/abs/2210.15157) (Oct 2022)
|
||||
- [Piloting Copilot and Codex: Hot Temperature, Cold Prompts, or Black Magic?](https://arxiv.org/abs/2210.14699) (Oct 2022)
|
||||
- [Plot Writing From Scratch Pre-Trained Language Models](https://aclanthology.org/2022.inlg-main.5) (July 2022)
|
||||
|
||||
## Collections
|
||||
|
||||
- [Chain-of-Thought Papers](https://github.com/Timothyxxx/Chain-of-ThoughtsPapers)
|
||||
- [Papers with Code](https://paperswithcode.com/task/prompt-engineering)
|
||||
- [Prompt Papers](https://github.com/thunlp/PromptPapers#papers)
|
@ -0,0 +1,11 @@
|
||||
# リスクと誤用
|
||||
|
||||
import { Callout } from 'nextra-theme-docs'
|
||||
|
||||
私たちは、few-shot学習やchain-of-thoughtプロンプトのようなテクニックを使って、うまく作られたプロンプトがさまざまなタスクでいかに効果的であるかをすでに見てきました。LLMの上に実世界のアプリケーションを構築することを考えると、言語モデルの誤用、リスク、安全対策について考えることが非常に重要になります。
|
||||
|
||||
このセクションでは、プロンプトインジェクションのような手法によるLLMのリスクと誤用に焦点を当てます。また、有害な行動と、効果的なプロンプト技術によってそれを軽減する方法についても言及します。その他、一般化可能性、キャリブレーション、バイアス、社会的バイアス、事実性など、興味のあるトピックをいくつか挙げていきます。
|
||||
|
||||
<Callout emoji="⚠️">
|
||||
このセクションは、現在開発が進んでいます。
|
||||
</Callout>
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"adversarial": "敵対的Prompting",
|
||||
"factuality": "事実性",
|
||||
"biases": "バイアス"
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
# プロンプトエンジニアリング技術
|
||||
|
||||
この時点で明らかになっているように、異なるタスクでより良い結果を得るために、プロンプトを改善することが役立つことがわかりました。これがプロンプトエンジニアリングのアイデア全体です。
|
||||
|
||||
基本的な例は楽しかったですが、このセクションでは、より高度なプロンプトエンジニアリング技術を紹介し、より複雑で興味深いタスクを達成することができます。
|
@ -0,0 +1,14 @@
|
||||
# アクティブプロンプト
|
||||
|
||||
import { Callout, FileTree } from 'nextra-theme-docs'
|
||||
import {Screenshot} from 'components/screenshot'
|
||||
import ACTIVE from '../../img/active-prompt.png'
|
||||
|
||||
# Active-Prompt
|
||||
|
||||
Chain-of-thought (CoT)メソッドは、固定された人間による注釈付きの例のセットに依存しています。これには、例が異なるタスクに対して最も効果的なものでない可能性があるという問題があります。[Diaoら(2023)](https://arxiv.org/pdf/2302.12246.pdf)は、最近、異なるタスク固有の例のプロンプト(人間によるCoT推論で注釈付けされたもの)に適応するための新しいプロンプトアプローチであるActive-Promptを提案しました。
|
||||
|
||||
以下は、このアプローチの概要図です。最初のステップは、LLMに対してCoT例をいくつか含めて問い合わせます。一連のトレーニング質問に対して、*k*個の可能な回答が生成されます。*k*個の回答に基づいて不確実性メトリックが計算されます(不一致を使用)。最も不確実な質問が人間によって注釈付けされます。新しい注釈付きの例は、それぞれの質問の推論に使用されます。
|
||||
|
||||
<Screenshot src={ACTIVE} alt="ACTIVE" />
|
||||
Image Source: [Diao et al., (2023)](https://arxiv.org/pdf/2302.12246.pdf)
|
@ -0,0 +1,14 @@
|
||||
# ReAct
|
||||
|
||||
import { Callout, FileTree } from 'nextra-theme-docs'
|
||||
import {Screenshot} from 'components/screenshot'
|
||||
import REACT from '../../img/react.png'
|
||||
|
||||
[Yao et al.、2022](https://arxiv.org/abs/2210.03629)は、LLMが交互に推論トレースとタスク固有のアクションを生成するフレームワークを紹介しました。推論トレースの生成により、モデルはアクション計画を誘導、追跡、更新し、例外を処理することができます。アクションステップにより、知識ベースや環境などの外部ソースとのインターフェースや情報収集が可能になります。
|
||||
|
||||
ReActフレームワークは、LLMが外部ツールと対話して追加情報を取得し、より信頼性の高い事実に基づく回答を生成することができます。
|
||||
|
||||
<Screenshot src={REACT} alt="REACT" />
|
||||
Image Source: [Yao et al., 2022](https://arxiv.org/abs/2210.03629)
|
||||
|
||||
具体的な例は近日中に公開します!
|
@ -0,0 +1,39 @@
|
||||
# ツール & ライブラリ
|
||||
#### (名前順にソート(アルファベット順))
|
||||
|
||||
- [AI Test Kitchen](https://aitestkitchen.withgoogle.com)
|
||||
- [betterprompt](https://github.com/krrishdholakia/betterprompt)
|
||||
- [ClickPrompt](https://github.com/prompt-engineering/click-prompt)
|
||||
- [DreamStudio](https://beta.dreamstudio.ai)
|
||||
- [DUST](https://dust.tt)
|
||||
- [Dyno](https://trydyno.com)
|
||||
- [EmergentMind](https://www.emergentmind.com)
|
||||
- [EveryPrompt](https://www.everyprompt.com)
|
||||
- [GPT Index](https://github.com/jerryjliu/gpt_index)
|
||||
- [GPTTools](https://gpttools.com/comparisontool)
|
||||
- [hwchase17/adversarial-prompts](https://github.com/hwchase17/adversarial-prompts)
|
||||
- [Interactive Composition Explorer](https://github.com/oughtinc/ice)
|
||||
- [LangChain](https://github.com/hwchase17/langchain)
|
||||
- [Lexica](https://lexica.art)
|
||||
- [loom](https://github.com/socketteer/loom)
|
||||
- [Metaprompt](https://metaprompt.vercel.app/?task=gpt)
|
||||
- [OpenAI Playground](https://beta.openai.com/playground)
|
||||
- [OpenICL](https://github.com/Shark-NLP/OpenICL)
|
||||
- [OpenPrompt](https://github.com/thunlp/OpenPrompt)
|
||||
- [OpenPlayground](https://nat.dev/)
|
||||
- [Playground](https://playgroundai.com)
|
||||
- [Prodia](https://app.prodia.com/#/)
|
||||
- [Prompt Base](https://promptbase.com)
|
||||
- [Prompt Engine](https://github.com/microsoft/prompt-engine)
|
||||
- [Prompt Generator for OpenAI's DALL-E 2](http://dalle2-prompt-generator.s3-website-us-west-2.amazonaws.com)
|
||||
- [Promptable](https://promptable.ai)
|
||||
- [PromptInject](https://github.com/agencyenterprise/PromptInject)
|
||||
- [Prompts.ai](https://github.com/sevazhidkov/prompts-ai)
|
||||
- [PromptPerfect](https://promptperfect.jina.ai/)
|
||||
- [Promptly](https://trypromptly.com/)
|
||||
- [PromptSource](https://github.com/bigscience-workshop/promptsource)
|
||||
- [Promptist](https://promptist.herokuapp.com/)
|
||||
- [Scale SpellBook](https://scale.com/spellbook)
|
||||
- [sharegpt](https://sharegpt.com)
|
||||
- [ThoughtSource](https://github.com/OpenBioLink/ThoughtSource)
|
||||
- [Visual Prompt Builder](https://tools.saxifrage.xyz/prompt)
|
Loading…
Reference in New Issue