Group Abstract Group Abstract

Message Boards Message Boards

Experiment: Can OpenAI's GPT-3 Write Wolfram Language Code?

Posted 6 years ago
POSTED BY: Daniel Bigham
9 Replies
Posted 6 years ago

Wow this input from Daniel Bigham is very exciting for me ...

I had an exchange with Jon McLoone of Wolfram England last week which I trust he will not mind me sharing:

Jon McLoone This is a reminder that "Making Predictions from Financial Data" will begin in 1 Hour on: Mon, Jul 13, 2020 10:30 AM - 12:00 PM PDT

My Question to Jon ... Q: do you have a way of scraping the net for all accessible Mathematica notebooks so that I can research predictive algorithms or models for the next input while generating my own code? Could that be done on the Manipulate Examples on your website?

A: Nothing public beyond using WebSearch. We do have a project internally to build a language models for Wolfram Language and others. This is already partly exposed in Classify["ProgrammingLanguage", "WebImageSearch[\"cat\"]"] but the plan is to use it much more richly for WL by being able to detect coding errors, suggest improvements or auto-completions.

  • Q:
Wow great this is very close to what I am interested in ...Syd Geraghty

This is already partly exposed in Classify["ProgrammingLanguage", "WebImageSearch[\"cat\"]"] but the plan is to use it much more richly for WL by being able to detect coding errors, suggest improvements or auto-completions.
11:32 AM 


My Question to Jon ...Q:
Presumably that initiative extends implementation of the current predictive interface in 12.1
11:35 AM 


My Question to Jon ... Q:
So presumably this would make it easy for Patrick Schiebe to add significant functionality to the IntelliJ Idea WL plug in ... 


A:
Yes, I would hope so. More broadly there are various projects for making better developer tools, eg code scanning, unit test coverage etc. And these should all be exposed.

11:47 AM

My Question to Jon ... Q: Wonderful ...

A:
More broadly there are various projects for making better developer tools, eg code scanning, unit test coverage etc. And these should all be exposed.


11:48 AM

Access to this type of technology would make my new project called the Institute of Computational Knowledge ( https://instituteofcomputationalknowledge.com ) so much easier to manage.

While I have been a Mathematica user for 20 years at 76 I need every bit of help generating materials for the project. I have chosen to base everything I can possibly do regarding the project on the Wolfram Technology stack as a proof of concept that the Wolfram Language can support:

Stephen Wolfram's goal for WolframAlpha and the Wolfram Language

Wolfram: My goal with the Wolfram Language is to have a language in which computations can conveniently be expressed for both humans and machines—and in which we’ve integrated as much knowledge about computation and about the world as possible.  In a way, the Wolfram Language is aimed at finally achieving some of the goals Leibniz had 300 years ago.  We now know—as a result of Gödel’s theorem, computational irreducibility, etc.—that there are limits to the scientific questions that can be resolved.  And as far as moral questions are concerned: well, the Wolfram Language is going in the direction of at least being able to express things like moral principles, but it can’t invent those; they have to come from humans and human society.

Thanks so much Daniel ...

POSTED BY: Syd Geraghty

Hi Syd, thanks for your interest.

Yes, your interactions with Jon are on a closely related topic -- basically, what are all of the ways a powerful language model can be used to provide compelling value to programmers and others.

This is an exciting area that I think we'll see lots of progress on in the next 10 years.

POSTED BY: Daniel Bigham
Posted 6 years ago

In each case, the final output (which is in bold) is prepended with a number of examples. GPT generalizes from those examples, which indicates which language it is working in. That "prompt," plus its training data, is enough to let it figure out the answers.

POSTED BY: David Manheim

Thank you @Daniel for sharing, very interesting. I might have missed this somehow in your post: did you have to train this neural net on some Wolfram Language data? How does it now to output things in Wolfram Language and not in some other language? Could you please explain a bit deeper this technical part.

POSTED BY: Sam Carrettie

Hi Sam, you ask a good question.

That's the surprising part -- the only WL "training data" given to the model is the gray text shown in each example above. This is sometimes referred to as "few shot learning" -- when a model is able to adapt to a new task by only seeing a few examples.

That said, OpenAI trained GPT-3 on a huge corpus of text taken from the web, which undoubtedly would have contained examples of WL code, so it's possible that's it's drawing on some of that prior knowledge.

POSTED BY: Daniel Bigham
Posted 6 years ago

Wolfram Alpha could definitely integrate GPT-3. AI Dungeon is a commercial product (game) that has done so.

https://twitter.com/nickwalton00/status/1283984454952693760?s=19 :

Yes there API is available for commercial use (their goal is for it to be a commercial product) and there aren't explicit rate limits per say, but you'd need to have a conversation before hand if you wanted to push through large amounts of traffic.

POSTED BY: Junyan Xu

I suppose this is how the free-form input feature will function eventually. Unless it already uses machine learning ?

POSTED BY: Lucien Grondin
POSTED BY: Daniel Bigham
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard