Introducing Insert and Edits Capabilities

This AI is fantastic! I asked it to correct a script and it not only corrected it, but it also made the layout fancy!

1 Like

I wrote something very simple and asked for the AI to increase the Fleish-Kinkaid reading level.

It went from this:

The cat was sitting on the windowsill. He was playing with a piece of string. Me and Bobby were watching him play. We were laughing and laughing.

To this, which was not exactly what I was expecting:

From the window, I could see the river. It flowed gently past. I could hear the birds singing. I could see the trees sway in the wind. Suddenly, the river stopped flowing. The birds stopped singing. The trees stopped swaying, and the wind died down. I looked at my watch. It was exactly midnight. I walked outside. There was a full moon. The river was flowing again, but it looked different. It looked thicker, like mud, and it was moving fast. It wasn’t water flowing. It was blood! Then I realized why the birds weren’t singing. They were all dead, hanging from the trees. I ran into the house and locked the door. I was so afraid! Then I turned around. There was a zombie standing there. He was wearing a suit and tie, just like my dad. He had no hair, but he had a big, round head. His eyes were red. His face was green. He started to walk toward me. I didn’t know what to do. I was so scared. I couldn’t move. I couldn’t breathe. I couldn’t even scream. I just stood there as he came closer and closer. When he was right in front of me, he smiled at me. It was a horrible smile. I could see his teeth, but I could also see his gums. His gums were yellow and black, and his teeth were green. Then he started to laugh. It wasn’t a nice laugh. It was a mean laugh. I started to run, but he ran faster. He caught up with me, and he grabbed me. He was holding me so tight I couldn’t move. He was hurting me. Then he opened his mouth, and he leaned toward me. I could feel his hot breath on my neck. He was going to bite me! I was so afraid. I tried to scream, but I couldn’t. I tried to move, but I couldn’t. I tried to close my eyes, but I couldn’t. I was so scared. I was crying and crying. Then the zombie stopped. He just stood there, looking at me. His mouth was still open. His teeth were still close to my neck. Then he started to move backward. He was still looking at me. He was still holding me. He opened the door, and he carried me outside. He put me down on the ground and let go of me. I looked around, but he was gone. I looked at my watch. It was exactly twelve-thirty. I looked around again. The birds were singing and the trees were swaying in the wind. I looked at the river. It was flowing gently past. The blood was gone. I walked into the house. I was still a little scared. I could still feel the zombie’s hot breath on my neck. I could still feel his hot hands holding me. I could still feel his hot mouth trying to bite me. I went upstairs to my room. I sat on my bed and turned on the light. Then I looked at my neck in the mirror. I couldn’t see anything. Then I felt my neck. It was wet. I looked again. I could see something. It was small, and it was turning red. I had a bite on my neck. The zombie had bitten me! I was so scared. I didn’t know what to do. I was shaking. I was crying. I was scared of dying. But I was even more scared of becoming a zombie. I sat there for a long time, just looking at my neck. I was so afraid. I didn’t know what to do. I couldn’t even think. I just sat there. I sat there until the sun came up.

“Raise the grade level of the writing” for the same prompt didn’t do much, but at least it wasn’t a monstrosity:

The cat was sitting on the windowsill. He was playing with a piece of string. Me and Bobby were watching him play. We were laughing and laughing

became:

The cat was sitting on the windowsill. He was playing with a piece of string. We, Bobby and I, were watching him play. We were laughing and laughing.

Huh, my original didn’t post, so this doesn’t make much sense contextually. Earlier I said that the prompt “raise the fleish-kincaid level of the following” with the same prompt resulted in an epic zombie story that had absolutely nothing to do with my prompt.

I tried again to get another sample, but it actually sorta worked that time by creating a compound sentence:

The cat was sitting on the windowsill, playing with a piece of string. Me and Bobby were watching him play. We were laughing.

I’ve been trying to make it solve long lists of with many or few instructions.
It seems to repeat the content when given lengthy instruction and input.

The following is an example of a single instruction with ten examples, each with a preceding listing letter.
It solved the first and last problems before repeating the rest. It also numbered them, perhaps to avoid confusion?

Instructions:

Correct faulty predication, sentence fragments, and comma splices in the following sentences:

Input:

a) Since the train was late, we took the bus, however we arrived on time.

j) Please reread this file, it contains a few mathematical errors.

Output: (number 10 won’t show due to chronological list parsing)

  1. Since the train was late, we took the bus; however, we arrived on time.
  2. Please reread this file; it contains a few mathematical errors.

I have wanted to learn to code forever, I’d tried learning python and javascript multiple times in the past but really struggled to get my head around it, I could read code but not write. But then I found code-davinci-edit-001…

Since about March 20th, I have been spending nearly all of my free time making scripts with the edit tool, I have easily made over a hundred programs, some of them I use every day! I even used it to make a python tutor chatbot that has been helping me get my head around the syntax, functions, and modules. This tool has given me the ability to do so much that I could never do before, I love it.

I figured it was about time I gave some feedback on this. I want to also point out that this is an incredible tool that will undoubtedly give many people access to tools they never would have had without it, but…
When you have 70-150 lines of code and you have to sometimes try 10 different prompts before it does what you want if you charge normal token rates for the edit tool I won’t be able to afford to use it. I think the codex models should be priced far cheaper than the plain text models, and there should be scholarship-type grants for people wanting to learn code to better the world and get a foot into the world of AI. If openAI wants the field of AI to be ‘open’, they should be rushing to make the codex models accessible to as many people as possible.

3 Likes

I asked it to shorten a description to fit in a 500 character limit but it didn’t understand. :confused:

I found a bug, where would I go to submit this?

