Image link not correct

I prompted for “links to images on London” to the Gemini API Extension for Firebase but the links in the responses (all pointing to jpgs in wikimedia) do not work. I checked with wikipedia and they say the jpgs do not exist in their library.

prompt : I am looking for a link to an image of London
response : Image of London

When I type the url into the browser, I get the following error message from Wikimedia Foundation :

Error

Our servers are currently under maintenance or experiencing a technical problem. Please [try again]in a few minutes.

See the error message at the bottom of this page for more information.

If you report this error to the Wikimedia System Administrators, please include the details below.

Request from 2001:d08:d4:871f:bdf6:176f:5d7e:8ebb via cp5026 cp5026, Varnish XID 1051014743
Upstream caches: cp5026 int
Error: 404, Not Found at Thu, 20 Jun 2024 12:17:01 GMT

I wrote to Wikipedia and received the following reply :

…file has never existed on Wikimedia Commons…

We do have files named similar, listed on e.g. Search results for "File:London_Houses_of_Parliament_from_the_London_Eye.jpg" - Wikimedia Commons

Edward

2 Likes

Welcome to the forums!

If you’re using the Gemini API, remember that Large Language Models such as Gemini are not sources of truth and often hallucinate. They are pattern machines - not answer machines, and are designed to return things that continue the pattern well. So they tend to return things that look good, but have no guarantee about accuracy.

Solutions to this include “grounding” the results with some definitive source of truth. Such as Wikipedia itself. Many times you’ll hear about techniques that include “Retrieval Augmented Generation”, which involve using the LLM to “understand” what the user is looking for, other tools to fetch potential answers, and then the LLM to summarize those answers.

Good luck!