Lurker News
I'm a big fan of the BBC podcast In Our Time -- and (like most people) I've been playing with the OpenAI APIs.

In Our Time has almost 1,000 episodes on everything from Cleopatra to the evolution of teeth to plasma physics, all still available, so it's my starting point to learn about most topics. But it's not well organised.
So here are the episodes sorted by library code. It's fun to explore.
Web scraping is usually pretty tedious, but I found that I could send the minimised HTML to GPT-3 and get (almost) perfect JSON back: the prompt includes the Typescript definition.
At the same time I asked for a Dewey classification... and it worked. So I replaced a few days of fiddly work with 3 cents per inference and an overnight data run.
My takeaway is that I'll be using LLMs as function call way more in the future. This isn't "generative" AI, more "programmatic" AI perhaps?
So I'm interested in what temperature=0 LLM usage looks like (you want it to be pretty deterministic), at scale, and what a language that treats that as a first-class concept might look like.

Comments (171) 49 threads

Earlier comments
simonw4 replies#
I wanted to see which speakers had been on the most episodes.

I went to https://genmon.github.io/braggoscope/guests and opened the Firefox DevTools console and ran this:

    guests = Array.from(document.querySelectorAll('ul a.text-blue-500.underline')).map(el => ({
      name: el.innerText, count: parseInt(el.nextElementSibling.textContent.slice(1, -1), 10)
    }))
Then this:

    guests.sort((a, b) => a.count < b.count)
    console.log(JSON.stringify(guests, null, 2))
The top few were:

    [
      {
        "name": "Simon Schaffer",
        "count": 24
      },
      {
        "name": "Angie Hobbs",
        "count": 23
      },
      {
        "name": "Martin Palmer",
        "count": 22
      },
      {
        "name": "Steve Jones",
        "count": 21
      },
      {
        "name": "Paul Cartledge",
        "count": 20
      }
genmon1 reply#
I think Angie Hobbs will take it! Looks like she is referred to with a few different names in the episode notes and I’ll need to merge them manually (will be 25 appearances)

(btw thanks for datasette. I use SQLite as an intermediary db and datasette was invaluable for exploring and refining queries.)

I_complete_me#
Lots of great contributors to the show over the years. My favourite is Steve Jones for his huge intellect, humility, knowledge and listenabilty - yeah it's the right word for someone like him. I've listened to a lot of episodes (some many times over). I'll just mention The Migration of Birds as a sound listen.

However, Melvyn is an "interesting" catalyst but still great to fall asleep to. Long may it continue.
I believe there is sister program with a younger female presenter. Name escapes me...

FearNotDaniel#
Ah, now that's interesting, having attended Schaffer's lectures at uni many years ago, I wasn't sure if it was my imagination that I seemed to hear his mellifluent drone coming out of the wireless more and more often these days... at last a stat to back up my hunch!
nextaccountic3 replies#
> Web scraping is usually pretty tedious, but I found that I could send the minimised HTML to GPT-3 and get (almost) perfect JSON back: the prompt includes the Typescript definition.

Could you share the prompt? Or, if OP can't share, does anyone have ideas for a prompt to do something like this?

malborodog1 reply#
The prompt is probably simple, but the bigger challenge is that even a minified html of a typical web page would be more than the 4k gpt token limit
genmon1 reply#
I extract the main content div, which includes various other divs and assorted HTML cruft from 25 years of content management systems.

Then convert that to Markdown, which GPT groks happily, and it preserves the right balance of discarding meaningless structure but preserving some semantics (italics, headings, etc).
The best tool I've found for that process is aaronsw's html2text, amazing that it's still so valuable after all these years.

malborodog#
Thanks for explaining — very helpful!
aardvark1792 replies#
I see several very dubious classifications. Shouldn’t the great stink be under civil engineering rather than agriculture, and why is Plato’s Atlantis under computer science?
genmon1 reply#
Now that's an interesting regression! I don't remember seeing it there before.

(The worst I've noticed before has been Lawrence of Arabia under History of the Ancient World. Very much 20th century really.)
Several other classifications are arguable -- which I think shows one of the limitations of this technique: it's not possible to iterate + improve.
So instead I've been wondering about using the embeddings of each episode synopsis, and comparing to the embeddings of Dewey subdivisions. I should be able to tune the results better that way.
There's also a technique from Google called CAVs (Concept Activation Vectors) that I'm intrigued about trying -- would love to hear if anybody has experience using this
https://arxiv.org/abs/1711.11279

theodorewiles#
FYI you can get dewey decimals programmatically by hacking the OCLC API: http://classify.oclc.org/classify2/api_docs/classify.html

this says you need an API key but I think I found some way to call this without one… You might be able to improve classification by either incorporating the dewey decimals of the books mentioned on a podcast or fine-tuning a model based on known book titles (or maybe there are book summaries somewhere) to known dewey decimals from OCLC.

once_inc#
There's also an episode about aliens under 000.
lisasays#
At the same time I asked for a Dewey classification... and it worked.

May I ask - how do you know exactly?
Specifically - with what level of accuracy? And how is it assessed?
At first glance it does seem to be highly accurate - except where it isn't:

    650 Management and public relations (1)
    - Caxton and the Printing Press 18 Oct, 2012
Which is not to knock what you're doing - because overall the performance does seem to be quite impressive (especially considering the effort invested).

Still - there's that "last mile".
So it would be nice to now how the performance compares to that other topic modeling approaches. And to what extent LLMs actually provide a boost.

Load more comments