Getting ChatGPT To Put Information Into Tables

When i prompt my API assistant to add information to a table it only seems to be able to create the first part but not the complete table. Anyone know if I need to do something beyond prompting ‘add this information to a table’? When I use my normal ChatGPT account it works every time.

Any tips are appreciated.

Here’s what I’m getting when I prompt my assistant to add this information to a table.

Exercise | Sets | Reps | Rest — | — | — | — Kettlebell Goblet Squats | 4 | 8-10 | 60 seconds Kettlebell Romanian Deadlifts | 4 | 8-10 | 60 seconds Single Arm Kettlebell Rows | 4 | 8-10 per arm | 60 seconds Kettlebell Shoulder Press | 4 | 8-10 | 60 seconds

Thanks

Curt

That looks like it’s default of giving you a MARKDOWN table. If you want something else like CSV, or HTML you can just ask for that instead. There might be a ‘format’ option on the API itself which lets you specify output file format, but I just haven’t done that. You can check to see if that exists.

1 Like

Hello @curtpedersen ,
If you are using the playground then it’s just a formatting issue. Your output is a table markdown formatted, as noticed by @wclayf, but without the newline character at the end of each line. With all newlines chars at the end of every row your output is:

| Exercise | Sets | Reps | Rest |
| --- | --- | --- | --- |
| Kettlebell Goblet Squats | 4 | 8-10 | 60 seconds |
| Kettlebell Romanian Deadlifts | 4 | 8-10 | 60 seconds |
| Single Arm Kettlebell Rows | 4 | 8-10 per arm | 60 seconds |
| Kettlebell Shoulder Press | 4 | 8-10 | 60 seconds |

ChatGPT it is a graphical program, so it can print the table ‘as a table’, even if the output from the model misses newlines.

Using the formatting option of the editor of this forum, a markdown one, your data looks like:

Exercise Sets Reps Rest
Kettlebell Goblet Squats 4 8-10 60 seconds
Kettlebell Romanian Deadlifts 4 8-10 60 seconds
Single Arm Kettlebell Rows 4 8-10 per arm 60 seconds
Kettlebell Shoulder Press 4 8-10 60 seconds

In the playground I saw that only the model gpt-4-0125-preview can output the table ‘as a table’ using only text formatting. In my prompt I have specified Output table markdown formatted, any row in its own line using your provided output as prompt. The resulting table is:

So, a couple of advices:

  • try different model, such as gpt-4-0125-preview
  • try to add format specification, such as markdown formatted, any row in its own line.

Hope it helps.
Ciao

1 Like

Thanks very much. I’ll give this a try.

Curt