Starting today, developers using Google’s Gemini API and its Google AI Studio to build AI-based services and bots will be able to ground their prompts’ results with data from Google Search. This should enable more accurate responses based on fresher data.
As has been the case before, developers will be able to try out grounding for free in AI Studio, which is essentially Google’s playground for developers to test and refine their prompts, and to access its latest large language models. Gemini API users will have to be on the paid tier and will pay $35 per 1,000 grounded queries.
AI Studio’s recently launched built-in compare mode makes it easy to see how the results of grounded queries differ from those that rely solely on the model’s own data.
Turning on grounding is as easy as toggling on a switch and deciding on how often the API should use grounding by making changes to the so-called “dynamic retrieval” setting. That could be as straightforward as opting to turn it on for every prompt or going with a more nuanced setting that then uses a smaller model to evaluate the prompt and decide whether it would benefit from being augmented with data from Google Search.
“Grounding can help … when you ask a very recent question that’s beyond the model’s knowledge cut off, but it could also help with a question which is not as recent, … but you may want richer detail,” Shrestha Basu Mallick, Google’s group product manager for the Gemini API and AI Studio, explained. “There might be developers who say we only want to ground on recent facts, and they would set this [dynamic retrieval value] higher. And there might be developers who say: No, I want the rich detail of Google search on everything.”
When Google enriches results with data from Google Search, it also provides supporting links back to the underlying sources. Logan Kilpatrick, who joined Google earlier this year after previously leading developer relations at OpenAI, told me that displaying these links is a requirement of the Gemini license for anyone who uses this feature.
“It is very important for us for two reasons: one, we want to make sure our publishers get the credit and the visibility,” Basu Mallick added. “But second, this also is something that users like. When I get an LLM answer, I often go to Google Search and check that answer. We’re providing a way for them to do this easily, so this is much valued by users.”
In this context, it’s worth noting that while AI Studio started out as something more akin to a prompt tuning tool, it’s a lot more now.
“Success for AI Studio looks like: you come in, you try one of the Gemini models, and you see this actually is really powerful and works well for your use case,” said Kilpatrick. “There’s a bunch we do to surface potential interesting use cases to developers front and center in the UI, but ultimately, the goal is not to keep you in AI Studio and just have you sort of play around with the models. The goal is to get you code. You press ‘Get Code’ in the top right-hand corner, you go start building something, and you might come back to AI Studio to experiment with a future model.”