This module shows you how to instruct ChatGPT-3.5 to precisely format its response (or output) based on your prompt.
Outputs need to be text-based but there are a variety of formatting styles available.
Use Markdown syntax in your prompts to specify formatting elements to ensure consistent formatting in ChatGPT's responses.
Image Caption: A classic word cloud showing examples of over twenty-five text-based output formats available from ChatGPT.
In the first example, I ask ChatGPT to format its response to my question as an easy to read table.
Prompt In ChatGPT-3.5:
Laura:
List the top four science fiction television shows based on books.
For the TV shows, include the title and run dates.
For the books, include the title, author, and publication date.
Format the output as an easy to read table.
ChatGPT:
Image Caption: The top four science fiction television shows based on books is displayed by ChatGPT in a table format that contains six columns. The four television shows listed are The Expanse, The Handmaid's Tale, Altered Carbon, and Westworld.
In the first example, I allowed ChatGPT to select the formatting style for the table. For this second example, I specify how I want each element to be styled in ChatGPT's response. As you incorporate a larger number of specific formatting elements into your prompt, ChatGPT will increasingly struggle to provide accurate responses. You might have to balance what you want stylistically with ChatGPT's current limitations.
Explanation of the Example
Prompt In ChatGPT-3.5:
Laura:
List the top four science fiction television shows based on books.
Use the following output format:
**1.** **TV SHOW TITLE** (**Note:** the uppercase!)
- **Run Dates:** Run dates of the TV show
- **Author:** Author of the book
- **Book Title:** *Title of the book*
- **Publication Date:** Publication year of the book
ChatGPT:
Certainly, Laura. Here's the information formatted according to your specifications:
1. THE EXPANSE
2. THE HANDMAID'S TALE
3. ALTERED CARBON
4. THE MAN IN THE HIGH CASTLE