Show HN: Web search using a ChatGPT-like model that can cite its sources (beta.sayhello.so)

318 points by rushingcreek ↗ HN
We’ve trained a generative AI model to browse the web and answer questions/retrieve code snippets directly. Unlike ChatGPT, it has access to primary sources and is able to cite them when you hover over an answer (click on the text to go to the source being cited). We also show regular Bing results side-by-side with our AI answer.

The model is an 11-billion parameter T5-derivative that has been fine-tuned on feedback given on hundreds of thousands of searches done (anonymously) on our platform. Giving the model web access lessens its burden to need to store a snapshot of human knowledge within its parameters. Rather, it knows how to piece together primary sources in a natural and informative way. Using our own model is also an order of magnitude cheaper than relying on GPT.

A drawback to aligning models to web results is that they are less inclined to generate complete solutions/answers to questions where good primary sources don’t exist. Answers generated without underlying citable sources can be more creative but are prone to errors. In the future, we will show both types of answers.

Examples:

https://beta.sayhello.so/search?q=set+cookie+in+fastapi

https://beta.sayhello.so/search?q=What+did+Paul+Graham+learn...

https://beta.sayhello.so/search?q=How+to+get+command+line+pa...

https://beta.sayhello.so/search?q=why+did+Elon+Musk+buy+twit...

Would love to hear your thoughts.

193 comments

[ 5.2 ms ] story [ 227 ms ] thread
The current market leader in this seems to be https://metaphor.systems/

Could you talk about how it's similar or different?

Metaphor is cool, but it's a different product. They use language models to generate links, while we use them to generate answers.
> The inference service could be unavailable - we have alerts for this and will be fixing it soon.

> In the meantime, try searching this on Google or DuckDuckGo. You can also prefix your question with !g or !ddg shortcuts. You may have to enable popups for this to work.

We were temporarily overloaded. Fixed now.
Still getting "inference service could be unavailable".
Been using this for a little bit. Fascinated to see if this gets more traction now that it’s being pitched in this way and with all of the buzz of “ChatGPT is going to eat searches’ lunch”
So happy to hear that you've been using Hello already. We've been picking up the pace of improving our models.
I'm getting "The inference service could be unavailable".
If you guys want to launch a consumer business, you need a domain that can be said across the dinner and remembered and typed correctly by the person on the other side. Any other domain means you depend on your future users finding you through Google, your main competitor. Find a better domain if you want to grow.
You're completely right. We have a much better one that we'll be switching to soon.
It gives answer that vaguely look like answer should look like but all the important details are wrong.

> A solar eclipse is a partial eclipse of the Sun caused by a solar coronal mass ejection . A solar coronal mass ejection occurs when Earth passes directly in front of the sun.

> You will also need to calculate number of seconds it takes for earth to rotate around the sun which is calculated as Math.PI * 2 / 60

> how do i mix two colors (hexadecimal rgb string) in js

> ANSWER

> To mix two colors in JavaScript, you can use the color-mix property. This property takes three parameters: the colorspace, the color to be mixed, and the percentage of that color to mix. For example, to mix the colors #FFFFFF and #8FBC8, you would use the following code:

> let newColor = document.createElement;

> // Outputs: #8FBC8

This is all just wrong from beginning to end. It seems to be confusing JS and CSS, too.

I mean with all the data on the internet it's hard to differentiate between what's right and wrong. Perhaps your question can also be refined to:

"How do I mix two colors in vanilla JavaScript?" This doesn't confuse rgb string and it still asks the same question.

Ok, but if I use this to ask about something I genuinely need help with, how am I supposed to know that? And I don’t really think the problem is that it can’t differentiate between sources that are right and wrong. The sources are perfectly fine. It’s the summary that is bananas.
They did a Launch HN recently: Launch HN: Hello (YC S22) – A search engine for developers'[1]

Nothing much has changed since. So they appear to be trying to cash in on the interest in ChatGPT.

Interesting they didn't include that they are backed by Y Combinator in the recent S23 cohort. Is being backed by YC a negative for startups here now?

