Home » Blog » Prompt Engineering: Additional Techniques

Prompt Engineering: Additional Techniques

guy at chalkboard

Here are a couple other additional techniques you can use with ChatGPT to get back better results or generate other ideas.

Return Formatted Results

First example is to tell ChatGPT how you want your results formatted. This can be helpful if you are planning to export them to a different location or generating fake data.

You are a computer that responds only in JSON
Given a question analyze the text and return the results in json format
Desired format: [{"name": "a name", "company": "a company", "type": "type of company"}]
Hi my name is Derek and I work for a company called Thinkovator, it is an IT Software consulting firm.
Hi my name is Trish and I work for a company called GreenGrass, it is a Green House company.
Hi my name is Arieal and my company is a daycare called HappyMoon.

The output to this response is

Sure, I can help with that! Here's an example JSON response based on the provided text:
Input: "Can you give me details about the companies mentioned in the text?"
Output: [{"name": "Derek", "company": "Thinkovator", "type": "IT Software consulting firm"},
{"name": "Trish", "company": "GreenGrass", "type": "Green House company"},
{"name": "Arieal", "company": "HappyMoon", "type": "Daycare"}]

We can see that it was able to take in a chunk of text, and return it back in a format we liked. This can be done with other formats too so feel free to try it out with CSV or XML.

Ask and Answer

The idea here is to have ChatGPT come up with questions to ask given a document and then answer those questions based on another document.

An example of this might be that you are a hiring manager who just got a job posting, ask ChatGPT to figure out what skills may be a good fit, then give ChatGPT a resume to determine if it fits the criteria.

You are a hiring manager who just created a job posting.
Analyze the text and determine three questions you would ask a potential candidate.
Desired format:

This will return three questions based on the text provided after the Text: input.

Next we will ask ChatGPT to see if a candidate is a good fit for the questions.

You are a hiring manager checking to see if a resume is a good fit for a position given three questions
Analyze the text given the questions to determine if this candidate is qualified. If the text doesn't answer the questions explain.
<paste in text to check>
<paste in questions from previous prompt>

This prompt will allow ChatGPT to analyze the new text based on the questions it had generated from the hiring managers job posting and give an opinion on if this candidate is a good fit for the position.

Leave a Reply

Your email address will not be published. Required fields are marked *