The post has been translated automatically. Original language: Russian
I've been searching for the "perfect prompt" for a long time. I read guides, collected templates, and tried different frameworks. And in the end, I came to the conclusion that all this can be compressed into one simple structure of three blocks. It works for texts, for analytics, for creatives, for localization - in general, for almost anything.
Structure
[Task context. That's what I mean.] Explain to the AI what you mean. Not the task itself yet, but the situation around it. Who are you, what are you working on, why do you need it. There are literally two or three sentences that let the model understand what kind of world she is in right now. Without this block, the AI figures out the context by itself. And he almost always gets it wrong.
[What's at the entrance. What exactly are you going to give me now - a file, a list, a table, a text, a link. Say it in advance, before you push the data. So that the model knows what to do with them even before she sees them. This point is also useful because you set the rules for the entire session and not just for the subsequent AI response. "I'm going to send you a list of 50 titles," and the model is ready to work with them. Without this, she may perceive the data as part of the instructions and get confused.
[Expectations for an ideal outcome. Prohibitions and/or what is better to avoid. Sample output.] Describe what you want to get at the exit. Not "do it well," but specifically. What is the format. What a volume. What a style. What is the level of detail. The more accurately you describe the ideal result, the closer the answer will be to it.
It's like a technical assignment for a freelancer. The clearer the TK is, the fewer edits there are.
According to the prohibitions, What not to do. What to get away from. This may be more important than describing what to do. Because AI has its own habits- and some of them will get in the way. "Don't use the alphabet", "don't suggest what's already on the list", "don't add introductory phrases" - such prohibitions save a lot of time on edits.
About the sample output: show an example of what the result should look like. One or two examples are enough. The model instantly captures the pattern and reproduces it.
This is the most powerful block of all. An example is worth ten sentences of explanation.
What does it look like in its entirety
[Task context. That's what I mean.]
[What's at the entrance.]
[Expectations for an ideal outcome. Prohibitions and/or what is better to avoid. Sample output.]
Why it works
Because this structure covers all the reasons why AI usually responds poorly. If there is no context, he thinks about it. If he doesn't know the format, he chooses it himself. There are no prohibitions - it uses stamps. If there is no example, it guesses the style.
Three blocks remove guessing. And when the AI doesn't guess, but knows exactly what is wanted from it, it works much better.
The template is simple. It is remembered in a minute. Adapts to anything. Try it once, and you won't want to go back to "just text me something."
And I also want to say this: there is nothing perfect, perhaps your (best for you) template is only in your head, so try to come up with your own and share it in the comments, in any case it will be useful!
Я долго искал «идеальный промпт». Читал гайды, собирал шаблоны, пробовал разные framework-и. И в итоге пришёл к тому, что всё это можно сжать в одну простую структуру из трёх блоков. Она работает для текстов, для аналитики, для креативов, для локализации - вообще почти для чего угодно.
Структура
[Контекст задачи. Что я подразумеваю.] Объясни ИИ, что ты подразумеваешь. Не саму задачу пока, а ситуацию вокруг. Кто ты, над чем работаешь, зачем тебе это нужно. Буквально два-три предложения, которые дают модели понять, в каком мире она сейчас находится. Без этого блока ИИ додумывает контекст сам. И почти всегда додумывает не так.
[Что на входе.] Что конкретно ты сейчас дашь - файл, список, таблицу, текст, ссылку. Скажи это заранее, до того как пихнёшь данные. Чтобы модель знала, что с ними делать, ещё до того как их увидит. Этот пункт еще полезен тем, что ты задаешь правила для всей сессии а не только для последующего ответа ИИ. «Сейчас скину список из 50 заголовков» - и модель уже готова к работе с ними. Без этого она может воспринять данные как часть инструкции и запутаться.
[Ожидания по идеальному результату. Запреты и/или от чего лучше уходить. Образец выхода.] Опиши, что ты хочешь получить на выходе. Не «сделай хорошо», а конкретно. Какой формат. Какой объём. Какой стиль. Какой уровень детализации. Чем точнее ты опишешь идеальный результат - тем ближе к нему будет ответ.
Это как техзадание для фрилансера. Чем понятнее ТЗ - тем меньше правок.
По запретам - Что не делать. От чего уходить. Это может быть важнее, чем описание того, что делать. Потому что у ИИ есть свои привычки - и некоторые из них будут мешать. «Не используй канцелярит», «не предлагай то, что уже в списке», «не добавляй вводных фраз» - такие запреты экономят кучу времени на правках.
Про образец выхода: покажи пример того, как должен выглядеть результат. Одного-двух примеров достаточно. Модель мгновенно схватывает паттерн и воспроизводит его.
Это самый мощный блок из всех. Пример стоит десяти предложений объяснений.
Как это выглядит целиком
[Контекст задачи. Что я подразумеваю.]
[Что на входе.]
[Ожидания по идеальному результату. Запреты и/или от чего лучше уходить. Образец выхода.]
Почему это работает
Потому что эта структура закрывает все причины, по которым ИИ обычно отвечает плохо. Нет контекста - додумывает. Не знает формат - выбирает сам. Нет запретов - использует штампы. Нет примера - угадывает стиль.
Три блока убирают угадывание. А когда ИИ не угадывает, а точно знает, что от него хотят - он работает в разы лучше.
Шаблон простой. Запоминается за минуту. Адаптируется под что угодно. Попробуй один раз - и возвращаться к «просто напиши мне что-нибудь» уже не захочется.
И еще хочется сказать такое: нет ничего прям идеального, возможно ваш (лучший для вас) шаблон есть только в вашей голове, по этому попробуйте еще придумать свой и поделиться в комментах, в любом случае будет полезно!