令人费解的书呆子式Emacs
Perplexingly Book-Learned Emacs

原始链接: https://lars.ingebrigtsen.no/2025/04/17/perplexingly-book-learned-emacs/

作者探索了使用Perplexity AI的API来追踪自己喜爱作家的新书。他们编写了一个简单的Emacs库(perplexity.el)来用作者姓名和已有的书单查询Perplexity,目的是找出缺失的书籍。虽然注册和获取数据非常简单,但结果却很不一致且不可靠。 LLM经常会幻觉出一些不存在的书籍,或者在多次查询同一个作者时提供不同的书单。响应时间也波动很大。尽管存在这些缺点,作者还是发现了一个用例:查询Perplexity以获取追踪作家的近期作品,尽管它难以同时处理多个作者,需要逐个作者进行查询。作者指出,Perplexity的回应似乎基于网络搜索,并且可能限制了搜索次数。虽然输出结果并非万无一失,但作者仍然认为这个项目是值得的。

Hacker News 最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 令人费解的博学 Emacs (ingebrigtsen.no) 6 分,来自 tmseidman,2 小时前 | 隐藏 | 往期 | 收藏 | 讨论 加入我们,参加 6 月 16-17 日在旧金山举行的 AI 初创公司学校! 指导原则 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系我们 搜索:

原文

As I was whining yesterday, it’s perplexingly difficult to find a (semi-)programmatic way of determining whether an author has written a new book. Or even manually in some cases. The best advice is, like, “Follow them on Goodreads” or something?

But I wondered whether I could finally find something useful for an LLM to do? Sure, LLMs are plagiarism machines that use all of the world’s energy, but what can it do for me? So I signed up for the Perplexity AI, and an hour later:

Yes, I’m a prompt engineer now.

I’ve gotta give it to Perplexity — signing up for the API, adding some money and getting it to spew some data at me was totally painless. I created a little library called perplexity.el (and put it on Microsoft Github), but it’s totally trivial: It just does a url-retrieve request with some headers set, and you get JSON back.

So in the screenshot above, it’s listing all the books by David Sedaris it knows about, and also helpfully what kind of book it is.

That’s OK, and it’s of course trivial to just use that to list books that are newer than the last book I have from him. So I guess I could use this to automatically get all new books from the authors I’m interested in.

I also did a variation where I asked “list all the books by this author, but exclude books on this list:”, and then list all the books I already have by this author.

And as you can see, that, er, kinda changed what it’s outputting? Now it’s including a lots of plays that it didn’t before?

Typically enough, LLMs give different answers every time I ask, so this isn’t, you know, data to be relied on in any way. Sure, it’d be better if it was actual data instead of hallucinations and LLM navel lint, but it’s better than nothing.

The response times from Perplexity are all over the place — sometimes it responds within a couple seconds, and sometimes it takes a minute, but whatchagonnado.

Let’s test another author:

Amy Hempel. She’s awesome. I hit the m command (to list “missing” books), and:

All those three are books that exist! And that I don’t have.

I tried asking it again, and then it only listed two of these books — the non-repeatability of the results is annoying, but again, LLMs are toys, and if you get anything useful out of them, that’s nice, but your expectations can’t be low enough.

For giggles, let’s try this a “list missing books” on Megan Whalen a few times:

1st.

2nd.

3rd.

Oh well. I tried adjusting the temperature, but no go. I guess I could run the query several times and aggregate the results, but it’s already pretty slow…

After using this for a handful of authors, I’m now deep in debt. OK, perhaps not from the API usage, but because I’ve bought, like, fifteen books while just testing things out here…

I’ve added convenient commands to the search buffer to go to bookshop.org so that I can shop, as well as Goodreads to check whether the books actually exist. (They mostly do, but there are of course some hallucinations.)

And now I can also do that thing I wanted where there are certain authors that I track, and then query Perplexity for books they’ve released the last few years. Let’s see, I’ve marked a few authors, and:

Let’s repeat that:

And again:

*sigh*

Heh, if I remove Anthony Horowitz, I get:

Sure, sure… If I have just Stross and MacLeod, I get:

OK OK OK.

Is there a way to make Perplexity try, like, harder? (This is with Sonar Pro.) The prompts are in the package.

[Edit an hour later: OK, I guess I get it… Perplexity is based on web searches, and it just doesn’t like to do a lot of searches? So I’m going to have to loop through each tracked author and then aggregate the results.]

But… it does actually kinda look like even I managed to find something actually useful to use an LLM for, even if it’s literally janky? Actually?

Whodathunk.

联系我们 contact @ memedata.com