Skip to content

Commit

Permalink
feat: add feishu group image
Browse files Browse the repository at this point in the history
  • Loading branch information
aboutmydreams committed Jul 3, 2024
1 parent 763da43 commit da0e272
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 101 deletions.
83 changes: 14 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,22 @@
# Prompt Engineering Guide

提示工程是一门相对较新的学科,用于开发和优化提示,以便在各种应用和研究课题中有效地使用语言模型(LMs)。提示工程技能有助于更好地了解大型语言模型(LLM)的能力和局限性。研究人员利用提示工程提高 LLM 在各种常见和复杂任务(如问题解答和算术推理)中的能力。开发人员使用提示工程来设计与 LLM 和其他工具相连接的强大而有效的提示技术。
提示工程指南(Prompt Engineering Guide)是由 [DAIR.AI](https://github.com/dair-ai) 发起,由 [NCUHOME](team.ncuos.com) 及中文开源社区共同翻译和改进的教程项目,旨在帮助研发和行业内相关人员了解提示工程。提示工程技能有助于更好地了解大型语言模型(LLM)的能力和局限性。研究人员利用提示工程提高 LLM 在各种常见和复杂任务(如问题解答和算术推理)中的能力。开发人员使用提示工程来设计与 LLM 和其他工具相连接的强大而有效的提示技术。

鉴于人们对使用 LLMs 进行开发的浓厚兴趣,我们创建了这一新的提示工程指南,其中包含与 LLMs 提示工程相关的所有最新论文、学习指南、讲座、参考资料和工具。

🌐 [Prompt Engineering Guide (Web Version)](https://prompt-guide.ncuos.com/)

📺 [YouTube Mini Lectures on Prompting Engineering](https://www.youtube.com/playlist?list=PLGSHbNsNO4Vha1jB0wMtuYYEVO4laSo0m)

我们与 Maver 合作,提供以下一系列面向实时的同堂学堂课程,涵盖提示工程:

- [机器学习模型(LLMs) für Jedermann](https://maven.com/dair-ai/llms-for-everyone)(适合初学者) - 学习最新的提示工程技术,并了解如何有效地将它们应用于实际应用场景。

- [针对机器学习模型(LLMs)的提示工程](https://maven.com/dair-ai/prompt-engineering-llms)(高级) - 学习高级提示工程技术,以构建复杂的应用和用例与 LLMs。

祝您提示愉快!
以传播 AI 技术和研究成果为目标,我们欢迎大家的贡献!大家可以查找页面上的编辑按钮参与贡献。

---
[查看许可信息](https://github.com/ncuhome/Prompt-Engineering-Guide#license).

## Announcements / Updates
本项目受多个开源项目启发,包括:

- 🎉 新课程《面向 LLMs 的提示工程》上线![立即报名](https://maven.com/dair-ai/prompt-engineering-llms)
- 💼 我们提供多项服务,如企业培训、咨询和讲座。
- 🌐 我们已支持 13 种语言!欢迎更多的翻译。
- 👩‍🎓 在 2024 年 1 月,我们已突破 300 万学员!
- 🖥️ 我们已在这里推出了新版网页版指南:[访问指南](https://prompt-guide.ncuos.com/)
- 🔥 我们 2023 年 2 月 21 日在 Hacker News 排名第一!
- 🎉 第一节关于提示工程的直播课程,现已在这里上线:[观看直播课程](https://youtu.be/dOxUroR57xs)
- [OpenAI CookBook](https://github.com/openai/openai-cookbook)
- [Pretrain, Prompt, Predic](http://pretrain.nlpedia.ai/)
- [Learn Prompting](https://learntipting.org/)

[Join our Discord](https://discord.com/invite/SKgkVT8BGJ)
感谢以上开源项目的贡献。

[Follow us on Twitter](https://twitter.com/dair_ai)

[Subscribe to our YouTube](https://www.youtube.com/channel/UCyna_OxOWL7IEuOwb7WhmxQ)

[Subscribe to our Newsletter](https://nlpnews.substack.com/)

---
🌐 [Prompt Engineering Guide (Web Version)](https://prompt-guide.ncuos.com/)

## Guides

Expand Down Expand Up @@ -111,53 +91,18 @@ You can also find the most up-to-date guides on our new website [https://prompt-
- [Prompt Engineering - Datasets](/datasets)
- [Prompt Engineering - Additional Readings](/readings)

---

## Lecture

We have published a 1 hour lecture that provides a comprehensive overview of prompting techniques, applications, and tools.

- [Video Lecture](https://youtu.be/dOxUroR57xs)
- [Notebook with code](https://github.com/ncuhome/Prompt-Engineering-Guide/blob/main/notebooks/pe-lecture.ipynb)
- [Slides](https://github.com/ncuhome/Prompt-Engineering-Guide/blob/main/lecture/Prompt-Engineering-Lecture-Elvis.pdf)

---

## Running the guide locally

To run the guide locally, for example to check the correct implementation of a new translation, you will need to:

1. Install Node >=18.0.0
1. Install `pnpm` if not present in your system. Check [here](https://pnpm.io/installation) for detailed instructions.
1. Install the dependencies: `pnpm i next react react-dom nextra nextra-theme-docs`
1. Boot the guide with `pnpm dev`
2. Browse the guide at `http://localhost:3000/`

---

## Appearances

Some places where we have been featured:

- Wall Street Journal - [ChatGPT Can Give Great Answers. But Only If You Know How to Ask the Right Question](https://www.wsj.com/articles/chatgpt-ask-the-right-question-12d0f035)
- Forbes - [Mom, Dad, I Want To Be A Prompt Engineer](https://www.forbes.com/sites/craigsmith/2023/04/05/mom-dad-i-want-to-be-a-prompt-engineer/?sh=7f1213159c8e)
- Markettechpost - [Best Free Prompt Engineering Resources (2023)](https://www.marktechpost.com/2023/04/04/best-free-prompt-engineering-resources-2023/)

---
If you are using the guide for your work or research, please cite us as follows:

```
@article{Saravia_Prompt_Engineering_Guide_2022,
author = {Saravia, Elvis},
journal = {https://github.com/ncuhome/Prompt-Engineering-Guide},
month = {12},
title = {{Prompt Engineering Guide}},
year = {2022}
}
```
2. Install `pnpm` if not present in your system. Check [here](https://pnpm.io/installation) for detailed instructions.
3. Install the dependencies: `pnpm i next react react-dom nextra nextra-theme-docs`
4. Boot the guide with `pnpm dev`
5. Browse the guide at `http://localhost:3000/`

## License

[MIT License](https://github.com/ncuhome/Prompt-Engineering-Guide/blob/main/LICENSE.md)

Feel free to open a PR if you think something is missing here. Always welcome feedback and suggestions. Just open an issue!
如果您认为这里缺少某些内容,请随时打开 PR。随时欢迎反馈和建议。只需打开一个问题!
Binary file added img/about-zh-fs-group.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion pages/about.zh.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import feishuGroup from '../img/about-zh-fs-group.jpg'
import {Screenshot} from 'components/screenshot'

# 关于

提示工程指南(Prompt Engineering Guide)是由 [DAIR.AI](https://github.com/dair-ai) 发起,由 [NCUHOME](team.ncuos.com) 及中文开源社区共同翻译和改进的教程项目,旨在帮助研发和行业内相关人员了解提示工程。

以传播 AI 技术和研究成果为目标,我们欢迎大家的贡献!大家可以查找页面上的编辑按钮参与贡献。

[查看许可信息](https://github.com/ncuhome/Prompt-Engineering-Guide#license).
如果你对这个教程感兴趣或者有任何疑问,可以加入我们的社区进一步交流想法,由于微信二维码只有七日有效,这里只放了飞书群,如果想加入微信社区可以联系飞书群管理员或添加小助手微信号 `ncudiven`

<Screenshot src={feishuGroup} alt="feishu group" />

本项目受多个开源项目启发,包括:

Expand Down
2 changes: 1 addition & 1 deletion pages/models/grok-1.zh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Grok-1 由 xAI 训练,包含的 MoE 模型在推理时会激活给定令牌的

## 结果和能力

根据最初的[公告](https://x.ai/blog/grok),Grok-1 在推理和编码任务方面表现出强大的能力。最新公开的结果显示,Grok-1 在 HumanEval 编码任务中达到 63.2%,在 MMLU 中达到 73%。它通常优于 ChatGPT-3.5 和 Inflection-1,但仍落后于改进模型如 GPT-4。
根据最初的 [公告](https://x.ai/blog/grok),Grok-1 在推理和编码任务方面表现出强大的能力。最新公开的结果显示,Grok-1 在 HumanEval 编码任务中达到 63.2%,在 MMLU 中达到 73%。它通常优于 ChatGPT-3.5 和 Inflection-1,但仍落后于改进模型如 GPT-4。

![Grok-1 Benchmark Results](../../img/grok/grok-reasoning.png)

Expand Down
12 changes: 6 additions & 6 deletions pages/prompts/evaluation/plato-dialogue.zh.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 评估柏拉图的对话

import { Tabs, Tab } from 'nextra/components'
import {Tabs, Tab} from 'nextra/components'

## 背景
以下提示测试了 LLM 在评估两个不同模型输出方面的能力,要求其像老师一样进行评估。
Expand Down Expand Up @@ -29,14 +29,14 @@ GPT-4 的输出:{output 2}

```python
from openai import OpenAI
client = OpenAI()
client = OpenAI ()

response = client.chat.completions.create(
response = client.chat.completions.create (
model="gpt-4",
messages=[
{
"role": "user",
"content": "能否像老师一样比较以下两个输出?\n\nOutput from ChatGPT:\n{output 1}\n\nOutput from GPT-4:\n{output 2}"
"content": "能否像老师一样比较以下两个输出?\n\nOutput from ChatGPT:\n {output 1}\n\nOutput from GPT-4:\n {output 2}"
}
],
temperature=1,
Expand All @@ -52,12 +52,12 @@ GPT-4 的输出:{output 2}
```python
import fireworks.client
fireworks.client.api_key = "<FIREWORKS_API_KEY>"
completion = fireworks.client.ChatCompletion.create(
completion = fireworks.client.ChatCompletion.create (
model="accounts/fireworks/models/mixtral-8x7b-instruct",
messages=[
{
"role": "user",
"content": "能否像老师一样比较以下两个输出?\n\nOutput from ChatGPT:\n{output 1}\n\nOutput from GPT-4:\n{output 2}",
"content": "能否像老师一样比较以下两个输出?\n\nOutput from ChatGPT:\n {output 1}\n\nOutput from GPT-4:\n {output 2}",
}
],
stop=["<|im_start|>","<|im_end|>","<|endoftext|>"],
Expand Down
8 changes: 4 additions & 4 deletions pages/prompts/image-generation/alphabet-person.zh.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 使用字母画一个人

import { Tabs, Tab } from 'nextra/components'
import {Tabs, Tab} from 'nextra/components'
import {Callout} from 'nextra/components'

## 背景
Expand Down Expand Up @@ -30,9 +30,9 @@ import {Callout} from 'nextra/components'

```python
from openai import OpenAI
client = OpenAI()
client = OpenAI ()

response = client.chat.completions.create(
response = client.chat.completions.create (
model="gpt-4",
messages=[
{
Expand All @@ -53,7 +53,7 @@ import {Callout} from 'nextra/components'
```python
import fireworks.client
fireworks.client.api_key = "<FIREWORKS_API_KEY>"
completion = fireworks.client.ChatCompletion.create(
completion = fireworks.client.ChatCompletion.create (
model="accounts/fireworks/models/mixtral-8x7b-instruct",
messages=[
{
Expand Down
12 changes: 6 additions & 6 deletions pages/prompts/question-answering/closed-domain.zh.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 使用 LLMs 进行封闭域问答

import { Tabs, Tab } from 'nextra/components'
import {Tabs, Tab} from 'nextra/components'
import {Callout} from 'nextra/components'

## 背景
Expand Down Expand Up @@ -30,14 +30,14 @@ import {Callout} from 'nextra/components'

```python
from openai import OpenAI
client = OpenAI()
client = OpenAI ()

response = client.chat.completions.create(
response = client.chat.completions.create (
model="gpt-4",
messages=[
{
"role": "user",
"content": "患者信息:\n- 20 岁女性\n- 有神经性厌食症和抑郁症病史\n- 血压 100/50,脉搏 50,身高 5’5’’\n- 由其营养师推荐,但她对自己的病情持否认态度\n- 报告说吃得很好,但体重严重偏低\n\n请将以上数据改写为医疗记录,仅使用以上信息。"
"content": "患者信息:\n- 20 岁女性 \n- 有神经性厌食症和抑郁症病史 \n- 血压 100/50,脉搏 50,身高 5’5’’\n- 由其营养师推荐,但她对自己的病情持否认态度 \n- 报告说吃得很好,但体重严重偏低 \n\n 请将以上数据改写为医疗记录,仅使用以上信息。"
}
],
temperature=1,
Expand All @@ -53,12 +53,12 @@ import {Callout} from 'nextra/components'
```python
import fireworks.client
fireworks.client.api_key = "<FIREWORKS_API_KEY>"
completion = fireworks.client.ChatCompletion.create(
completion = fireworks.client.ChatCompletion.create (
model="accounts/fireworks/models/mixtral-8x7b-instruct",
messages=[
{
"role": "user",
"content": "患者信息:\n- 20 岁女性\n- 有神经性厌食症和抑郁症病史\n- 血压 100/50,脉搏 50,身高 5’5’’\n- 由其营养师推荐,但她对自己的病情持否认态度\n- 报告说吃得很好,但体重严重偏低\n\n请将以上数据改写为医疗记录,仅使用以上信息。",
"content": "患者信息:\n- 20 岁女性 \n- 有神经性厌食症和抑郁症病史 \n- 血压 100/50,脉搏 50,身高 5’5’’\n- 由其营养师推荐,但她对自己的病情持否认态度 \n- 报告说吃得很好,但体重严重偏低 \n\n 请将以上数据改写为医疗记录,仅使用以上信息。",
}
],
stop=["<|im_start|>","<|im_end|>","<|endoftext|>"],
Expand Down
31 changes: 17 additions & 14 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React from "react";
import { DocsThemeConfig } from "nextra-theme-docs";
import { useConfig } from "nextra-theme-docs";
import { Pre } from "./components/pre";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCommentDots } from "@fortawesome/free-solid-svg-icons";

const config: DocsThemeConfig = {
logo: (
Expand All @@ -23,20 +25,20 @@ const config: DocsThemeConfig = {
</>
),
i18n: [
{ locale: "en", text: "English" },
{ locale: "zh", text: "中文" },
{ locale: "jp", text: "日本語" },
{ locale: "pt", text: "Português" },
{ locale: "it", text: "Italian" },
{ locale: "tr", text: "Türkçe" },
{ locale: "es", text: "Español" },
{ locale: "fr", text: "Français" },
{ locale: "kr", text: "한국어" },
{ locale: `ca`, text: `Català` },
{ locale: "fi", text: "Finnish" },
{ locale: "ru", text: "Русский" },
{ locale: "de", text: "Deutsch" },
{ locale: "ar", text: "العربية" },
{ locale: "en", text: "English" },
// { locale: "jp", text: "日本語" },
// { locale: "pt", text: "Português" },
// { locale: "it", text: "Italian" },
// { locale: "tr", text: "Türkçe" },
// { locale: "es", text: "Español" },
// { locale: "fr", text: "Français" },
// { locale: "kr", text: "한국어" },
// { locale: `ca`, text: `Català` },
// { locale: "fi", text: "Finnish" },
// { locale: "ru", text: "Русский" },
// { locale: "de", text: "Deutsch" },
// { locale: "ar", text: "العربية" },
],
head: function UseHead() {
const { title } = useConfig();
Expand Down Expand Up @@ -76,7 +78,8 @@ const config: DocsThemeConfig = {
link: "https://github.com/ncuhome/Prompt-Engineering-Guide",
},
chat: {
link: "https://discord.gg/FUyz9vPAwf",
icon: <FontAwesomeIcon size={"xl"} icon={faCommentDots} />,
link: "/about",
},
docsRepositoryBase:
"https://github.com/ncuhome/Prompt-Engineering-Guide/tree/main/",
Expand Down

0 comments on commit da0e272

Please sign in to comment.