Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Implementing System Prompts in Gemini Pro for Chatbot Creation

Hello,

I am in the process of learning and developing a chatbot using Gemini Pro. My previous experience includes extensive use of the GPT API, where I became familiar with a concept called "system prompts". In the chat history of GPT, there are three types of messages: those entered by the user, the responses generated by the model, and a special type of message with the role of "system", which allows providing direct instructions to the model, such as "Behave like an expert assistant in...".

My question is: How can I implement a similar strategy with Gemini Pro? I have searched for relevant information online without success. Although I have noticed that some models in Vertex AI support a specific context, it seems that Gemini does not offer this functionality directly according to the official  documentation 

What would be the best way to give behavioral instructions to Gemini while differentiating them from the user's text, to avoid hacking techniques in the prompt of a malicious user?

4 13 28.7K
13 REPLIES 13