335 points · by ukuina · 3y ago · 164 comments
I wanted to share a pet project of mine. I built HackYourNews [1] to scratch a personal itch: Knowing which stories to focus on while browsing aimlessly (though there is a certain joy in that, as well!)
HackYourNews uses OpenAI's gpt-3.5-turbo to summarize the destination article as well as the comments section. Summarization of the article is always cached, while summaries of the comments are regenerated if the comments count is >10% (or >10 comments) different.
While I styled the homepage to welcome HNers, my preferred view is the Mobile view, accessed from the navbar. This no-frills view honors OS-level dark mode and is easy to skim on any device.
Tried to keep the site minimal. The only JS is Cloudflare's privacy-preserving analytics [2], just to gauge interest.
This is the first time I'm releasing something to the wild.
Hope you find this useful!
The frontend is pure HTML+CSS.
The backend is NodeJS (Puppeteer) + Python with the excellent Microsoft Guidance [3] library to interface to OpenAI's API.
Slight feedback:
- Many "comments" summary start with boilerplate such as "This content discusses" which a bit annoying.
- It would be good to have a sense of "controversy" in the comments summary. Like some kind of general "mood".
Will work on improving the conciseness of the summary and also surface the mood of the discussion.
In my mind, the gold standard for engaging summaries is Seeking Alpha. As a random example, see https://seekingalpha.com/article/4633758-sell-amazon-before-...
If you could train the model to come up with well structured bullet points, the summaries would be amenable to scanning before committing to fully engage. This is just an idea, I am not sure what fraction of your readers would prefer bullet points.
> The article discusses the limitations of using LLMs (Language Model Models) and RAG (Retrieval-Augmented Generation) in AI systems due to the missing storage layer. The author points out two unstated assumptions: that similar vectors are relevant documents and that the vector index can accurately identify the top K vectors by cosine similarity. However, these assumptions are not always true, leading to the need for re-ranking and measuring the index's precision and recall. The comment section further explores the relationship between cosine similarity and relevance, as well as the use of different embeddings like Word2Vec and DistilBERT. Some commenters also discuss the benefits of using vector DBs for specific cases like customer chatbots. Overall, the article highlights the challenges and considerations in implementing LLMs and RAG in AI systems.
This makes me want to read the comments more because there’s some useful stuff, but I often would have gotten tripped up on the scale of the comment section and missed some of the more useful comments.
I think you're onto something. Congrats.
Small comment: the "dehyped" title does not seem very useful. For most articles it is almost the same as the original title, just rephrased. It should summarize the conclusion or whatever the meat of the article actually is. Repeating the same thing or similar is just a waste of time and space.
Also it seems broken on the site itself, but that could be the AI getting confused on what the actual page title should be. It picked the top story as the dehyped title, which I guess is understandable but when generating a title for a news feed, it's wrong.
The prompt for dehyping was not specific enough, but that (and a related bug) has been fixed. The dehyped titles make (more) sense now and are not the same as the HN article title.
Thanks! This is awesome!
Summary: HackYourNews is a website that uses OpenAI's gpt-3.5-turbo to provide AI summaries of the top Hacker News stories and their comments. The site offers a minimal design and a mobile view that is easy to skim on any device. The creator aims to help users focus on the most important stories while browsing aimlessly.
Comments: This Hacker News thread discusses a website called 'How Query Engines Work' that offers a free book on the topic. Users express their excitement about the resource and inquire about additional formats, such as ePub. Some users also ask for recommendations on similar websites or books. One user questions the accuracy of a statement in the book about the power of Spark, leading to a discussion on the features of Spark and its comparison to the Hadoop ecosystem. The thread also touches on topics like Apache Arrow and its potential impact on the database industry, as well as the future of PostgreSQL and the use of Apache Arrow in related projects.
Otherwise, this is very clever.
> Comments: HackYourNews is a website that uses OpenAI's gpt-3.5-turbo to provide AI summaries of the top Hacker News stories and their comments...
The Summaries and Comments sections are redundant with a lot of overlap. Why not just one summary instead of two per article? Also, can you tell GPT to limit summaries to two sentences or a max characters so I don't have to read so much?
It would be interesting to merge some of this functionality into the "Refined Hacker News" plugin. (Or even HN itself.) I'd love a chevron on the front page that I could expand to see the summary.
I wouldn't use it for the same reason I cultivate my own RSS feed and pay very little attention to mainstream media and mainstream social media.
I don't like the risks around outside forces shaping what news I get fed to me.
To address the latter, I am considering adding control over the prompt in a testable way. The former is (still) a matter of intense debate, and unlikely to be resolved soon.
I hope you're able to spot-check a few of the summaries to see if they are sufficiently unbiased, though!
> This file contains a collection of numerical facts and units conversions, as well as astronomical facts related to moving Mars to a more temperate location... The content is not particularly relevant to the current technology landscape or contemporary societal issues, as it seems to be more of a historical piece. It is not particularly innovative or groundbreaking, as it primarily provides basic numerical facts and conversions. The technical depth is moderate, as it provides detailed units conversions and constants. The clarity of the information is good for those familiar with Lisp, but may be less accessible to the general public. The content does not consider a diverse range of perspectives or voices, as it is focused on numerical facts and conversions. It does not appear to be research-backed or cite reputable sources. The impact of the discussed topic is minimal, as it primarily provides basic numerical facts and conversions. The timeliness of the content is unclear, as it does not specify when it was created. The engagement of the content is likely low, as it is a technical program rather than a piece of content that inspires discussion. The reliability of the source is uncertain, as it is a personal file created by John McCarthy. There is no self-contradiction in the content. The discussion quality is not applicable, as there are no comments.
> This file contains a collection of numerical facts and units conversions, as well as astronomical data related to moving Mars to a different location. The file can be loaded into Emacs and used within the editor. It provides various units of measurement and constants, such as the gravitational constant, Avogadro number, and Planck's constant. It also includes data on the masses, radii, densities, and orbital parameters of celestial bodies like Mercury, Venus, Earth, Mars, Jupiter, and the Moon. The file concludes with escape velocities and velocities of these celestial bodies.
Thanks for catching this!
And both summaries should be shorter.
How short till we start losing crucial information ? I think the length is good enough because you can get the absolute gist just by reading the title of the article.
E.g. in the post "Are any words the same in all languages?" the summary concludes with: "Finally, the article reveals the two words that are the same worldwide: coffee and chocolate."
That should be the first sentence in the summary.
Congrats on launching!
> The Shared Words in Almost Every Language: Coffee and Chocolate
The summary is also more upfront with the findings:
> There are a few words that are shared across many languages, including words for tea, pineapple, and orange. However, the two words that are the same in almost every language are 'coffee' and 'chocolate'. These words have spread across the globe and have been adopted by different languages with slight variations in pronunciation and spelling. The word for coffee originated from the Arabic word 'qahwah' and has been borrowed into many languages, while the word for chocolate is based on a Nahuatl word that was adopted by Spanish-speaking communities and then spread worldwide. Knowing these two words can make you feel connected to speakers of almost every language.
Will tweak the prompt to not bury the lede.
Bookmarked and looking forward to using it.
> This is a brief summary of a menu or selection of pieces available on a mobile app. The menu offers the option to choose a different piece and provides information about the app and its creator. It mentions that the app is available for free on Android and iOS platforms. The content seems to be truncated, so it is difficult to provide a more detailed summary.
For a canvas-based SPA, it's not very surprising, but it shows how trivial it would be to fool those new SEO tools before hydrating a different content.
This is my new favourite word for today
What I'd prefer is just a more appropriate AI generated title in as dense a sentence as possible.
OP: You should play with word lengths to see how short a title/abbreviation you can achieve.
I asked ChatGPT to 'summarize in as few words as possible' and I got this:
Citizen Lab found a zero-click vulnerability, BLASTPASS, exploiting iPhones to deliver NSO's Pegasus spyware via malicious PassKit iMessage attachments. Apple released an update; users advised to apply immediately. Discovery emphasizes advanced threats to civil societies; update protects global devices.
Consider some parametrization, like swapping dehyped title (better than orig!), and showing/collapsing summary and comments by default. Ideally via url params for bookmark persistence.
Yeah, I'll bet.
At first blush, I find this uselessly verbose. I get more out of just the headlines and I am already up to my eyeballs in plausible, zero-content boilerplate. I think our whole society has been since the 90s, frankly. Generally, filtering public comments through a language model reduces signal, papering over real humans' vital perspectives and misattributing to us bland cliche as above.
But congrats on getting something out the door! You have certainly built a tight little integration.
1. Surface-Level Content: Meme/Shallow Humor 2. Intermediate-Level Content: Opinionated/Analytical 3. In-Depth Content: Research-based / Thoughtful Discourse 4. Meta Level: Meta discussion about the platform, the discussion process itself or overarching themes
Would be interesting to see all comments given a rating icon from grey to red to green to white to make insightful comments standout more
On another note, I also made something similar but for cybersecurity news. It’s called Notify-Cyber, you can check it out here: https://notifycyber.com/
1) Main one - Separate stories more clearly. Maybe slightly outdent, enlarge, or bold the title, or add a little more space between stories so they don't all run together.
2) Some articles don't have content available for no apparent reason (Deciphering Mary Stuart’s lost letters from 1578-1584)
3) Filters would be nice (articles >rating, comment count, etc)
4) Collect a few more pages of articles instead of just one
1) I have increased the spacing between stories. Also, have you tried the Mobile view?
2) Looks like some websites are harder to parse than others. Some users have also reported similar issues with GitHub/Gists. Will investigate.
3) I've removed the rating for now. Will add filters to the roadmap.
4) I'm currently showing all 30 articles from the HN frontpage. Would you prefer fewer articles, but paginated?
For #4, I expected it work more like HN does, where it shows 30 articles but has a more button to get 31-60 and so on. At least 3 pages would be nice for those of us who keep reading past the first page.
It could be used in alternative HN front-ends--I would try it for https://hackerer.news as a default option.
One thing that could make the comment summary better is if the prompt could be along the lines of "what do the comments add to the article" to avoid duplication of the summary.
https://hackernews.betacat.io/
It has totally revolutionized my use of HN. It saves me a lot of time each day being able to scan the summaries to decide what to read.
It has better design than the OP's site, but don't know if the summaries are better or not yet.
Current article titles are pretty bad at explaining what an article is about. This in the web in general.
For example "my nodejs is as bit rusty " may be a good pun, but doesn't tell me anything.
[0] https://gist.github.com/ouatu-ro/3cca3b7a2cb978993a19a8b0592...
It's accessible from the navbar. That should scale correctly for your device.
max-width: 75ch;
margin: 0 auto;
on the center element being effectiveShameless self-plug: We are building EvaDB [1], a query engine for shipping fast AI-powered apps with SQL. Here is an illustrative query for analyzing food reviews stored in Postgres and generating responses for negative reviews:
SELECT ChatGPT("Respond to the review with a solution to address the reviewer's concern", review)
FROM postgres_data.review_table
WHERE ChatGPT("Is the review positive or negative? Only reply 'positive' or 'negative'.", review) = "negative"
AND location = “waffle house”;
It would be interesting to learn about the queries needed for supporting HackYourNews application. Would love to exchange notes on this if you're up for it!I guess this is the SQL query you have in mind that uses the LIKE operator:
SELECT ChatGPT("Respond to the review with a solution to address the reviewer's concern", review)
FROM postgres_data.review_table
WHERE ChatGPT("Is the review positive or negative?", review) LIKE "%positive%"
AND location = “waffle house”;
From a query processing standpoint, both queries should have equivalent performance -- unless we build an index over the output of the ChatGPT query in EvaDB, in which case the former query would be faster than this one.So like, at the end of all the decoders, the model gives you an output vector; you multiply this by your embeddings to get your token probabilities, then you sample from them to choose a token.
Instead of sampling, you could just look at the probabilities for the tokens "positive" and "negative" and return whichever of those two is highest.
I like your project better than distill AI because I can read the summaries on the front page without clicking each one. I think that eliminating a click to investigate an uninteresting article is the magic here.
In my case, I appreciate that HN tracks “hidden” items on the back end, because I use three different devices for reading.
What are your intentions with the project, going forward?
Is there an RSS reader already with this type of summarization feature?
I wondered why there is a special URL for mobile, since this could be easy done by media queries.
On a side note; I desperately need a dark mode and even installed an extension to make HN dark mode compatible.
I need to read up on media queries, thanks.
And agree, RSS will be a great addition.
How are you going to monetize it so it continues? Subscription?
Also, it'd be great to have a filter to show only the Top or Best news from the Week
Is it viable to incorporate translation capabilities?
I believe there's a substantial opportunity to cater to readers who aren't native English speakers.
In my trials, GPT4 was fantastic at this, but the pricing is 20x GPT3.5!
suggestion: it's still fastidious to browse 5+ stories and one would want to skip some stories after reading the title.
creating a view with drop-down would be super useful to me
The rating is an averaging of many dimensions of qualitative assessment like conciseness and relevance, but GPT3.5 is very nondeterministic with the values it conjures up. I may remove it or break the factors apart for scrutiny.
I'm liked the concise summaries, and your mobile styling is on point.