[1] https://news.ycombinator.com/item?id=32003215

The models have gotten significantly better since our Launch HN. It might as well be a different product now from a UX point of view.
Yes, the answer I got was nonsensical too:

> what is the diameter of the sun in sun radii

> ANSWER

> The diameter of the sun in solar radii is 1,392,000 km. This is calculated by taking the mean radius of the sun, which is 432,450 miles , and multiplying it by the circumference of the sun, which is 2,715,396 miles .

The correct answer is, of course: 2.

BTW: Google is also confused, but not in the same way, returning:

2.0018 R(sun)

Doing unit conversions or general math is a known weak spot. I believe that 1,392,000 km is the correct diameter of the sun -- it just doesn't know how to convert those units.
No, it's exactly

2 * 695700 = 1391400

based on the most recent measurement from 2015:

https://en.wikipedia.org/wiki/Solar_radius

Any other value found on the web is based on some older estimate or some arbitrary approximation.

The radius of the sun is not exactly 695,700 km. The radius of the sun is approximately 695,700 km.

The nominal solar radius, which is and is intended to be an approximation, is defined to be exactly 695,700 km.

(comment deleted)
Well, that's what these language models do in a nutshell. If you think social media and blogs are bad in terms of misinformation, this is the same thing rehashed by a machine that can not actually think or judge for itself (which to be fair, is arguably almost on a level already with how some humans interact with information they consume online).

I asked some controversial questions and the answers are interesting to say the least. The source is often reddit, random sites that are probably the top search engine result or some yellow press outlet.

(comment deleted)
This is something that makes me a bit uneasy as someone who lives from a blog.

I make the phone calls to gather and synthesise information that previously wasn't online. I don't like the idea of AI just paraphrasing my work without credit, and getting it wrong to top things off. It's bad enough when Google and lazy SEO copywriters do it. I do the work, they get the value.

