Forum Academy Marketplace Showcase Pricing Features

Chat G.p.t content restrcutre

How do i reformat questions and answer that was generated from chat G.p.t to seperate the questions from the answers

You can use Regex. Tell ChatGPT to format the answer in a certain way e.g

'Structure your answer as follows:

variableQuestion: Question content here

variableAnswer: Answer content here’

Write a Regex script that extracts the content after variableQuestion: and before variableAnswer: and saves that to a database thing. And extract with regex everything after variableAnswer: and save that to a thing.

It requires some prompt engineering and isn’t perfect. Maybe there are services that can structure ChatGPT’s response for you (but in reality they’re doing this or they’re asking ChatGPT to structure ChatGPT’s response in a JSON :laughing: )

I’ve recorded a video tutorial on just this! Personally I think anyone who can make heads or tails Regex is a wizard.

But Bubble provides an effective workaround, using the Split by text modifier.

Okay pls can you write a regex expression ? do you understand how to work with it ?