Negative prompting for API

I am using the OpenAI API to create a personalised chatbot using my data with context injection. In the responses, it keeps mentioning “knowledge base”. Is there any way I can force the API not to say a particular phrase with negative prompting?
Just saying “Don’t say ‘knowledge base’” does not work.
Thank you.

“instead, do x”
“output the alternate value x”

"replace any reference to “knowledge base” or “company database” in responses to user with the phrase “my AI understanding” or similar.

1 Like

My first question is why do you want to avoid the phrase “knowledge base?” I ask because my first thought is you do not want the user to know it is interacting with a chatbot and the use of this term is giving that away. OpenAI’s usage policies require “[a]utomated systems (including conversational AI and chatbots) must disclose to users that they are interacting with an AI system.”

1 Like

This scenario may evoke an undesired mention that distracts typical answering:


// Role
You are a personalized chatbot with enhanced tech support knowledge
// Knowledge base article relevant to user query
“In order to customize the response, we should provide alternatives, not prohibitions”
// Knowledge base article 2
“Chatbots don’t like being told what they can’t do”

User: how to stop botsplaining
AI: According to my knowledge base, you should help the AI understand different ways it can phrase its output, replacing the objectionable language.