Mid-conversation system instructions in the Gemini API

(blog.google)

46 points | by gmays 2 hours ago

6 comments

  • AyishikD 18 minutes ago
    Hi, it's good that we can change system instructions or tools in middle of a conversation. Without losing the prompt cache. But one of the thing is that the most recent instruction actually wins, which is the same rule as memory systems , start with for changing facts, and it's where I found the trouble. I also did a work on storing agentic memory, and I found that the newest wins broke when a newer statement only looked like it replaced an older one but was actually something else. Example, produced in India and shot in English are two separate facts, but not one replacing the other. I had to add a check for whether the new statement really replaces the old one. I have a small question that can you actually remove or expire an earlier mid-conversation instruction, or can you only pile newer one on top?
  • s_u_d_o 1 hour ago
    Any useful workflows on where this feature would be beneficial? Let’s say an agent is exposed to two tools, one of them requires user authentication. If user not authenticated, tool will always fail. What added value would i get, if i only introduce this tool to the agent whenever the user is authenticated. By added value I’m interested in knowing what would i gain (token-wise, security-wise…)
    • nr378 59 minutes ago
      "Native" deferred tool loading is the main thing - you ideally don't want to load all possible tools upfront as it bloats the context window, instead you add a tool_search tool that can then append tool schemas into the toolset on-demand. OpenAI and Anthropic have had this feature for a few months but Gemini had been missing it.
    • cyanydeez 46 minutes ago
      Tools are context. Dont add context unless ypu intend to use it

      Call it "Chekov's Context"

    • orweis 15 minutes ago
      [dead]
  • aidos 1 hour ago
    I’m surprised that a system prompt carries that much more weight (snort). What makes a system prompt special? I’m assuming it’s still just a blob of stuff for the llm and they’ve finetuned the llm to place more importance on the system prompt? Are there ways in which this bites us in terms of not being able to force the model to do what we’re trying to do through user messages?
    • orbital-decay 1 hour ago
      It's just training, just like everything related to role separation. Fundamental biases make the model resist it if anything, roles always leak and mix up to a degree.

      >Are there ways in which this bites us in terms of not being able to force the model to do what we’re trying to do through user messages?

      Google can and will inject their own instructions dynamically.

  • holysoles 1 hour ago
    As a pi user that defers loading of tools and skills, I find this very exciting. When deep into a session with a frontier model and I know it will need another tool, I usually am weighing the cache invalidation cost hit vs handing off to a new session.

    Hoping other providers will follow suit!

    • pavelrub 57 minutes ago
      The other two major providers already allow doing this.
    • onyx47 20 minutes ago
      [dead]
  • irthomasthomas 46 minutes ago
    How can they do this?
  • pavelrub 1 hour ago
    Note that this was already possible in Claude API for quite some time, so this is more of a case of Google catching up, not a new innovation.