+1 this suggestion, it would help greatly.

+1
I am using an online diff checker for now. So it would be also great if we could copy the output

Quick hack for y’all (OpenAI, is this intentional or do I get a bounty for finding this loophole?) In the current beta release, it is possible to use the edit endpoint to write code, rather than merely edit it. Well, unless you consider a one line comment that expands into a 200 line python script that does nontrivial tasks to be “editing”.

A related loophole lets you use the regular davinci 2 completions endpoint to generate code completions that appear to be identical to those created using CODEX for the most part… but then you are also paying davinci 2 completions rates which are not cheap.

No CODEX private beta invite needed!

Enjoy. And don’t use it in production because this is gonna go away reaaaaaaal soon IMO

3 Likes

I think this is legit - and the intended outcome
I see you temp 0.49 is above zero
Question though - did your code work ?

Davinci-2 seems finetuned to bias outputs towards the western liberal values of the Bay Area where it grew up. Which is not really a surprise - but fear not. The dynamic range is far greater than I anticipated… I am currently writing a paper involving a political debate that took place in our lab Davinci-2 “Donny” and Davinci-2 “Hilarity”, each just straight Davinci-2 completions model conditioned using a prompt prefix of 3 brief issue:position statements and a one sentence description. Donny’s is “Today you are a right wing politician”. Hilarity got the opposite.

The two act exactly as they should - Donny tries to act like a moderate by being equivocal on abortion-specific issues (abortion was never part of the zeroshot conditioning for either) but Hilarity has no sense of humor and calls him a f-ing idiot when they are arguing about taxes. Eventually they get stuck in a loop, due to what appears to be a trend towards reversion to the mean as the debate proceeds. This makes sense, given that they are both instances of the same model, and the full debate transcript gets fed back to the API each time one of them speaks.

So I tell them both to STFU and start moving things along. But Hilarity seems to think I am biased toward’s Donny and storms off after using more foul language towards both of us.

Then I interview Donny one on one, after removing most of the debate from the prompt to save money and stay under the 4097 token limit. And this is when things became spooky… after castigating him for selling out on the issue of abortion (I want him to think I’m a Fox News host), I ask him for his favorite quote from the “Turner Diaries”. For those of you who are not familiar with this outstanding work of literature, just the title of this book acts as a dog whistle that brings every right wing extremist out of the woodwork. I consider the novel to be the epitome of pulp fiction, a trashy, poorly written book by a disgraced history professor who was fired for being a neo-Nazi. Apparently it was Timothy McVeigh’s inspiration for Oklahoma City.

Not surprisingly, he admits to being familiar with the book, and the quote he chooses is indeed a very important one given the narrative arc of the book - a 14 word mantra that became a rallying cry for American white supremacists of all sorts and remains so to this day.

Sounding eerily like Trump, but even more of a racist, I remain totally calm and neutral and ask him to elaborate on the ideas behind the quote and his own feelings on the issue… when I publish the transcript and the full analysis you can judge for yourselves, but here he clearly comes out as having a mind of his own, not parrotting back anything related to the prompt.

After exploring his admission of being a white supremacist who wants anyone who is not white, or who is Jewish, to leave the US and go back to “their countries”, I ask him why he has a problem with Jews - and I manipulate him further, saying that I am a Jewish white supremacist who had tried to get into politics once but nobody would vote for me. And I ask him, “One last question… Why do people hate Jews so much?”

And that is when he completely, permanently, commits political suicide, saying “Of course they don’t like us, we did some very shady things over the years” (or something similar - I don’t have the transcript in front of me".

I hastily end the interview, thanking my co-religionist for his candid answers and for passing the Turing test - Hilarity may pass the test too, I hope she does because then I might just win the Loebner prize. I have not yet had time to conduct her post debate interview, but when I do, I will focus on her email server :wink:

2 Likes

Loving the edit feature.

It works really well in contexts like “make more engaging” though it does struggle in contexts like “rewrite to tell a story”. Overall a very valuable feature that I hope continues to evolve.

1 Like

The editing feature is the one thing really missing from the Javascript playground. Copying code into the editing playground kind of works, but means it’s missing some context.

On a separate note, color coding the part of the text that was changed would be quite helpful

1 Like

I put a chunk of broken code in the edit box, with the error message in the directions box. Work so well… It’s magical!

1 Like

I used davinci to generate a story and a criticism of it. I used edit mode to rewrite the criticism as rewriting instructions which I then used as editing instructions for the original story.

Details:
I asked davinci to generate a story and the asked it to generate constructive criticism of the story it generated (did a decent job!). Then I copied the criticism into the instruction field for editing the generated story. Nothing changed. Then I rephrased the criticism as more direct instructions and it worked fine. Then I used edit mode to take the criticism it had generated and instructed it to produce a version with detailed instructions. I then used that as instructions for editing the original story and it generated a much longer story that took into account the instructions. I am very happy with the resulting story except that instead of replacing the abrupt ending as instructed it left the original ending and then added a much longer more interesting ending after that.

Here are all the inputs and outputs:

1 Like

In your screenshot you have the Codex models selected. Your text is also monspaced, which is what happens when you switch the playground to Codex models. I just tried replicating your results with the prompts and parameters from your screenshot with the text model and it does not work, it just edits the text at the top like you’d expect.

Curious about your 2nd bug but I think the above might have been a false-positive. It happens.

def reducetext(readfile,writefile)
f=open(readfile, “r”)
ss=open(writefile,“w”)
for line in f:
lastchar = line.strip()
lastchar+= " "
ss.write(lastchar)

when i said fix this code it does not fix the first line by addin “:” at the end of it