#Stop ChatGPT from giving me an intro to a list

9 messages · Page 1 of 1 (latest)

broken latch
#

Trying to use the ChatGPT API in a Python project. However, instead of just returning a list like I ask it to in the system prompt at the beginning, it sometimes gives me an intro to the list e.g. "Sure, here's a list of ideas...". How do I stop it from doing this and just get it to dump a straightforward list out please?

broken latch
#

Seems to be a bit better now I've added the following to the end of the user message:

Do not give an intro, summary or any other niceties.
JUST PRINT THE LIST. Do not prefix the titles with a number.```

Is this the best way to keep it on task?
sharp arrow
#

I've tried telling the API to format the response as a JSON object

broken latch
#

Ah, that's a good idea. Thanks!

broken latch
#

Sort of worked - kept giving me back JSON in all different structures though which made it a bit difficult to work with.

tiny star
#

It should be a simple as adding to the prompt, "Please respond only with the list."

tardy hull
#

Telling the model NOT to do stuff doesn't work nicely, do what @tiny star said, be explicit and direct in what you're asking

#

"Give me a list of 5 blogk post titles. Respond only with the entries in the list"

mystic kayak
#

"Do not include introductions or conclusions"