This week's challenge comes from listener Mark Maxwell-Smith. Name a place where experiments are done (two words). Drop the last letter of each word. The remaining letters, reading from left to right, will name someone famously associated with experiments. Who is it?
Classic Sunday Puzzle, right? Take thing from Class A, apply a string transformation, get thing from Class B.
Here's how we'll solve the puzzle:
- P: (list) places where experiments are done (two words)
- We need this list to iterate through in search of the solution
- We can ask any available LLM to generate a list to get us started
- I started with such a list, but broke it into a list of first words and second words, that my python script then recombines to get a longer list, so:
- [science lab, physics room] -->
- [science lab, science room, physics lab, physics room]
- This is an open class, but the clue is so restrictive I think we can cover all the possibilities this way
- S: (list) someone famously associated with experiments
- Again, we can ask an LLM to provide us a list, but we can't be certain we'll cover the solution because this is a fairly vague clue and definitely a very open class
- Alternatively, we can simply iterate through P, apply the transformation, and plug the new string into an LLM to get a score
- transform(str): (function) We need to define a function that can take in a string like "science laboratory" and return the transformed string: "Scienclaborator"
- Note that we'll capitalize the string as we're expecting a name
- LLM: We'll use the python transformers library and its pretrained GPT2 model
- We'll start with a sentence frame like this:
- '[BLANK] was a famous scientist known for experiments.'
- We insert each transformed string into the sentence frame, pass it to the LLM, and return a perplexity score
- We rank these candidates by perplexity
- The solution should be among the candidates with the lowest perplexity score.
And that's how I solved it! If you have alternative approaches, drop a note in the comments. I'll be back right here after NPR's Thursday deadline to share my solution. Good luck!
Update & Solution
The deadline for submissions has passed, so click below if you want to see my answer. Click here for the python script on GitHub. See you next week!
No comments:
Post a Comment