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

Google AI Studio shows empty system instruction for all saved prompts that had system instructions

I used AI Studio (aistudio.google.com) to create prompts. These included System Instructions. 

I've been using and modifying (and saving, of course) them for the last couple months, using them across devices. 

I wanted to change something about the System Instructions today, which I haven't done in three weeks and noticed that the System Instruction were displaying as empty (Showing the default "Optional tone and style instructions for the model" in gray). I then checked and realised that this was the case for all of my prompts that used System Instructions.

That said, by going to the files in drive I was able to recover the system instructions, as they were still in the files. Interestingly enough, using the "get code" option in the AI Studio UI return no system instructions for files that do have system instructions in the plain text (JSON) of the file. Additionally, the model does not adhere to the system instructions that are still in its corresponding JSON file.

I then created a mirror of one of the files using the UI and was able to confirm that the JSON of the newly created (using the UI) file that shows the system instructions (SHOW) and the file that doesn't show system instructions (NO-SHOW) are completely identical, except for the model that NO-SHOW uses (models/gemini-1.5-pro-exp-0827), since that is no longer available in AI Studio.

Mounting drive to a colab notebook, renaming to include the .json ending then modifying the JSON of NO-SHOW in Colab to use models/gemini-1.5-pro-002 instead of models/gemini-1.5-pro-exp-0827 leads to the system instructions showing again. However, trying to run the model will always (8 out of 8 attempts) return a "An internal error has occurred." error response within 0 to 1.5 seconds.

Thus I switched to another model (models/gemini-1.5-pro) using the UI, saved, then switched back using the UI to models/gemini-1.5-pro-002 and saved again.

Running now returns the expected results, and adherence to the system prompt is given. Additionally, "Get Code" now correctly shows the System instructions.

Interestingly enough, replacing the model name in the JSON with a random string will cause the model to switch to models/gemini-1.5-flash but WILL show the system instructions as expected. Replacing the model name back to models/gemini-1.5-pro-exp-0827 will once again not show the system instructions, neither in UI or "Get Code", meaning this bug should be reproducible.

I would thus assume, there is currently an issue that affects how the JSON of prompts using the gemini-1.5-pro-exp-0827 is read. Interestingly, a file with gemini-1.5-pro-exp-0827 as its model is not redirected to using models/gemini-1.5-flash, but instead to models/gemini-1.5-pro, suggesting that it might be an issue in the vicinity of the custom redirect, but what do I know.

I was originally going to write this as a request for help (since I'm on the Basic support plan), but over the course of writing the answer actually figured out how to fix is, so this is now more of a "how to fix" for people with similar issues and a bug report for the devs.

1 0 1,381
0 REPLIES 0