How to prompt GPT to remove unnecesary characters?

Hey guys,

I use gpt api to extract information and return it in json format so I can use it programmatically.

Now I have this case where somebody puts his name like this in the source:

So now gpt extracts the first name as <FIRSTNAME and the last name as LASTNAME.
I want to extract it like this; firstname: Firstname, lastname: Lastname.

I tried adding this to system- and user prompts:
Leave out unnecessary formatting and caps.

It doesnt lead to the desired results.

My system prompt is this:

You are a information retrieval machine that takes unstructured text, structures it according provided json schema, and outputs json only.

Any ideas here?

1 Like

Woops. Issue was caused by something else.

I use a function that’s basically
is just a “search n’ grab” in the response.

1 Like