-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ New rule - Do you use the system prompt? #6869
Merged
jackreimers
merged 12 commits into
SSWConsulting:main
from
jackreimers:optmise-system-prompt
Sep 29, 2023
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
38d230f
Create rule.md
jackreimers ce90bfe
Update rule.md
jackreimers f42fac6
Add files via upload
jackreimers b58dacc
Update rule.md
jackreimers f5a3edc
Update rule.md
jackreimers d2ca8c1
Update rules-to-better-gpt.md
jackreimers ef9a55e
Update rule.md
jackreimers b1807c1
Merge main into branch
jackreimers 43b0558
Add files via upload
jackreimers 6c68e7e
Update rule.md
jackreimers c6f36c8
Delete rules/use-system-prompt/helpful-assistant.png
jackreimers e1b4d14
Delete rules/use-system-prompt/unhelpful-assistant.png
jackreimers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ index: | |
- website-chatbot | ||
- use-semantic-kernel | ||
- use-embeddings | ||
- use-system-prompt | ||
--- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
type: rule | ||
title: GPT - Do you use the system prompt? | ||
uri: use-system-prompt | ||
authors: | ||
- title: Jack Reimers | ||
url: https://www.ssw.com.au/people/jack-reimers | ||
created: 2023-09-28T12:00:00.000Z | ||
guid: d98b6b99-28a2-4be3-8095-6f5c45094a98 | ||
--- | ||
|
||
When you're building a custom AI application using a GPT API you'll probably want the model to respond in a way that fits your application or company. | ||
You can achieve this using the system prompt. | ||
|
||
<!--endintro--> | ||
|
||
### What is the system prompt? | ||
|
||
Requests to and from a GPT API generally have three types of messages, also known as roles or prompts. | ||
|
||
**User** | ||
User messages are any messages that your application has sent to the model. | ||
|
||
**Assistant** | ||
Assistant messages are any messages that the model has sent back to your application. | ||
|
||
**System** | ||
The system prompt is sent with every request to the API and instructs the model how it should respond to each request. | ||
|
||
![Figure: The default helpful assistant prompt](helpful-assistant.png) | ||
|
||
![Figure: We can use the system prompt to make GPT unhelpful](unhelpful-assistant.png) | ||
|
||
For more information on system prompts, see [OpenAI's documentation](https://platform.openai.com/docs/guides/gpt-best-practices/strategy-write-clear-instructions), or use their [playground](https://platform.openai.com/playground) to start testing your own! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you come up with an example where the system prompt makes it better instead of worse 😁