I feel the same as a programmer (though I'm no longer a professional one). I didn't release all that open source code to train a for-profit AI.

I'd be even more upset if an AI was used to immitate my artwork and deny me the recognition. Thankfully I'm not that skilled.

I've seen convincing counter arguments to this, but I can't help feeling wronged by it. I feel like it enables a few to rob many of the fruits of their labour at an unprecedented scale.

I'd rather not be attributed if it's getting things wrong.
To the "Why did Elon Musk buy Twitter" question it says things like:

"Additionally, he was offered a high enough price by the shareholders that they were willing to sell their shares to him."

or:

"He acquired Twitter in April 2016 for $44 billion."

what is the path integral of a european swallow

ANSWER The path integral of a European swallow is the sum, or functional integral, over an infinity of quantum-mechanically possible trajectories to compute a quantum amplitude. This formulation has proven crucial to the understanding of how birds fly and migrate. For example, during migration, barn swallows cover 200 miles a day at speeds of 17-22 miles per hour, with a maximum flight speed of 35 mph. In their wintering areas, they feed in small flocks which join together to form roosting flocks of thousands of birds.

That's a pretty neat use of AI for a subset of use cases. I like it. I just asked it "Why does JavaScript keep crashing", with no particular details, and it was smart enough to show me how console.log() works in order to try and debug this unknown error. It feels good, like asking a friend for help.

I am curious, how do you decide on what kind of content goes in the links bar? It doesn't seem be just news, or just links. I am having hard time figuring out when to resort to the links, vs just using the AI response.

The links are just regular Bing results.
So what sources does it cite?
If you mouseover the answer paragraph, you'll see the relevant url / search result. You can click to go to that source.
Those sources appear to come directly from the Bing search results. So it's just pulling information from whatever Bing frontpages for the query?
Exactly, we use some information from traditional search engines as input to our model.
11B is a chonky model! Curious to hear what kind of hardware you used to train it. GPT-J (a 6B model) was trained on a v3-128, I think, so this is about 2x that.
This latest model was trained on a distributed multi-node cluster of 8 servers each with 8 NVIDIA A100 GPUs. Need a lot of GPU memory when training with long sequence length.
Was it trained on Common Crawl Dataset or custom scraping ?
As a follow up to that question, which I’m also very curious about.

Do we have rough estimates of the training GPU compute needed to train GPT-3 and has OpenAI said anything about compute resources used to train ChatGPT?

Interested to see a GPT version of this and compare.

How about a browser extension that scrapss Google results and asks GPT to summarise?

There are many prompts beyond summarisation that would be interesting, for example ask GPT to present conflicting point of views in the results.

We're always actively exploring different prompting - a general question answering prompt most definitely won't work for all searches. Finding what people agree on and disagree about in e.g a reddit thread could be very useful.
It's nice that it allows unsupported countries from openapi.
really like the ability to cite sources, great effort
Looks interesting but I keep encountering:

The inference service could be unavailable - we have alerts for this and will be fixing it soon.

Just an FYI if you aren’t getting those alerts.

Thanks, we're getting 10+ requests per second at the moment. Frantically scaling to keep up. Didn't expect this post to blow up so fast!
I am amused that, once upon a time, it was a not uncommon joke that an inept user might sit at their computer and type into a search bar "Please take me to my email" or ask their search engine "I would like a recipe for cookies".

Turns out those folks might have been ahead of their time. :D

>I would like a recipe for cookies"

This has been doable on Google for years. Maybe not the same kind of intent understanding but enough keywords are there that you would end up getting lots of results for cookie recipes.

yep, it's super interesting to watch how cheap and plentiful compute starts to change the way we live
> "Please take me to my email"

Results in

"To take you to your email, you will need to sign in to your account. Once you are signed in, open your inbox to check your mail. You can also use the Help tab to contact customer support or see training videos. Additionally, you can right-click an email in the Message List to show more message options and right-click the Reading Pane for additional email commands such as translation. Finally, you can use Search to find other commands or search through your email, contacts, and calendar."

Citing resources from google and microsoft support.

I like the idea. I think separating out creative writing from fact retrieval makes a lot of sense and the attempt at a single general AI that can do both is clearly not there yet.

It's slow as hell, though. Maybe a more limited invite-only beta would have been a good idea if your infra isn't there yet, compared to an announcement on Hacker News. It spun for 5 minutes doing nothing, then eventually gave me an inference engine down message. Retried and it spun for another 5 minutes doing nothing. Tried a third time, and at some point while I was back here reading the comments again, it loaded an answer finally. Tried a fourth time and got the inference engine down again.

The inference seems to be taking very long and it gets stuck at times forever (> a few minutes). My guess is that this is happening due to the load? How fast is this when it's not under load? Is it as fast as ChatGPT?
It is faster than ChatGPT normally. We're frantically scaling our infra right now.
The p50 time is around 2s end to end not under load. Bear with us as we scale our systems!
Great! All the best scaling :) I'll give it a shot again in a bit.
how many ducks can fit into a cargo van

> Answer

> It is impossible to answer this question as there is no way to determine how many ducks can fit into a cargo van. The dimensions of the back doors on U-Haul cargo vans are 5’1-1/2′′ x 4’1-1/2′′ , and you have 9’6′′ x 5’7′′ x 4’7′′ in the cargo area totally 245 cubic feet of space for your household goods. This means that it would be difficult to fit more than 6,000 ducks at a time, while large farms usually have around 50,000 and 100,000 ducks reared simultaneously. The middle ground is 10,000 to 50,000 per batch.

It looks like you’ve stumbled upon the next big “impossible question” that is going to require future technology to help us solve.

It is interesting to see how it attempted to “solve it” though (I put that in quotes since it isn’t actually doing the math)

If you can't find the information yourself via a web search, it's going to be difficult for the model to find the answer too... for now ;)
This looks similar to https://www.perplexity.ai/

I tried Perplexity this morning with the following prompt:

"What is the evidence for and against systematic phonics instruction?"

It not only gave me the stuff 'everyone knows' but also pointed to a 2020 paper that goes against the conventional wisdom. (I had read that paper a few days ago, and was curious whether the AI would mention it.).

There's a reason why you can't do this commercially and why Google isn't doing it already... Pulling the meat of the content from a site like StackOverflow ends up as a copyright/anti-trust violation.

