OpenAI Classification Endpoint quickstart video

This is a quick intro to the Classification Endpoint.

13 Likes

Nice video :slight_smile:
Is there a way to classify more than one phrase at once via this Endpoint or do I have to call it for every single phrase?
The only way I could find for classifying multiple phrases is via the “efficient structure” as described in promt design 101?

Yes. Is there any particular reason that solution, or simply calling the API multiple times, isn’t ideal?

My main issue is that I have a lot of text to classify in and it should ideally be quick. So calling the API frequently will probably take too much time and might also be considered as spam.

I have yet to try the custom promts, but there I will have to put together the strings and extract them from the response which just feels wrong. But if that’s the way I can live with that.

The ada engine is extremely fast.

Calling the engine many times is perfectly fine.

Yes, ada is, but if I send a request every time, the latency from the connection itself adds up and the overall processing takes some time then.

Ah that’s good to know. Thank you, I can work with that for now, at least for my proof of concept. :slight_smile:
For a productive use more efficiency might be nice e.g. if I could also upload a .jsonl for the whole classification.

Yes, of course that’s possible as well, as you mentioned by uploading a .jsonl for the classification endpoint: https://beta.openai.com/docs/api-reference/classifications

To clarify, this is a different endpoint from what I was previously referencing (the Completions endpoint).

image
The way I understand this, the file can be used only for training though? Or can I also include my test data (without labels) in the same file?

That’s correct, but it also guides the API to the format and purpose of Classifications you want, so you can quickly and easily (and cheaply) classify new data.