AI replying with [Your Name]

We are using Gemini 1.5 Pro in a conversational manner, providing a system instruction to the prompt, as well as a history of messages from the model and user.

Every once in a while the model responds with [Your Name] in the message, or [Your Store Name]. We have added in the instructions to not use placeholders for names. Any ideas on how we can prevent the model from using placeholders?

Any help would be appreciated.

You could do some post processing on the text to filter out placeholders

I am also having the exact same problem. I am adding every possible instructions to remove the placeholder, bracketed items etc., but it is still showing up.

Can you please elaborate what do you mean by adding text filters during post processing?

I believe he means use text replace to just replace all [placeholders] with brackets to an empty string. The problem with that is sometimes then the sentence doesn’t make sense.

Give it the name. What i’ve done is rather than having plain-text input - take JSON input (not to be confused with JSON Mode). My input schema looks a bit like this:
{“username”:“Username/Name”,“question”:“User’s input goes here.”,“conversationHistory”:“My backend currently doesn’t support conversation history so I put the conversation history here. quite useful imo”}