As you transition to writing Custom GPTs, implementing effective prompt engineering practices within your instructions is crucial to ensure your GPTs perform reliably and accurately. Here’s a concise guide to help you navigate smoothly with your Custom GPTs.
Enhancing Instructions
Simplify Complex Instructions:
Break down multi-step instructions into simpler, more manageable steps to ensure the model can follow them accurately.
Use “trigger/instruction pairs”, separated by delimiters to improve reliability in following steps without merging or skipping them.
These look like the following:
Trigger: User submits information
Instruction: Analyze information for themesTrigger: Themes analyzed
Instruction: Leverage themes analyzed to provide summary
in bullet point form of the recommendations you’d give
Structure for Clarity:
Break down second-level instructions into separate steps for better execution.
Use delimiters between instruction sets and for call-outs of few-shot examples to enhance clarity.
Promote Attention to Detail:
Incorporate “take your time,” “take a deep breath,” and “check your work” techniques to encourage the model to be thorough.
Use “strengthening language” to highlight critical parts of the instructions, ensuring they are not overlooked.
Avoid Negative Instructions:
Frame instructions positively to improve adherence and avoid confusion.
Granular Steps:
Break down steps as granularly as possible, especially when multiple actions are required within a single step.
Consistency and Clarity:
Explicitly define terms and definitions you are expecting using few-shot prompting (e.g., acceptable vs. unacceptable changes) to improve consistency in evaluations.
Clarify any relevant classifications with few-shot examples to reduce variability in output.
Ensure Proper Spacing and Readability:
Paragraphs: Separate paragraphs with a blank line to distinguish different ideas or instructions.
Line Breaks: End a line with two spaces followed by Enter to insert a line break without starting a new paragraph.
Utilizing Markdown and Structured Formatting
Enhancing the clarity and effectiveness of your instructions is crucial for optimal GPT performance. Incorporating Markdown syntax and structured formatting can significantly improve the readability and precision of your prompts.
Organize Content Using Headings:
Headers: Use the number sign
#
followed by a space to create headings. More number signs indicate smaller heading levels.
Example | Renders as |
# This is Heading 1 | This is Heading 1 |
## This is Heading 2 | This is Heading 2 |
### This is Heading 3 | This is Heading 3 |
Segment Instructions with Headings
Example | Renders as |
# Context
- If the user’s question cannot be answered with the above steps, tell them to email hr@acmecorp.com | ContextYou are a member of the HR team. Attached is an HR policy document.
Instructions
Additional Information
|
Emphasize Key Information:
Bold Text: Use double asterisks
**
to highlight important points.
Example | Renders as |
**This text will be bold** | This text will be bold |
Some text will be **bold** | This text will be bold |
Italic Text: Use single asterisks
*
or underscores_
to emphasize specific terms.
Example | Renders as |
*This text will be italic* | This text will be italic |
_This text will be italic_ | This text will be italic |
_You **can** combine them_ | You can combine them |
Organize information with Lists:
Unordered Lists: Use hyphens
-
or asterisks*
to create bullet points.
Example | Renders as |
* Item 1 |
|
- Item 1 - Item 2 |
|
Ordered Lists: Use numbers followed by periods for sequential steps.
Example | Renders as |
1. Item 1 2. Item 2 |
|
Special Care with Tools and Actions
Leveraging Knowledge Files:
Provide explicit instructions for using knowledge files, including specifying file names.
Instruct the model to slow down and analyze the entire file to ensure comprehensive utilization.
Specificity in Prompts for Knowledge Extraction:
Add specificity in prompts, particularly when extracting critical information like dates or financial information. Give specific examples through “few shot prompting”.
Encourage the model to thoroughly check its work and take its time when retrieving specific data from files.
Examples of Good Output:
Provide examples of what good output looks like concerning knowledge and custom actions.
Referencing Actions:
Always refer to actions by name and domain to enhance clarity.
Provide “few-shot prompting” examples with API calls where needed to ensure correct action is called.
Use delimiters for different action steps to ensure the correct actions are called.
Explicit Tool Use Instructions:
Provide explicit instructions to use tools such as Browse, Knowledge, and Custom Actions throughout the instructions.
By following these guidelines, you can optimize the performance of your custom GPTs, ensuring reliable and accurate outputs.