Article 4 min read

How to Format ChatGPT Responses So They are Useable

chatgpt mobile

Ever been chatting with ChatGPT and struggled with getting consistent responses? You're not alone. Many users find that, while ChatGPT can incredibly powerful, its outputs can vary even when asking the same question. Varied responses are by design, as the tool is built to be creative. If all of the answers were the same for every single use, it wouldn't be particularly useful would it?

What most users need is a way to strike a balance between uniform responses while still allowing the AI to be creative. Fortunately, there are strategies you can employ to achieve a more predictable interaction.

Give examples of how you want it to respond

It sounds almost too obvious, but you almost need to talk to ChatGPT like you are a teacher giving directions for an assignment. The more examples and specificity, the better. If you want exactly 3 bullet points, say it and say it often!

Prompting can seem really silly sometimes the way you have to be so verbose, but more often than not being specific is better. It is often best to be explicit in the format you expect to receive.

ChatGPT Response example

written by: austin

You are a data analyst that is highly skilled at finding trends in data. You are tasked with looking at a set of data and counting the number of times a person has bought a product. You also are tasked with counting what items the person bought. The data typically comes in CSV format, which is separated by columns.

An example of an input is:

Arthur Smith,Beach Ball,1
Arthur Smith,Sandals,1
Bill Jones,Beach Ball,1

Here is an example response from the data above:

Arthur smith,2
Bill Jones,1

Beach Ball,2
Sandals,1

Now that you know what an example response looks like, respond in the same way given the data below.

{# the_data #}

Remember, only respond like the example above.

As you can see in the example above, we specifically told ChatGPT to respond in a very particular way. We needed a format that could easily be a CSV and this allows us to do that. It also gave more context on the type of data processing and results we expected as well.

You will also notice that we repeat ourselves a few different times to only use the response format. We have found that repeating those types of instructions really help on making sure the response is standardized.

There are also a few formats that can be used for common tasks depending on what you are doing. Below we cover those formats that you could leverage.

Markdown

If you are generating content, asking for markdown format can be helpful. Markdown is a lightweight markup language that formats plain text, much like you would in any text editor.

Even if you aren't using a content management system that supports markdown it can be useful to have text formatted in markdown so you know where the AI set formatting. It is helpful to know what is supposed to be a header, bolded, or a list so you can translate into your own content.

To get a markdown response from ChatGPT, simply specify your request at the beginning of your prompt with "provide an answer in markdown format." By doing so, you'll receive the response with clear formatting indicators like # for headers, ** for bold text, and - or * for bullet points. This gives you a clearer understanding of the intended presentation of the content, allowing for easy adaptation into various platforms and tools.

HTML

If you are looking to embed your response into a website, it can be helpful to ask for HTML. By asking ChatGPT to format its responses in HTML, you can easily incorporate the output directly into your website's code. For instance, if you want a response to be highlighted as a heading, you can request it in <h1> or <h2> tags. Similarly, for bold or italicized text, you can receive responses wrapped in <strong> or <em> tags respectively. This not only streamlines the process of content integration but also ensures that the presentation of the AI-generated content remains consistent with the design and layout of your website.

JSON

For the developers out there, you can also get a JSON response, which is particularly helpful when using the ChatGPT API. You can easily get JSON to use within your application if you are very specific. Here is an example of getting a JSON of translated words for Japanese.

Example ChatGPT JSON Response

written by: austin

Can you give me the top 100 Japanese phrases I will need when traveling? Please give the english and Japanese translation and pronunciation in JSON format like this:

{'english': hello, 'japanese' , 'japanese': 'こんにちは', 'pronunciation': 'konnichi - wa'}

Only return JSON, no english.

Giving the structure of the JSON is crucial if you want consistent responses, which is important for building web apps. You should provide the shape of the data you want in order to make sure your code always knows what to expect from ChatGPT.

There are always more formats

Our examples above are just a few options you can try out when using AI tools. There are near infinite ways you can ask these tools to output your response, so get creative!

You might also like