I'm fairly certain that this was the reason why Google had to tamp down it's rich results that were made mostly from Wikipedia entries.

More recently it was shopping...

"Google argues that ‘rich results’ in Search provide more direct experience in antitrust suit response": https://9to5google.com/2020/12/17/google-search-antitrust-re...

"Google loses appeal, faces €2.4 billion shopping antitrust fine": https://arstechnica.com/gadgets/2021/11/google-loses-appeal-...

Thinking more on this... I don't think any of these sites will live if they get big enough. And if enough of them pop up it'll draw tons of attention from content sites.

If you want to show that data you'll end up having to work out a license from StackOverflow. Possible, but far more difficult than the current ease of plug-and-play GPT drop-in.

Do we really think Google hasn't thought of this exact thing already?

Stack Overflow user content is licensed under the Creative Commons license, so it's possible you actually could satisfy the license terms. That said, IANAL, and I have no idea if it's possible to fulfill the SA clause without distributing the model, or something like that.
Google is already working on LaMDA and Imagen for conversational search experiences, which is why these projects also wax poetic about "AI safety" -- you don't want to synthesize a politically incorrect or socially unacceptable response to a question asked.

Apart from the copyright issues that parent mentions, there's also the issue of LLM spewing BS confidently, which is why Google has been hesitant to roll it out as their default.

But it's siting the sources, how is it a copyright violation?
Citing does not confer a license
You don't need a license to cite others.
But what about when you're also reproducing the content on your own page like what's being done here?
It's tricky but you don't need a license for that either.

With tricky I mean that only under very specific circumstances you would be infringing copyright laws, like maybe if the content was private in the first place; but then in that case you wouldn't be infringing copyright either, you would just be breaking privacy laws/terms.

I honestly can't think of an example where you would get in trouble by citing a piece of content that belongs to someone else, but I'm not closed to the possibility that it could happen.

> only under very specific circumstances you would be infringing copyright laws

It's the reverse of this. Any work public or not by default is all rights reserved to the owner. The fair use doctrine provides an exception from this if you meet specific criteria.

An extreme example, you cannot just upload a complete movie and just add "credit to disney".

> you wouldn't be infringing copyright either, you would just be breaking privacy laws/terms.

Maybe we're from different countries, but with US law it would be either under theft, the computer fraud/abuse act and/or copyright violations, there are no privacy laws applicable here unless we're talking about PII.

Extracting very specific examples from an article or blog is almost certainly going to fall under fair use. However I've seen several cases where it essentially just returns an entire article as the answer which would certainly be legally ambiguous.

Look up the fair use doctrine. You can reproduce parts of content.
One of the four factors is market impact which in this case would likely fail.

In the words of ChatGPT:

> When determining the potential impact on the market for the original work, courts will consider whether the use of the copyrighted material is likely to harm the market for the original work. This may include whether the use of the copyrighted material would compete with the original work, such as if it is used as a substitute for the original work or if it would reduce the demand for the original work.

As such this is at least not clearly a fair use case. (And arguably quite possibly a not fair use case)

It's not, I disagree with GP's argument. Safe harbors in copyright law exist to allow this.
It's quite likely a fair use violation...

1. the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes; 2. the nature of the copyrighted work; 3. the amount and substantiality of the portion used in relation to the copyrighted work as a whole; and 3. the effect of the use upon the potential market for or value of the copyrighted work.

Particularly 3 & 4.

https://en.wikipedia.org/wiki/Fair_use#U.S._fair_use_factors

Tho now I think about it more, it might be damaging the site money of income (ads, etc). But it's still not a copyright violation.
"it might be damaging the site money of income"

Which is one of the key factors of determining Fair Use and Fair Use falls under copyright.

It could also be bringing new money to those sites by referring users to them.

So, ¯\_(ツ)_/¯.

The issue with Google had more to do with antitrust behavior than with copyright infringement.

I might be bringing new money to movie publishers by pirating their movies and sending clips to my friends, but that's not a valid basis for calling it fair use
Safe harbor covers hosts of user uploaded content. The copyright owner can pursue the infringer, they are not protected by safe harbor.
You're confused, copyright != antitrust violations.

