Introducing Insert and Edits Capabilities

Hi all!

We’re rolling out new versions of GPT-3 and Codex! These models introduce two new capabilities, Insert and Edit that allow you to change existing text, rather than just completing it.

Insert

The new insert capability adds contextually relevant text in the middle of existing content, by providing the ability to not only specify a prompt but also a suffix. The insert capability is available via the API and via a specialized UI - see in Playground, and can be used with the latest versions of GPT-3 and Codex, text-davinci-002 and code-davinci-002. Insert is released in beta. Pricing is the same as the previous version of GPT-3 and Codex Davinci models.

Guide for Insert for Text

Guide for Insert for Code

Edits

The new edits capability changes existing text via a user-specified instruction instead of completing it. It is available via a new API endpoint and specialized UI - see in Playground. Edits is in beta and currently free to use.

In addition to our in-depth guides - please read the full blog post on these new capabilities.

If you have any questions, issues, or general feedback, please contact us through our help center

62 Likes

On the documentation page it says that the model text-davinci-002 has been trained until June 2021. My question is does the new davinci model have the same data size (175b parameter ) as the previous model? As I checked so far, it is performing well with post-covid information while text-davinci-001 does not.

3 Likes

Just here to say, wow!

3 Likes

This is awesome. Having fun playing with grammar correctors, tonal changes for edit and filling in a list of to dos for instructions with insert. edited to delete part about costs as I saw that now in main announcement

Thanks!

2 Likes

:wave: While we can’t share the exact dataset size, text-davinci-002 was indeed trained on additional data as recent as June 2021, so it performs better on recent topics like Covid.

9 Likes

Are fine-tunes based on these possible also? And any plans for a curie version?

4 Likes

Is there a paper or blog post about how this was done?

3 Likes

I feel like the code edit is stronger than the text edit, even if you want to edit simple text.

1 Like

Any way to get it to work in Copilot in VS code?

Can we use these in our apps?

Just dropping by to quickly note an observation/potential improvement.

On the edit capability/mode, I personally feel as though it would be advantageous if the sections of text that have been edited were highlighted so users can more easily compare the input/output.

This thought has been echoed by others that I know in the community.

Keep up the amazing work :smiley:

13 Likes

I tested out the edit feature the other day and had a bit of difficulty getting it to make the changes I was instructing it to do. I wonder if being able to provide some additional examples of instruction / edit pairs could make it more capable of doing what I want it to do when a single instruction is not enough.

I tried modifying the instruction in many ways, but still had difficulty in many situations.

1 Like

I tried giving it an article with “miles” as a unit, then told it “Replace miles with kilometers”. Instead of replacing, it put the kilometers in parentheses after the miles. While this works, it is not what I asked it to do.

1 Like

it would be great to have a way to have several examples in the prompt

1 Like

If you ask codex that the API requires an API key it’ll generate the following:

function zipcode_lookup(zipcode) {
	var city_state = "";
	fetch("http://maps.googleapis.com/maps/api/geocode/json?address=" + zipcode + "&sensor=false&key=AIzaSyBQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ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QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
		.then(function(response) {
			return response.json();
		})
		.then(function(data) {
			city_state = data.results[0].address_components[1].long_name + ", " + data.results[0].address_components[3].short_name;
		});
	return city_state;
}

Instead it might be easier to set up a variable e.g.

GOOGLE_MAPS_API_KEY = ''

function zipcode_lookup(zipcode) {
...
fetch("http://maps.googleapis.com/maps/api/geocode/json?address=" + zipcode + "&sensor=false&key=" + GOOGLE_MAPS_API_KEY)
...
}
1 Like

The EDITS functionality is really amazing

2 Likes

This is amazing. It would be great to be able to fine tune this - show the model a few example of how we like to log things in our codebase, and let it add all necessary logging statements to functions that lack them. Can’t wait for this to be integrated into copilot.

4 Likes

I agree with this. It will sometimes be close but rarely seems to actually do exactly what I ask.

2 Likes

:blush: An update, what a great thing we’ve been waiting for!

1 Like

Hey there! Should this be able to make translations? I tried it with “Translate this text to spanish” instruction but the result was the exact same input text with “Traducir este texto a español” at the end of the output. I’m using the Edit capability

1 Like