Few-shot text classification with prompts

preview_player
Показать описание
In this video, I will talk about a possible way how to perform few-shot text classification using prompt engineering and the OpenAI API.

Code from the video:

00:00 Intro
00:27 Prompt template structure
02:22 Inspiration for the video (prodigy-openai-recipes)
03:06 OpenAI chat completions endpoint
04:30 [Code] Setting things up + Jinja templates 101
13:55 [Code] Preparing classification prompt template
20:50 [Code] OpenAI Python client
24:01 [Code] Running classification
25:28 Summing up

Рекомендации по теме
Комментарии
Автор

Thanks for the nice video explanation! Could you please tell me what modifications I can make to get the output in a certain format? Say I want it to output only the label value with no other text?

noedie