Show HN: HackYourNews – AI summaries of the top HN stories (hackyournews.com)

335 points by ukuina ↗ HN
Hey there HN!

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.

[1] https://hackyournews.com/

[2] https://www.cloudflare.com/web-analytics/

[3] https://github.com/guidance-ai/guidance

169 comments

[ 3.3 ms ] story [ 243 ms ] thread
Perfect. Now I finally don't have to click the links
I hope you'll click into the more interesting ones, though!
It looks like the "de-hyped title" and summary for this submission ended up coming from the current top story on the NSO iPhone 0-day?
Thanks for pointing this out. Will correct this shortly!
I think this will always be a problem for links that are aggregators of other articles, since the body of the destination page is effectively a mix of summaries. For now, I've overridden the summary of the comments as the summary of the article.
Could you constrain the LLM by asking for a “summary of the sections regarding <insert HN headline here> and ignore other sections” or something similar ?
Interesting idea. So far, GPT-3.5 is good at general instructions and bad at following specifics.
(comment deleted)
I'm not sure I would ever use this.

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.

(comment deleted)
This is a valid point. There are inherent biases to any language model. The responses may also be colored by the prompt used to summarize the information.

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!

I really like this. I just read about 2 stories (of significant interest) whose titles I'd glanced at but hadn't clicked on on HN. Also like that it summarises the comments, as some posts tend to be conversation starters and the really interesting stuff is in the discussion (as opposed to the link/artcile).
I agree, the comments section is usually more interesting than the article. The comments are especially useful for the opposing viewpoints (i.e., why the article is wrong or missing important caveats).
I’m the type of person who reads the comments first and if the comments are interesting enough, maybe I’ll check out the article.
I really like the look of it, especially as a slow reader. I couldn't see a way to click back over to the HN comments. Nice work!
Thanks! Clicking the "N comments" link takes you to the HN comments section for that article. The browser's back button should take you back to HackYourNews from there.
This is really great! Sometimes the titles of stories are very generic and the comments are very specific, and this bridges the gap.
Thank you. Do you find the "Dehyped title" useful in those cases?
Could you add RSS to it?
Exactly my thought - I consume everything through fulltext RSS, but for HN I only get the title and links to the article and comments (through hnrss) - having summaries would be a great improvement! A great alternative would also be if there was some kind of an API to access the summaries
RSS is on the roadmap!
This is great, Also the wealth of knowledge lies within the comments. I wish there was a way of getting the overview of the comments under each post
There is, it's included beneath the summary of TFA.
Thank you. There should be a summary of comments right below the summary of the article.
This is a great app! You might want to put Summary and Comments as headings or at least make them bolder for easy scanning.
Thank you, yes they need to be more conspicious. Done.
Great idea! Recommending tweaking the prompts so it uses more concise language without filler words (it seems to like starting with'The article is about...' or 'This is a discussion of').
Thanks. Yes, conciseness in summarization is much needed. Will look at the current SOTA for prompting to improve it.
Summaries are now more concise, and the dehyped titles are more useful.
This is great. If it was really intelligent it would be smart enough to move what's buried deep in the article to the front of the summary.

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!

Thank you so much!

Will tweak the prompt to not bury the lede.

The dehyped title doesn't mince words now!

> 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.

What is the 'rating' based on? Thanks for having dark/light responsiveness!
Thank you and you're welcome.

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.

Ratings have been removed.
This is cool. I’d add a feature to toggle between short, medium and longer summaries. Hell, I wouldn’t mind just bullets.
Thanks! Bulleted summaries are a great idea. Toggles would require JS, will look into this.
I was talking with ChatGPT4 about how best to summarize comments. Landed on sorting them into a few categories:

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

This is a great idea, thanks!
I didn't expect to actually like it, well done for making me change my mind :-)

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".

Awesome! Thank you for trying it out.

Will work on improving the conciseness of the summary and also surface the mood of the discussion.

Yeah some instruction to be as concise as possible would help, and on the comments summary an instruction to not discuss hacker news or that it’s comments.
Congrats on a great idea well executed!

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.

I also think the article summary could be a bit more snappy and to the point.
This is very helpful! I see that a GitHub gist/file isn’t summarized and just mentions that it is code. What is the input to the summarization? Do you use the entire HTML (header, footer, sidebar, etc.) for summarization or do you do any processing between crawling and summarization?
Thank you! Currently, I pull the body of the page. Looks like this does not handle GitHub repos and Gists correctly. Will investigate further.
(comment deleted)
I don't think I'd use this in its current form. Its abbreviated the article but still not enough.

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.

Thanks for the feedback. I think someone else also suggested allowing control over the summary verbosity. Will think of a way to provide this as an option.
Due to the styling, the text is unusably difficult to read, at least for me.
I've implemented some stylistic suggestions like spacing, sizing and emphasis. I generally prefer the Mobile view (accessible from the navbar); it works best on every device I've tried, and honors the OS dark mode setting to boot.
Congrats on the launch, @ukuina! Neat idea. Would love to learn more about how you are querying the summaries/comments database and how you are planning to extend the queries in this app.

Shameless 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!

[1] https://github.com/georgia-tech-db/evadb

Probably not the point, but shouldn't you be able to choose to sample only the tokens for "positive" and "negative" (they're both one token!) instead of (or in addition to) needing to put a request for model to restrict its responses in the context?
Interesting observation :)

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.
mm, no, not unless you're doing some LIKE-specific optimization (and even then, I think you'd want "positive%").

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.

Yes, it should be "positive%". That's an interesting LLM-level optimization.

Doesn't this token sampling optimization require using a locally-running model like Llama?

I am presuming that OpenAI doesn't provide direct access to token probabilities in its API.

Funny to see the site itself sitting at the 3rd position right now and the AI summarizing its own page. It seems to be using content that is not shown on the page though, maybe an og:description meta tag. Otherwise it would be spiraling in an infinite loop of summarizing itself.

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.

Good catch! Yeah, summaries of summaries are quite problematic.

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.

> The frontend is pure HTML+CSS.

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.

The Mobile view honors your OS dark mode setting!

I need to read up on media queries, thanks.

This works surprisingly well! I would probably just switch to using it instead of the native HN interface if it had the other article action buttons. Mainly I want to “hide” the summaries that I’ve already seen.
Thank you! I wonder if this can be done with purely client-side storage, or if I have to implement user accounts and sessions.
Stepping back: you’ve made a great POC for AI summarization. Probably building a great reader front-end is a separate project.

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?

This will be very useful! I missed a lot of interesting stories in HN just because the title seems unrelated to me.
Thanks, I feel your pain! The dehyped title is mostly an improvement.