Both sources you provide have zero mentions of the word 'copyright' in them.

Those lawsuits have to do with Google's dominating the search market and using that to their advantage in ways that are allegedly unfair.

Copyright law actually allows a service like Google to exist in the first place.

According to OP's model, for anyone wondering:

>Copyright infringement and antitrust violations are two distinct types of improper use. Plagiarism is an ethical violation that occurs when someone attempts to pass off someone else's work or ideas as their own, without properly giving credit to the original source. It is not against the law, but can have serious consequences such as failing grades, termination, and difficulty finding new employment. On the other hand, copyright infringement occurs when a party takes an action that implicates one or more of the rights listed above without authorization from the copyright owner or an applicable exception or limitation in the copyright law, such as fair use. The most common antitrust violations fall into two categories: agreements to restrain competition and efforts to acquire a monopoly.

The possibility that a LLM could trigger a copyright violation strengthens the narrative that Google is harming smaller business, and thus can easily be used as a data point in an antitrust lawsuit.
Yes, thank you. I’m neither confused nor disagree with you. I simply cited the most recent, easily found examples where Google ran afoul for rich results.

There are plenty of examples out there, as mentioned the ones prior to the recent shopping ones. Feel free to dig.

The reason is likely simpler:

- It is expensive (~0.5c per generated answer)

- It is (currently) slow (2-3 seconds to result)

- It is hard to place ads inside direct answers (probably the most important)

If it's a good result I'm sure there are many people that would pay 1c per search. I've made 16 searches today, far less for stuff I didn't find with ddg. If I was after something specific I could charge my account with $5 and search away.
I agree, but that is not how Google search (currently) operates.
Great opportunity for someone to disrupt

Costs are only going to come down.

Those problems don't seem insurmountable, especially if it is 10-100x better than Google.
What's funny is that most of this ground breaking LLMs you see now are based on Google published research about transformers, and they have better performing models in house than anything publicly available on the market.
> Pulling the meat of the content from a site like StackOverflow ends up as a copyright/anti-trust violation.

Then how did ChatGPT do it?

Note that pulling the meat of the content from StackOverflow isn't copyright violation though, as long as you follow the license (which is Creative Commons something-something but probably fine for this particular application).
Out of curiosity, what kind of costs are we incurring per query?

I don't know that much about these AI systems aside from that it's apparently too big to run on my own PC. Having a powerful but regular desktop system temporarily dedicated to answering my queries is quite a lot of compute power already and apparently that's not enough for something like Dall-E or chatGPT.

Perhaps to avoid being pinned down on this later ("why is this so expensive if it only costs X"), it's probably good to multiply any answer by five or ten, or factor in some of the development time/costs.

I can't find the citation, but someone related to OpenAI said that ChatGpt cost a few cents per query.

Anecdotally, I looked at running an open-source GPT competitor from Meta (OPT), and the requirements for running that are vaguely on the scope of "8 GPUs with at least 400gb of GPU memory" which would be VERY expensive, even in the cloud.

An 8gpu AWS EC2 instance costs $3.40/hr (p2.8xlarge), and if the model runs for 20s per request (roughly how long chatGPT takes me to get a response), that gives you $0.02 a request, not including things like storage or idle capacity. So a request could likely be $0.05-0.1, not including overhead like dev costs, training, etc.

What does aligning models to web results mean?
The answers are explicitly based on information found on the web instead of some knowledge found within the model parameters.
Asked the same history question[1], "what was the french-speaking population of france during the french revolution", multiple times and got different answers each time. Each answer was wrong about at least one significant detail, and in one answer it decided to just not try to answer the question I asked.

Attempt 1: The population was about 25 million (in line with estimates) and only 3 million spoke specifically Parisian French (a potentially accurate statement, but not what I asked). The sources it cited had contradicting information — 23 million instead of 25 million total population — or additional context that would've answered the question accurately, such as about half of the population speaking some form or quality of French.

