Replicating ChatGPT search via API

Has anyone figured out a good way to replicate chatgpt search functionality via api and tool calling? I can provide the api tools to perform a google search and then read a webpage but it is just not as good as chatgpt search… I’ve spent A LOT of time figuring out the best way to programaticly run google searches and read webpages which is actually much more challenging than you’d think… I’m curious what others are doing here.

2 Likes

Interesting, I see this is a very frequent topic.

Can you share which functionality is missing?

1 Like

Hi @TheWarden !

ChatGPT search uses Bing search under the hood. However, getting good search results is a massive technical and theoretical challenge, so don’t be too hard on yourself! A lot of it boils down to performing re-ranking on the results, in order to improve recall@N (where N is usually top 20 retrieved results). Some of the methods you can try out:

  • Perform some kind of quality assessment on each of the retrieved results - these are normally heuristic or rule based (e.g. see how Wikipedia does it here)
  • Use keywords to refine or re-rank the results
  • Keep track of the number of clicks on the links you provide in your results, and use those as a signal of how relevant those sources are for a particular query
  • Provide thumbs up/down to get direct assessment of the results from the user (not a lot of people click on that, but the ones that are very unhappy usually do!)

Hope that helps!

2 Likes

Awesome thank you. The websearch results are ingested by the AI before providing summary results to the user so hard to get the click level feedback but the thumbs up/down could be helpful.

1 Like

functionally nothing is missing, more of a quality / relevance issue