Hacker Newsnew | past | comments | ask | show | jobs | submit | otsaloma's commentslogin

I've been experimenting with using LLMs for a content recommender system. Specifically I've built a news reader app that fetches news articles from multiple RSS feeds, uses an LLM to first deduplicate and then score them. The user can then rate the articles and those ratings are used as few-shot examples in the LLM scoring prompt. Any resulting low score articles (uninteresting to the user) are hidden by default and visible ones scaled by their score on a dynamic CSS grid like on a traditional newspaper front page. Looking good so far, but still testing and tweaking.

https://github.com/otsaloma/news-rss


Nice project.

One thing I’ve always disliked about RSS (and this could actually fix it) is duplicates. When a new LLM model drops for example there are like ~5 blogs about it in my RSS feed saying basically the same thing, and I really only need to read one. Maybe you could collapse similar articles by topic?

Also, would be nice to let users provide a list of feed URLs as a variable instead of hardcoding them.


Looking at the console messages with the LLM reasoning, it does seem to work quite nicely for deduplication. Your example is probably even a lot easier than news articles, where you can have many articles from different viewpoints about the same event.

I don't actually plan to run this as a service so there's some things hard-coded and the setup is a bit difficult as you need an API key and a proxy. Currently it's just experimentation, although if it works well, I'll probably use it personally.


https://www.newsminimalist.com/ has been doing this for a couple of years with reasonable success. I think yours is a fresh take, I like it.


Ive been working on something similar, have you had any issues with the LLM not giving you back a full response for all the input? Ive been using Chat gpt but even on the same request sometimes id give it 20 things to rank, and Id just get back 3 results


No, it's been working without problems so far. I'm using Anthropic for what it's worth. I ask the LLM to first do some reasoning and then return a JSON array on the final line. Sometimes I've seen some Markdown backticks there, but no irregularities more than that.


My favorite of the year would be Maxim Gorky's three-part autobiography: I read "Childhood" and "In the World" (a.k.a. "Amid Attendants") and just started the last part "My Universities". Gorky drifted as an orphan from house and job to another and describes an interesting array of characters he came across, mostly poor and misfortunate, but many of them good as well.

"He took me under the arms, lifted me up, kissed me, and placed me firmly on the jetty. I was sorry for him and for myself. I could hardly keep from crying when I saw him returning to the steamer, pushing aside the porters, looking so large, heavy, solitary. So many times since then I have met people like him, kind, lonely, cut off from the lives of other people."


It's unfortunate that Python and R don't really have any out-of-the-box means of opening data files from arguments, but if you do this kind of stuff on a daily basis it's something that you can set up. My not directly usable examples below.

Python (uv + dataiter, but easy to modify for pandas or polars): https://github.com/otsaloma/dataiter/blob/master/bin/di-open

R (as per comment, requires also ~/.Rprofile code, nanoparquet in this case): https://github.com/otsaloma/R-tools/blob/master/r-load



Agreed! It's easy understand "LLM with tools in a loop" at a high-level, but once you actually design the architecture and implement the code in full, you'll have proper understanding of how it all fits and works together.

I did the same exercise. My implementation is at around 300 lines with two tools: web search and web page fetch with a command line chat interface and Python package. And it could have been a lot less lines if I didn't want to write a usable, extensible package interface.

As the agent setup itself is simple, majority of the work to make this useful would in the tools themselves and context management for the tools.


Something similar for GNOME: https://github.com/ghi59/floating-mini-panel

Been using it for a couple weeks now and find it really nice. Tried some auto-hide panel extensions before, but this is much better.


I used to hate matplotlib because of its awful API and awful API documentation. These days I just ask an LLM "add thousand separators on the y-axis", "add a vertical line ar zero" etc. and now I never need to look at the API documentation and it feels somewhat tolerable.

LLMs feel to me a nice fit here because there's just so much users might want to do with the chart styling. Past approaches that I've seen offer some kind of "quick selections" of common stuff and while they can help you get started, they quickly become annoying when you need to add some final tweaks not covered by the tool/API/whatever.


Hmmm, yeah. This is an interesting comment because the process you've described is essentially exactly what I am considering building. CSV + prompt -> chart. I've already done a few examples with LLM's generating structured data that renders to a SVG, but haven't tried it for charts yet. No doubt the majority of users would not be technical enough to work with matplotlib as you're describing, so I wonder if there is alpha in making something like this for total non-tech people.

Thanks for the input!


I think the choice of using functions instead of classes + methods doesn't really fit well into Python. Either you need to do a huge amount of imports or use the awful `from siuba import *`. This feels like shoehorning the dplyr syntax into Python when method chaining would be more natural and would still retain the idea.

Also, having (already a while ago) looked at the implementation of the magic `_` object, it seemed like an awful hack that will serve only a part of use cases. Maybe someone can correct me if I'm wrong, but I get the impression you can do e.g. `summarize(x=_.x.mean())` but not `summarize(x=median(_.x))`. I'm guessing you don't get autocompletion in your editor or useful error messages and it can then get painful using this kind of a magic.


I don't quite agree, but if this was true, what would you tell a junior colleague in a code review? You can't use this function/argument/convention/etc you found in the official API documentation because...I don't like it? I think any team-maintained Pandas codebase will unavoidably drift into the inconsistent and bad. If you're always working alone, then it can of course be a bit better.


I have strong opinions about Pandas. I've used it since it came out and have coalesced on patterns that make it easy to use.

(Disclaimer: I'm a corporate trainer and feed my family teaching folks how to work with their data using Pandas.)

When I teach about "readable" code, I caveat that it should be "readable for a specific audience". I hold that if you are a professional, that audience is other professionals. You should write code for professionals and not for newbies. Newbies should be trained up to write professional code. YMMV, but that is my bias based on experience seeing this work at some of the biggest companies in the world.


Building on top of Pandas feels like you're only escaping part of the problems. In addition to the API, the datatypes in Pandas are a mess, with multiple confusing (and none of them good) options for e.g. dates/datetimes. Does redframes do anything there?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: