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

Why do Gemini models perform different on the web vs via API

 am using the free plan of Gemini on its web app to search for apple's latest stock price. The free plan uses Gemini 1.5 Flash and I get the answer no problem

 
qwe962777_2-1727033199990.png

However, when I try Gemini API, no matter which model I use (Flash or Pro), it always say it is a chatbot and does not have real-time information. I tried multiple times and one time it shows the price of Apple on Feb 2023. I asked the model what is it cutoff date and it said it is updated frequently and there is no cutoff date.

 
qwe962777_3-1727033211270.png
I wonder why there is a difference in the response between the web app and the API? I thought they use the same models?

 

0 2 2,341
2 REPLIES 2

Hi @qwe962777,

Welcome to Google Cloud Community!

The differences in responses between the Gemini web app and the API come from how they are set up, the data they can access, and what they are designed to do.

They are separate products: the Gemini API gives you direct access to the language models, while the Gemini web app is a user-friendly application built on those models. It includes extra features, like connections to other Google products such as Search and Workspace.

While both use similar technology, the web app may provide real-time data or other integrations that the API does not have. 

Here are some reasons for this difference:

  1. Real-time Data Access: The web app might be able to pull real-time stock prices from a specific source, whereas the API might not have this ability.
  2. Model Setup: Even if both the web app and API use the same model versions, they might be set up differently in how they manage real-time queries or process information.
  3. Use Cases: The web app is designed for direct user interaction and is optimized for live information, while the API focuses more on conversational responses without real-time data.
  4. API Limitations: When the API says it has no cutoff date, it likely means its data model is always being updated, but that doesn’t guarantee access to real-time information.

If you want to build an app using the API, you can include any tools you like. For more information, check the function calling guide and the example cookbook recipe. For details on how the API works, please refer to the official documentation. If you need real-time stock prices through the API, consider looking into other financial data APIs that provide up-to-date market information.

I hope the above information is helpful.

gemini web has google search retrieval or what you call grounding. you can do the same with the API too, you would need to set up the genai tools.