Get sources from google_search tool use
Is there any way to get source urls as part of the output from an agent using google_search tool? Have tried to use instruction prompt, but it did not work. Appreciate your help re whether this is something supported now and any suggestions re workaround. Thx!
The event returned from the agent has a grounding_metadata field which I have seen populated when the search tool is used. That doesn't get it into the actual response but maybe it can help?
Hi all, don't worry we got you! With the next release update, UI web will show the sources of google search, and you can also click each chip to go to the page if you want!
(And @forrestrice is right, the grounding_metadata has groundingChunks that has this information!)
Something like this:
Awesome! Great if you could have these in the event.content, for ease of picking this up in log / for further post-processing for citation. Looking forward to the next update. and thanks, @forrestrice !
My recommendation is to read directly from event.grounding_metadata. If you want to include it in event.content, you can use a callback to read from event.grounding_metadata and format it however you want then insert into event.content. Since everyone presents this different in event.content, we leave this to developers.