Understanding shots and examples

I am an ML newbie. As such I have been spending a lot of my time reading the forum and documentation. I have implemented the completions endpoint via the API and am now using it for basic activities. E.g. summarising, spelling, proofing, etc. inside of Google Docs.

I’d really like to understand more about providing examples or multiple shots to a model in order to answer a question better. Specifically with text-davinci-003.

First, what are the terms or semantics here. Is a “shot” the same as an “example”?

How detailed should or can an example be?

Are examples remembered by the model between calls? If so, are they remembered for all time? And if so, how do you prompt the model to reuse this memory?

This does not appeared to be covered and I think it is such a basic thing. But also from what I have read fundamental. So I’d like to be getting it right as I feel it will improve my results.

Thank you!

1 Like

Yes, a one-shot would be a prompt with one example, a two-shot with two, etc. A zero-shot is when you ask it to do something without giving it an example.

Depends on the model, your budget, and your needs. Some of the models have larger context windows, so you can fit more in, but it will cost you a lot more. You do tend to get better results, especially with a well-phrased prompt and the right examples.

No… unless you “fine-tune” a model. Basically, this means gather hundreds or thousands of examples and re-train the model on all your examples. The results can be great … or not so good… depending on a lot of factors.

For the general API, though, there’s no memory in-between calls, which is why you need to give it a long-enough prompt that will help it understand what you want via context.

Hope this helps.


Thank you it does help.