langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
92.32k stars 14.75k forks source link

3 different google search API varies a lot #8480

Closed kivinju closed 10 months ago

kivinju commented 1 year ago

System Info

Langchain 0.0.239

Who can help?

No response

Information

Related Components

Reproduction

The results I got from 3 different Google Search API Wrapper. The same thing happenes to the Agent with tool.

from langchain.utilities import GoogleSerperAPIWrapper
search = GoogleSerperAPIWrapper()
search.run("What's the Tesla stock today?")

'266.44 +10.73 (4.20%)'

from langchain.utilities import SerpAPIWrapper
search = SerpAPIWrapper()
print(search.run("What's the Tesla stock today?"))

Tesla, Inc. is an American multinational automotive and clean energy company headquartered in Austin, Texas. Tesla designs and manufactures electric vehicles, stationary battery energy storage devices from home to grid-scale, solar panels and solar roof tiles, and related products and services.

from langchain.utilities import GoogleSearchAPIWrapper
search = GoogleSearchAPIWrapper()
search.run("What's the Tesla stock today?")

"In this week's video, I cover need-to-know news items related to Tesla (NASDAQ: TSLA) during the week of July 24. Today's video will focus on what Tesla\xa0... TSLA | Complete Tesla Inc. stock news by MarketWatch. View real-time stock prices ... Here's What One Survey Revealed About Their Perception Of Elon Musk. Tesla is accelerating the world's transition to sustainable energy with electric cars, solar and integrated renewable energy solutions for homes and\xa0... Tesla's mission is to accelerate the world's transition to sustainable energy. Today, Tesla builds not only all-electric vehicles but also infinitely\xa0... Get Tesla Inc (TSLA:NASDAQ) real-time stock quotes, news, price and financial ... Please contact cnbc support to provide details about what went wrong. Feb 2, 2023 ... Tesla stock soared 41% in January, its best month since October 2021, leaving investors breathless and wondering what to do next. TSLA: Get the latest Tesla stock price and detailed information including TSLA news, historical charts and ... What are analysts forecasts for Tesla stock? Aug 25, 2022 ... The question now is what do Tesla investors expect the stock to do after the split. Tesla (ticker: TSLA) stock on Thursday was trading at\xa0... Aug 25, 2022 ... The electric car company completed a 3-for-1 stock split after the closing bell Wednesday. So one share now costs a third of what it did a day\xa0... Jun 30, 2023 ... Doubling your money isn't easy, and doubling it in just six months is even more difficult, so investors now have to decide: Is It time to take\xa0..."

Expected behavior

I except the result from these 3 API should be similar.

dmyoung9 commented 1 year ago

Are the API responses the same for all three APIs? I wouldn't necessarily expect them to be exactly the same... and if the agent gets three different responses, it's going to give three different outputs.

dosubot[bot] commented 10 months ago

Hi, @kivinju. I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

Based on my understanding, you raised an issue about the significant variation in results obtained from three different Google Search API wrappers. It seems that dmyoung9 commented and suggested that the APIs may not necessarily provide the same responses, leading to different outputs.

Before we close this issue, we wanted to check if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your contribution to the LangChain project!