John Wiseman Profile picture
Feb 22 8 tweets 3 min read
I saw a somewhat astonishing thing today. GPT was asked a question that it needed to write code to answer, and given access to a Python REPL. It wrote buggy code, then based on the error message it fixed its own code until it worked (and gave the correct answer). It debugged. Screenshot of a Python notebook. The code cell contains `age
The question posed was "What is the 10th fibonacci number?" The GPT-based agent's first attempt was "fibonacci(10)"—"Action Input" is what the LLM is sending to the Python REPL. This resulted in an error because it's not a standard function. The LLM figured that out.
It then defined a fibonacci function, called it, and got the right answer. All fully automated, with no human intervention (using @LangChainAI). Technically simple but kinda mind-blowing: It debugged its own code until it worked.
Here's the 40 lines of code that will let you demonstrate GPT automatically debugging its own code. The prereqs are pip install openai langchain & get an @OpenAI API key. gist.github.com/wiseman/4a7064… Screenshot of Python code. The same code is available at the
In this run I asked it to calculate the 100th Fibonacci number and it realizes its naive approach would take too long and it needs a more efficient algorithm. (I modified the Python interface to raise an exception if code takes longer than 1 second to run.)
I’m imagining programming language error messages becoming optimized for giving feedback to LLM’s and thinking it would probably provide a significant benefit to humans as well.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with John Wiseman

John Wiseman Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @lemonodor

Jan 1
An experiment in trying to recreate the aesthetic of 50s/60s aerospace photos in Dall-E, Stable Diffusion, and Midjourney. First up: Dall-E. Prompt: "Photo of SR-71 aircraft flying over the Mojave desert faded ektachrome 100sw vintage retro nasa archive" Dall-E image of a black air...Dall-E image of a black air...Dall-E image of a black air...Dall-E image of a black air...
Dall-E gets pretty close to the overall aesthetic I'm looking for. It knows an SR-71 is black, but not much else.
Next up: Midjourney. The aircraft is very well defined, though is further from an SR-71. Kind of a mix of the military aerospace photograph and 70s science fiction book cover aesthetics. 4x4 Midjourney images of an...
Read 7 tweets
Nov 21, 2022
There was a time where Bob Iger wanted to buy twitter, and both the Disney and Twitter boards agreed on the deal. After the worst day in 21 years for Disney stock, it's up 7% on the news that Bob's back. Just saying.
In the giddiness and optimism of the moment (I haven't seen Disney employees this happy in 3 years), I believe Bob Iger might want to consider rescuing two companies simultaneously.
The parallels are a bit uncanny. Imagineers also got an ultimatum email where they had to fill out a form saying whether they were hardcore, so to speak, and keep their jobs by moving to Florida. Disney also lost a shocking number of incredibly good employees who said "hell no."
Read 6 tweets
Nov 19, 2022
Vaccines—still working very well. Even with newer variants, even after 70%+ of the U.S. has already had COVID ("natural immunity"), unvaccinated people aged 50+ (I'm 52) are dying at 12x(!) the rate of people who have had at least 2 boosters. "Natural immunity" not looking great. Chart from the CDC showing ...
Note that the risk of dying from COVID among people aged 50+ who only have 1 booster was 3x that of people with 2 boosters. Get a damn booster.
I got COVID 4 weeks after my 4th booster (bivalent). That's an ideal situation, and I had about 24 hours of bad cold-like symptoms: fever for a few hours, bad headache & congestion the rest. If my grandma could have been vaccinated she would have survived. henkeclarson.com/obituaries/obi…
Read 5 tweets
Oct 18, 2022
NOTAM for Dallas Fort Worth Airport: ATTN ALL AIRCRAFT GPS REPORTED UNRELIABLE WITHIN 40NM OF DFW.

None of this interference was here yesterday: gpsjam.org/?lat=32.76692&…
In case the preview above doesn't work, here's the new interference as of today that the NOTAM seems to be warning about: Screenshot from gpsjam.org showing medium/yellow interferenc
The GPS warning is actually in the (digital) ATIS. There may also be a NOTAM. datis.clowd.io/kdfw Screenshot of digital ATIS for KDFW airport. "ATTN ALL
Read 21 tweets
Oct 7, 2022
Very entertaining talk by Tom Clancy, given at the National Security Agency in 1986, about the origin story of The Hunt for Red October. I hadn't heard of the real-life mutiny on a Russian warship that inspired the book. .
In 1975 the political officer of the Russian frigate Storozhevoy locked the captain in the sonar compartment and enlisted the rest of the crew to his plan. Half the Baltic fleet & 60 aircraft were sent to find it. en.wikipedia.org/wiki/Soviet_fr…
They found the Storozhevoy, strafed and bombed it, and stopped it 20 miles from Swedish territorial waters.
Read 20 tweets
Jul 29, 2022
Finally, the only daily, global, free map of GPS interference has officially launched: gpsjam.org Watch jamming around conflict zones develop over time. Wonder who's jamming GPS all around Moscow. Like all the best maps, it raises more questions than it answers!
Generously powered by data from ADS-B Exchange and supported by Mapbox and everyone who has donated money (and a laptop!), there's nothing like gpsjam.org available at any price. OK, that's hyperbole—It's probably available from somewhere if you pay a lot of money.
Yes, gpsjam.org was posted to Hacker News a few days ago during its "soft launch". Which is fine. But now it's 22% better than it was then.
Read 15 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(