688 points · by genmon · 3y ago · 171 comments
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.
Seems like everyone has been getting excited around the search or code-generation use cases ... or simply trying to make it say naughty things (boring, not interested, wake up in a few more years), but this is eye opening.
The idea of this as a "universal coupler" is fascinating, and I think I agree with the author that we are probably standing at an early-90s-web moment with LLMs as a function call (the technology is kinda-there and mostly-works, and people are trying out a lot of ideas ... some work, some don't).
My mind is racing. Thanks for the epiphany moment.
All the pieces are there, and multi-modal (smallish) large language + image models are already being used in research labs; eg MS Kosmos-1[1]. Check out the visual IQ test results in the paper.
Kosmos-1 is only 1.6B parameters. When that or similar models scale out to 50B_ params they will be pretty amazing.
https://twitter.com/nsousanis/status/245176914900299776?lang...
I am currently creating reference images for a game which I expect within 6-12 months I'll be able to feed into a multimodal ChatGPT to create 3D assets out of the 2D pics.
We'll be able to conjure up worlds at a whim - so start imagining them already!
OpenSCAD works right now in the sense that the produced source is valid, but asking for even something well documented e.g. an AR-15 lower receiver does not impress.
We should be able to, by now, input terrain maps, account for local water ways & rainfall, and Autodesk's Brobdingnagian suite of tools should be able to spit out a whole new suburban package, engineered to local country/city engineering standards.
The main thing that's holding is back is the complexity of engineering standards, and its implementation in the software. But all that'll take is time & money.
Although the complexity of building standards is a challenge, the speed and quality of various generative algorithms are still major limitations.
https://en.wikipedia.org/wiki/Semantic_Web
https://en.wikipedia.org/wiki/Semantic_interoperability
LLMs really shine when you try and combine two previously untouched things or map one bit of knowledge it a common pattern. Eg “summarize Mary Shelly’s Frankenstein as if it was an episode synopsis of Magic School Bus.” “Now do the same for Dracula.”
I remember my mind racing so much that day. With all the ideas of things it would unlock. And I still managed to under imagine just how many different types of knowledge, and different layers of knowledge and language, they would be able to encode into one compact dataset.
Copy and paste a bunch of styled JS components -> get back out a single CSS sheet
Paste in a markdown document -> get out the same thing in HTML
Fun stuff like that.
The value here is how easy it is, and the fact that a generalised model can take the place of a (well-engineered) specialised tool.
If you put the Dewey division in the URL, the directory auto-opens. e.g. here are episodes about prehistoric life (my current jumping-off point)
https://genmon.github.io/braggoscope/directory#560
There's a visual map of episodes. After principal component analysis of the episode embedding vectors, these are the most significant two components as the x,y
https://genmon.github.io/braggoscope/map.html
(it's not super useful tbh -- e.g. the Manhattan Project and the Cambrian Explosion have the same x,y... presumably because they are both about explosions?)
Many episodes have a reading list, and these are all linked to Google Books (so you can purchase/check out from a library), e.g. this episode page
https://genmon.github.io/braggoscope/2022/10/20/the-fishtetr...
There are ~4,600 books, and I have ~88% coverage on getting a Google Books page from the original data. Any ideas about what to do with this big list of academic-recommended books v welcome!
Thinking out loud: Add the experts, not just the reading lists. They're a jumping-off point into academic-paper-space. What have they published? In what journals? Who have they collaborated with?
People still have to look at this horrendous stuff.
European humans have the right for any automated decision affecting them to be reviewed by a human. We do not want a world where a tiny handful of people, getting fewer by the day if it's Twitter, have untrammeled control over what billions of people can say, see or do. We can't let businesses do what they like, change their policies on a whim and have it instantaneously applied by automatons, if it's bringing misery to millions of people.
Remember those old-fashioned things called laws? Courts? Judges? Legislators? The things we used to use for deciding what people could/couldn't do, before tiny companies with billions of users applied their own de-facto laws with no oversight, governance or accountability. Move fast and break things!
I don't disagree with you, the content producers are always going to outnumber the moderators by a massive margin. It makes reasonable moderation very difficult.
It's weird -- it's locally useful to navigate, and at a high level kinda useful, but only if you squint and don't look at the problems. So I feel like a fisheye visualisation would be appropriate? That's something that I'm exploring in other projects.
[1] http://karpathy.github.io/2014/07/02/visualizing-top-tweeps-...
Shouldn't https://www.bbc.co.uk/programmes/b00lh2s3 (Ediacara Biota) be in there?
As for the 3D plot... here you go!
https://interconnected.org/more/2023/03/in_our_time-PCA-3D-p...
Basic PCA + Plotly is actually in OpenAI's official Python library (in `embedding_utils`) -- this plot is just the output from that.
Ever since my partner and I discovered In Our Time a few years back, it’s been our go-to podcast to listen to together. Part of the allure is that the archive is so vast, but that makes it hard to browse.
My partner made her own archive of In Our Time here, if you’re interested: https://shelby.cool/melvyn/
She used Wikipedia to find and categorize each episode. I also really like that she indexed episodes by guest, too. Certain guests are REALLY good and have been on many episodes.
Super excited to see someone else make an archive; we’ll definitely be exploring yours!
I've had a mild idea for ages to have a sort of annotated In Our Time. Listening to the podcast on a webpage as the text rolls by links could appear to explain or give background to the item or person being discussed.
SMIL is the multi-media mark up language. Generally if one thinks of something there's someone on the Internet who has already had that idea.
Additional: I think the BBC is very careful about transciptions. They've sold a book of the transcripts of several episodes, but it would be a great way to go through a subject.
This is a really clever use of an existing dataset. I clicked through before reading this and was stunned by how thorough the tag set was. Even more obscure things like "Alumni of Magdalen College, Oxford" have multiple episodes. I'm going to keep this in mind on future projects for sure.
Is the tagging manual? It's really good.
Some favourite episodes off the top of my head:
* Wilfred Owen - https://www.bbc.co.uk/programmes/m001df48
* The Evolution of Crocodiles - https://www.bbc.co.uk/programmes/m000zmhf
* The May Forth Movement - https://www.bbc.co.uk/programmes/m001282c
* The Valladolid Debate - https://www.bbc.co.uk/programmes/m000fgmw
* Gerard Manley Hopkins - https://www.bbc.co.uk/programmes/m0003clk
* Henrik Ibsen - https://www.bbc.co.uk/programmes/b0b42q58
* Wuthering Heights - https://www.bbc.co.uk/programmes/b095ptt5
And finally, in which three mathematicians heroically attempt to explain asymptotic analysis to (septuagenarian novelist and cultural broadcaster) Melvyn:
* P v NP - https://www.bbc.co.uk/programmes/b06mtms8
- The evolution of teeth https://www.bbc.co.uk/programmes/m0003zbg
- The fish-tetrapod transition https://www.bbc.co.uk/programmes/m001d56q
- The late Devonian extinction https://www.bbc.co.uk/programmes/m000sz7x
- The American West https://www.bbc.co.uk/programmes/p00548gg
- Metamorphosis (Ovid) https://www.bbc.co.uk/programmes/p00546p6
- Politeness https://www.bbc.co.uk/programmes/p004y29m
- The Bronze Age collapse https://www.bbc.co.uk/programmes/b07fl5bh
- Doggerland https://en.wikipedia.org/wiki/Doggerland
* That doesn't mean it's not less than ideal.
* It's something one might want to bear in mind, when listening, since it might introduce some kind of a bias to the whole thing (maybe the other comment about number of episodes about european vs african history is a good argument in that direction)
My criticism of him his how much he struggles with anything of a maths or scientific nature.
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
}(btw thanks for datasette. I use SQLite as an intermediary db and datasette was invaluable for exploring and refining queries.)
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...
Could you share the prompt? Or, if OP can't share, does anyone have ideas for a prompt to do something like this?
OP’s other write up:
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.
(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
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.
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.
I've been meaning to pull all the audio for a while and this has inspired me.
A fun thing to do would be to pass through Whisper, a great corpus to play with.
I wonder... is there a way to "prime" Whisper (e.g. with the embedding of the episode synopsis) so that it "listens out" for words related to a particular topic? I haven't looking but this would be neat!
I will also say that I've personally been unimpressed with the new "large-v2" model, even though it supposedly scores better. The original "large-v1" model seems to work better than the "large-v2" model in the audio clips I've been testing Whisper against, but results will vary. In general, I find I'm really happy with what "small.en" and "medium.en" will emit, and they're much faster than the large models. (The ".en" models are specialized to English, and usually perform better for strictly English input, whereas the non-".en" models are trained on multiple languages.)
Update: turns out this exists already: https://platform.openai.com/docs/guides/speech-to-text/promp...
prompt
string
Optional
An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.API used and results can be found here: https://techtldr.com/transcribing-speech-to-text-with-python...
On _In Our Time_ -> https://www.newyorker.com/culture/podcast-dept/escape-the-ne...
Profile of Melvyn Bragg -> https://www.newyorker.com/culture/the-new-yorker-interview/t...
Both well worth your time.
Nicely put by the New Yorker.
https://weekend-collection.s3.amazonaws.com/Catalog+-+Feb+17...
https://weekendcollection.substack.com/p/technical-details
(Recursive coarse clustering as opposed to one-shot fine clustering.)
Applying "transformations" or classifying data in this way without having to setup a lot of detail-work seems like a real labor-saver/multiplier
My mind was really opened by Nat Friedman's work in GPT for browser automation: https://github.com/nat/natbot
And of course using langchain/ReACT.
So different from ChatGPT and (imo) way more intriguing.
mentioned in this blog post: https://interconnected.org/home/2023/02/07/braggoscopeTaxonomies are inherently limited -- I love this portion of the talk "Everything is Miscellaneous" about Melvil Dewey: https://www.youtube.com/watch?v=x3wOhXsjPYM&t=1206s
Surely some things fit equally well in more than one category.
Have you considered asking for best two or three categories, and placing the episodes in multiple locations? Or would that be too noisy?
I suspect I’ll need a more mechanical approach, long term.
Fill out the following XML template to describe a room in a fantasy RPG dungeon:
<room width="" length=""><furniture><object name="" description=""/></furniture><npcs><npc name="" description=""/></npcs><items><item name="" description=""/></items></room>
This yields, for example: <room width="10" length="15">
<furniture>
<object name="torch" description="A wooden torch mounted on the wall, casting flickering light around the room."/>
<object name="table" description="A large wooden table in the center of the room, covered with maps, scrolls, and dusty tomes."/>
</furniture>
<npcs>
<npc name="Goblin" description="A small, green-skinned creature with a wicked grin and a rusty dagger in hand."/>
<npc name="Orc" description="A towering figure with rippling muscles, wielding a massive axe and snarling menacingly."/>
</npcs>
<items>
<item name="Potion of Healing" description="A small vial filled with a glowing green liquid, said to restore vitality when consumed."/>
<item name="Sword of Flame" description="A gleaming sword with a blade wreathed in flames, capable of burning foes to a crisp."/>
</items>
</room>
So you get the best of both worlds, really clever procedural generation of content but also a tight structure - I've yet to see a syntax error out of it.But the prompt is parameterised. The bulk of the prompt is requesting a list of guests and speakers to be extracted, and the episode synopsis is appended as the "parameter". And I've noticed that the variation of the parameter changes what the overall prompt returns... so it might start being less reliable at responding with valid JSON, for example.
So it's instance-deterministic but, across a range of parameters, class-fuzzy, if that makes sense?
It's mentioned briefly in the OpenAI text completion guide: https://platform.openai.com/docs/guides/completion/introduct...
If you have two possible tokens with probability 40% and 30%, you'll always get the 40% token at T=0. But if you have two possible tokens at 40% and 39.99%, you may get the 39.99% token on occasion, even if at T=0. (Numbers illustrative.)
It could be 46C/115F outside and you say "wow, today is unbearably hot", to which someone retorts "nah, it's fine. It's not the hottest day". That's pretty good hedging. You can make infinite technically correct statements this way without ever saying anything meaningful
Prompt: https://imgur.com/YtQ4fbf --
Reveal the question marks in an interesting way:
The dog goes ????????????? --
With temperature == 0, it consistently ("pretty deterministically"?) generated "woof!"
ex. The dog goes woof!
e.g. I have Tycho Brahe on March 2 in my podcast app, rss shows it released Feb 2.
[1]: https://genmon.github.io/braggoscope/2012/01/02/episode-1.ht...
This is the part that sounds amazing to me. I haven't done web scraping since forever, but it was tag matching hell even on a consistent data source.
And that it hands you back JSON is just unfair.
What would it take to go deeper on this and narrow down to, say, single-sentence intervals? For example finding everything about a particular character in the Ramayana, or every statement about NPR itself?
https://genmon.github.io/braggoscope/about
(GPT-3 not ChatGPT for the model.)
https://www.bbc.co.uk/programmes/m001jkzg
https://genmon.github.io/braggoscope/2023/03/02/megaliths.ht...
AI generated content is the initial "ooh, money" wave that will be the future's basic spam to deal with.
Difference between AI and web3 is that web3 didn't have a real use case to follow the gold rush phase :x
You may be able to create a bot that chats with you and suggests episodes, etc. in real time. Or lets you ask questions TO an episode. And other things.
A parse error kicks off a recovery process where, in theory, we could run any number of rules. In practice the only problems are unescaped quotes in strings, or mismatched quotes (start with `"` and terminate with `'`)
Blimey
Would love to try it on The Rest is History podcast.
It's also a shame the BBC delays the In Our Time podcast by a month unless you use their shite BBC Sounds app (which I think only exists to make the Spotify app look good in comparison).
"In Our Time" is the first podcast I listened to, way back in 2004, and I still listen to every episode.
https://www.bbc.co.uk/programmes/p004kln9/episodes/downloads
What does this even mean?? You collected all the minimised html snippets then fed them to GPT-3?? How does this save any time??
V2 would be:
- Transcribe through Whisper - Semantic search
Extract the description and a list of guests from the supplied episode notes from a podcast.
Also provide a Dewey Decimal Classification code and label for the description
Return valid JSON conforming to the following Typescript type definition:
{
"description": string,
"guests": {"name": string, "affiliation": string | null}[]
"dewey_decimal": {"code": string, "label": string},
}
Episode synopsis (Markdown):
{notes}
Valid JSON:
(And the completion tends to be JSON, but not always.)https://brxnd.substack.com/p/the-prompt-to-rule-all-prompts-...
- Typescript definition (turn raw html markup >> well-formed JSON)
- Dewey Decimal classification/score
So probably combination of those two