How to remove unwanted terms in a response

We’re generating social media posts for conference sessions. The engine results continue to add the same terms in the responses like, “Session Spotlight”, and “exciting news”. We’d like to instruct these and other terms not be used in the chat completion response but have been unsuccessful to find a reliable way.

We’ve tried Don't use terms like \"Session Announcement\" and \"Session Spotlight\" in both the system and user message with mixed results.

Another is emoji, some responses have many emoji in them. Instructing something like use no more than 2 emoji in the response didn’t seem to help. Use no emoji seems to work.

I guess what is being asked is what are the recommended ways to instruct the model not to use certain terms in a response? Are these types of prompts better to be used in the user message or the system message?

Thank you.

Generally it’s not a good idea to have negations in your instructions. I was goign to suggest logit_bias but that probably wouldn’t work (unless you’re okay with completely removing “Session” and all words that begin with “Exc”)

So why not run the finished result through GPT again to wordspin it and remove any of these unwanted words?

More importantly: why don’t you want this words? Is it because they are occurring too frequently in your posts? What are your prompts? Are you using some type of copy pasted structure?

You can try “Instead of Session Announcement, use < Whatever phrase you prefer >”

1 Like

I guess because I don’t have a finished result. I was kind of looking for the model to help with coming up with different results for posting 60 sessions across 4 social media platforms by providing the title and description of the session.

Interesting approach. What if I have a lot of these?

Is it better practice to use quotes to match on things or not? For example:
Instead of "Session Announcement", use "this instead"
Instead of Session Announcement, use this instead"

I’m not sure what you mean by this. Here’s a nice article by OpenAI which helps with prompting. I have directly linked one of the best practices that relate to here. They are using completions in the examples but the idea is still the same for chat completions.

In regards to the emojis. I do think you’ll find better, more controlled results by having a “refinement” stage. Worth a shot maybe?

Not sure. It’s testing time! If I had to bet it would be the first one

1 Like