Attempt 2: "The French-speaking population of France during the French Revolution is estimated to have been around 29 million people" — completely wrong across the board. One cited source is a Statista user-created graph that gives 24.8M for revolutionary France and 29M for France in 1800; it also has no details about language use. "This figure is based on demographic analysis conducted by Gudin and confirmed by a crosscheck with the graph showing population changes in France between 400 B.C. and 1975 contained in Colin McEvedy and Richard Jones, Atlas of World Population History." This is lifted almost verbatim from another cited source, but the source's next paragraph acknowledges discrepancies important to the context, including potential errors by Gudin or his translator. The source also has no details about language use.

Attempt 3: "The French-speaking population of France during the French Revolution was estimated to be around 55.81 million people, according to a 2007 Adult Education survey by the Insee. This survey found that French was the mother tongue of 87.2% of the total population, followed by Arabic , Portuguese , Spanish and Italian . People who spoke other languages natively made up the remaining 5.2% of the population." Completely wrong. The only cited source is the "Languages of France" Wikipedia article.

1: https://beta.sayhello.so/search?q=what+was+the+french-speaki...

Thanks for trying it out - we're still quite early so the model isn't going to be perfect + we're focused on programming related queries at the moment. What is your use case? Are most of your searches related to history?
Most of my searches are related to researching and fact-checking potentially spurious statements, like the ones that Hello apparently produces.

This particular query about the French revolution seems to give GPT fits across its iterations, and I suspect it's because:

- the most correct answer is "I don't know"; when answering questions, GPT isn't really trying to answer a question by reasoning through it, it's trying to mimic what usually happens after someone asks a question, and especially online that usually isn't someone saying "I don't know"

- the most authoritative sources on subjects like this include books, and GPT doesn't seem to read a lot of those, or if it has then it doesn't seem to be able to cite them without inventing false details about the sources themselves (titles that don't exist, attributing works to the wrong authors)

Seeing "model that cites sources" made me excited that there was a solution to the second point. But specific to Hello:

- the most authoritative web sources are historians who cite sources, which aren't often written for SEO, on popular platforms, or not paywalled

- a search result being in a first page of Bing/Google doesn't make it authoritative

- this doesn't seem to stop GPT from coming up with false inventions/hallucinations that aren't in or relevant to the cited source at all

You're right - there are so many good sources not often surfaced by a cursory web search like books and experts. Adding better sources is something we're improving on. A simple next step we're looking into is to expand sources to research papers e.g explicitly pulling from arxiv on some queries.
There's zero attempt to cache answers or cited sources, I suppose, because I keep getting different answers even from the same cited source just by clicking the search icon on the bar with the same query:

"The French-speaking population of France during the French Revolution was estimated to be around 25 million people" (wrong, citing that same Statista graph that doesn't mention language use)

"It is difficult to accurately estimate the French-speaking population of France during the French Revolution, as there was no official census taken at the time." (honestly the most accurate answer yet, but citing that same Statista graph)

"It is impossible to accurately estimate the French-speaking population of France during the French Revolution, as there is no reliable data available. However, it is estimated that around 80% of the population spoke French in 1800." (first sentence is correct, second is wrong, citing that same Statista graph)

"At the time of the French Revolution, less than half of France's population could speak French. This was due to a combination of factors, including the fact that French was an extremely popular language with the elite and higher classes, as it was adopted by nearly all European courts and it even reached the other side of the Atlantic." (cites a babbel.com article; I think the first sentence is the first time the answer approaches both accuracy and consistency with both the question and source, largely by plagiarizing part of the source. It still omits useful context about the lack of literacy/fluency that's in the same sentence lifted from the source. Then it goes back off the deep end with the second sentence, which the source uses to emphasize how broadly French was spoken, and not as a reason why so few people in revolutionary France spoke French.)

Interesting, we are trying to wrangle with the nondeterminism but sometimes it can't be helped as Bing itself can produce different results. Always actively working on the model though.

The citing sources feature can definitely be improved - right now it works at a sentence granularity and insists on finding the best source when sometimes not appropriate. Thanks for pointing all of this out