How to create prompts using LLM for other neural networks
Learn how to effectively create prompts for language models (LLMs) and other neural networks. Step-by-step instructions and tips for optimizing queries to achieve the best results.
Краткий пересказ от QRazy ИИ
Prompting with LLM allows transforming generalized ideas into detailed requests for image, text, and other model generators.
Using meta-prompting reduces the time spent on prompt creation, as LLM asks clarifying questions and formulates a ready request.
The process includes describing the task and technical details, which allows for greater accuracy in the results obtained from neural networks.
In this article, I want to show how to create prompts using other prompts. It sounds a bit confusing, but in reality, it's quite simple: we give the LLM an instruction, and it generates a good request for another neural network.
For example, you can upload an image, ask the model to describe in detail what is on it, and then based on that description, create a ready-made prompt for Gemini, Stable Diffusion, Midjourney, or another image generator.
This approach can be used not only for pictures. LLM can prepare requests for text models, video generators, music, voiceovers, programming code, and data analysis.
Simply put, you tell the LLM your idea in plain words, and it helps to formulate it so that another model better understands the task.
What are prompts for creating prompts
What are prompts for creating prompts
A prompt for creating a prompt is an instruction in which we ask the neural network not to perform the task immediately but to prepare a good request for another model first.
Suppose you want to generate an image but do not know how to describe the scene, lighting, angle, style, and other details. You can simply tell the language model your idea in ordinary words. It will help enhance the description and compile a ready-made prompt to be inserted into the desired image generator.
In essence, one neural network helps to set the task for another. This is convenient because you do not have to remember what exactly needs to be specified in the prompt and in what order everything should be written.
A simple scheme looks like this:
You describe your idea.
LLM clarifies the missing details.
The model composes a ready-made prompt.
The prompt is passed to another neural network.
You look at the result and make corrections if necessary.
How LLM helps to formulate tasks for other models
How LLM helps to formulate tasks for other models
It is not always possible to explain to the neural network what it needs right away. You may have an idea in mind, but when you start writing the prompt, it turns out too short and unclear.
In such a situation, you can use LLM. You tell it your idea in plain words, and it helps turn it into a more precise request.
Suppose you want to create an image of a robot in an old workshop. You might write:
Draw a robot in a workshop.
But the result will likely be random. It's unclear what the robot should look like, what the workshop looks like, what the lighting is, and from what angle the scene is shown.
This is where LLM comes in handy. It will help to enhance the idea: suggest the appearance of the robot, the workshop's setting, appropriate lighting, and the camera position.
This means you do not need to come up with the perfect request right away. It is enough to sketch out the main idea in your own words, and then refine it together with the model into a working version.
How a short idea can change
Common description
What can be clarified
Robot in a workshop
Appearance and size of the robot
Old workshop
Tools, parts, dust, wires
Dark scene
Light sources and lighting color
Beautiful shot
Angle and camera position
Drawn style
Comic, watercolor, anime, or technical illustration
What is metaprompting and how does it work
What is metaprompting and how does it work
Metaprompting is a way to instruct the neural network to prepare the prompt itself. You briefly explain what you want to achieve, and it helps turn that idea into a detailed instruction for another model.
For example, if you need an image of an abandoned city, but currently, you can only envision it in broad strokes. You can ask the LLM to compose a prompt for the image generator. It will help describe buildings, weather, lighting, angle, and other details you might not have thought about right away.
It works roughly like this:
first, you describe your idea;
LLM asks questions if it is missing anything;
you clarify important details;
the model collects a ready-made prompt;
the resulting request is sent to the needed neural network.
The main point here is that you do not have to write an exact and detailed instruction the first time. You can start with a couple of ordinary sentences and then gradually refine them into a working prompt.
Metaprompting does not eliminate the need to think about the task. It helps to quickly formulate an already existing idea.
Why delegate prompt creation to the language model
Why delegate prompt creation to the language model
A good prompt is not always produced on the first attempt. Sometimes the idea is already there, but it’s unclear how to properly formulate it and what details to add.
Instead of spending a long time finding the right words, you can describe the task to the language model the way you understand it. Even if it’s just a couple of sentences, LLM will help assemble them into a more detailed request.
This is especially convenient in the following cases:
you are working with a model that is new to you;
you do not know what details are important to specify;
you want to get several variations of the prompt;
you need to quickly adapt one request for another neural network;
the prompt will be used multiple times;
the task consists of several stages.
The finished version does not necessarily have to be used unchanged. You can adjust it to your needs, remove unnecessary details, or ask the model to create another version.
As a result, less time is spent preparing the request, and the result usually comes closer to what you originally envisioned.
For which neural networks can LLM create prompts
For which neural networks can LLM create prompts
The language model can prepare requests for almost any neural networks. The main thing is to explain to it which system you are going to work with and what you want to achieve.
Model Type
What can LLM prepare
Text model
Prompt for an article, letter, translation, retelling, or analysis
Image generator
Description of the scene, characters, light, angle, and style
Video generator
Scene, object movement, camera operation, and frame changes
Music generator
Genre, tempo, mood, instruments, and composition structure
Speech synthesis
Text, voice character, speed, pauses, and intonation
Code model
Technical specification, requirements, constraints, and response format
Data analysis model
Analysis task, data structure, necessary calculations, and type of output
This approach is most often used for image generators: Gemini, Midjourney, Stable Diffusion, Flux, and others. You describe your idea in your own words, and LLM helps to frame it into a more detailed request.
Similarly, prompts can be created for video, music, voiceovers, and programming code.
Moreover, the same request may work differently across different models. What works well in Midjourney may not yield the same result in Gemini or Stable Diffusion. Therefore, it's best to specify right away which exact neural network the prompt is being prepared for.
What elements constitute a good prompt
What elements constitute a good prompt
To start, it's enough to describe in your own words what exactly the neural network is supposed to do. If you need text — just say so. If you need an image, translation, script, or code verification — indicate that right away.
Then add details that will help the model better understand your idea. For example, for whom the text is written, where it will be published, and what the desired outcome should be.
If it's about an image, describe what you want to see: who will be in the frame, where everything happens, what kind of lighting is needed, and what the mood should be. For text, usually just the topic, approximate volume, and a couple of words on how it should sound are enough.
What is usually worth indicating
Task. What exactly the model should do.
Context. For what purpose the output is needed and where it will be used.
Important details. What must be included in the response.
Constraints. What should not be done.
Response format. Text, list, table, HTML, JSON, or just the ready prompt.
Target model. For which neural network the request is being composed.
At the end, you can state how you want the answer to be formatted. For instance, as plain text, a list, a table, ready HTML code, or a prompt without additional explanations.
However, it is not necessary to make the request huge. Sometimes a few precise sentences are more effective than a long text where the requirements are repeated or contradict each other.
A good prompt is not the longest one, but the one that helps the model understand your task.
How to turn a regular task description into a precise instruction
It usually starts with a simple thought like:
I want a beautiful picture of a night city.
Or:
I need to write an article about solar panels.
For a human, this may sometimes be enough, but neural networks usually lack details.
For a night city, you can specify that it’s raining, the streets are empty, signs are reflected in puddles, and the camera is almost at road level.
For the article, it’s worth stating who it is intended for, how detailed the topic needs to be covered, and which questions must be addressed.
Example
Was:
Write an article about solar panels.
Turned into:
Write an easy-to-understand article for beginners on how solar panels work. Explain the basic principle of operation, discuss the advantages and disadvantages, and describe what affects their efficiency. Avoid complex formulas and professional jargon. Volume — about 6,000 characters.
You don't need to try to write the perfect request right away. It's easier to first jot down the task in your own words and look at what is missing.
Usually, it's worth clarifying:
what result you need;
who it is intended for;
what details are mandatory;
what the model should not do;
in what format the answer is needed.
After such editing, a vague idea transforms into an instruction that is much easier for neural networks to work with.
Why LLM should first ask clarifying questions
Why LLM should first ask clarifying questions
When you describe a task in a few words, models often lack information.
For example, the request "make a picture of a car" can be understood in dozens of ways. What type of car is it? Where is it located? What time of day is it? In what style should the picture be?
Therefore, you should not immediately ask LLM to give a ready prompt. It's better to give it the opportunity to clarify what remains unclear: what result is needed, for which neural network the request is written, and what must be included in it.
A couple of questions at the beginning can save a lot of time. Otherwise, the model will compose a prompt based on its assumptions, and you will end up rewriting half of the text later.
Good clarifying questions might look like this:
For which model do you need the prompt?
What should be the main object?
What style do you need?
What should be the format of the result?
Are there any details that should not be present?
Should one option be made or several?
Such questions are especially helpful when you are not entirely sure yet of what you want. By answering them, you gradually clarify your idea.
How to adapt the prompt for a specific model
How to adapt the prompt for a specific model
The same prompt can work differently across different neural networks. Some prefer short and precise descriptions, while others need a more detailed breakdown of the scene, style, and important details.
Therefore, before creating a prompt, it's better to specify right away which model it is intended for.
You can simply write:
Make this prompt for Gemini.
Or:
Adapt this request for Stable Diffusion.
LLM will adjust the text according to the chosen model: it will shorten some parts, clarify others, and add necessary details if required.
Sometimes, it's helpful to prepare several options and test them in practice. Even a well-crafted prompt does not always give the desired result on the first try, so it can be modified a bit until the image, text, or video looks like what you envisioned.
Creating prompts for text models
Creating prompts for text models
First, determine what exactly you want to get from the model: an article, letter, product description, post, or translation. After that, add the topic, approximate volume, and a few words about for whom the text is being written.
It’s also worth explaining how it should sound. For example:
simply and human-like;
officially;
with humor;
without complex terms;
like a personal story;
as a technical instruction.
The clearer you describe the task, the less rewriting you’ll have to do later.
LLM can not only prepare a new prompt but also revise an already completed one. For example, shorten it, eliminate repetitions, or adapt it for another text model.
Creating prompts for image generators
To generate an image, a single general idea is usually not enough. The phrase "draw a house in the forest" leaves the model with too much freedom, so the result may turn out to be entirely different from what you expected.
It’s better to add several details:
what kind of house it is;
what's around it;
what time of day it is;
what the weather is like;
from where the scene is shown;
what the mood of the image should be;
what style it should be executed in.
If desired, you can specify whether it should be a photograph, drawing, comic, watercolor, technical diagram, or another type of image.
Here, LLM is especially useful. You tell it the idea in plain words, and it helps to pull together a detailed prompt for Gemini, Midjourney, Stable Diffusion, Flux, or another model.
Creating prompts for video generators
Creating prompts for video generators
In a video prompt, it is crucial to describe not just what is in the frame but also what is happening.
You need to clarify:
who or what is moving;
where the camera is directed;
whether the angle changes;
how the lighting behaves;
what is happening in the background;
how long the scene approximately lasts.
For example, it is not enough to write:
A car is driving through a night city.
You can clarify that the camera moves alongside the car, the wet pavement reflects the light from the signs, it's raining, and the scene looks like a movie fragment.
LLM will help turn a short idea into a clearer description of movement, camera, and surrounding environment.
Creating prompts for music and speech synthesis
Creating prompts for music and speech synthesis
When creating music, genres, moods, tempos, and instruments are usually specified.
For instance, you might ask:
A calm background melody with piano and light electronic sounds.
Or:
A fast, energetic composition for a short commercial.
For speech synthesis, not just the text itself matters. It is advisable to specify what the voice should be like, the speaking speed, where to pause, and what mood it conveys.
The same text can be read:
calmly;
happily;
anxiously;
officially;
almost in a whisper;
like a narrator in a documentary.
LLM helps to gather all these requests into one prompt. This is especially convenient when you have a general idea of the desired result in mind but don’t know how to describe it.
Creating prompts for programming and data analysis
Creating prompts for programming and data analysis
When working with code, it's best to specify the programming language right away, the task, and the conditions under which the code will be used.
For example, it's not enough to simply ask:
Make a file upload.
You need to clarify:
where the files are uploaded;
what formats are allowed;
what the maximum size is;
how to check the file name;
what should happen in case of an error;
what language and framework are used.
If you already have code, you can attach it and ask to find an error, speed up the work, or rewrite a specific part.
Data analysis works similarly. You need to explain what data you have, what exactly you want to learn, and in what format the result is needed.
This can be:
a table;
a chart;
an SQL query;
a Python script;
anomaly detection;
comparing metrics;
a simple explanation of conclusions.
How to check the quality of the created prompt
How to check the quality of the created prompt
You can only understand how well the prompt is written after testing it. Insert it into the required model and see how closely the result matches what you wanted.
If the text is too dry, the image does not look as you imagined, or the video camera moves incorrectly, it means that some details were missing in the request.
Look at where precisely the model misunderstood you and clarify that point.
A small checklist for verification
Before rerunning, ask yourself:
Did the model perform the main task?
Did all important details make it to the result?
Did it add anything unnecessary?
Did it understand the style correctly?
Was the required format respected?
Are there any contradictions in the prompt?
Can some text be removed without losing meaning?
You don't need to rewrite the request completely each time. Most often, it's enough to change one or two phrases: describe the style in more detail, eliminate redundancies, clarify the action, or add important constraints.
A good prompt is not necessarily a lengthy text. The important thing is that after it, the model produces the result you need.
How to improve the prompt after the first generation
How to improve the prompt after the first generation
The first generation is rarely perfect, and that's normal. Look at the result and note what you didn’t like about it.
It may be:
the text turned out too formal;
an unnecessary object appeared in the image;
the camera in the video moves in the wrong direction;
the music turned out too fast;
the code does not account for error handling.
After that, there is no need to rewrite the entire prompt from scratch. It's better to fix the specific place. For example, you might ask for the text to be simpler, change the lighting, zoom in the camera, or eliminate an unnecessary detail.
It’s better not to change the entire request at once but to tweak it gradually. First, change one thing and see what results it yields. That way, you'll understand whether it helped or not.
If you rewrite everything all at once, it will be hard to figure out which change led to the desired result.
When the prompt starts working as needed, save it. Later, it can serve as a basis for future tasks with minor adjustments.
Common mistakes in automatically generating prompts
Common mistakes in automatically generating prompts
Often, a person simply asks the neural network to write a good prompt but does not explain what it is needed for.
The model has to guess the task itself, so the output is a large text about everything at once. It looks serious, but it usually provides little benefit.
Sometimes LLM, on the contrary, complicates the request too much. It assigns some role to the model, describes rules over several screens, requires checking every step, and strictly formatting the response according to a template.
This can be useful for complex tasks, but in simple cases, it only confuses the work.
Frequent mistakes
Error
What happens
How to fix it
Task is unspecified
LLM has to guess the purpose of the prompt
Briefly explain what needs to be obtained
Model is not named
Results in too general a request
Specify the particular neural network
Too many rules
Important tasks get lost in the requirements
Leave only what affects the outcome
Too general a description
Model is given too much freedom
Add several key details
Conflicting requirements
Result becomes unpredictable
Re-read and remove inconsistencies
No response format
LLM adds unnecessary explanations
Indicate what exactly it should return
Sometimes the model writes too general a request. For example:
Create a beautiful realistic image.
What exactly should be in the picture, where the action takes place, and what its mood is — remains unclear.
Therefore, it is best to read the finished prompt again. Remove repetitions, check for contradictions, and ensure that it indeed describes the desired result.
Can LLM replace a prompt engineer
For ordinary tasks, a language model is usually sufficient. It can help write requests for text, images, videos, music, or code, even if you are not familiar with prompt engineering.
However, for complex projects, just relying on LLM is not enough. You need to test the prompt on different examples, observe where it works well and where it starts to fail, and gradually refine it.
Therefore, it's more appropriate to consider LLM a helper rather than a complete replacement for a specialist.
It quickly creates the first version and helps avoid starting from a blank slate. Then a person checks the result and decides what changes are worth making.
LLM creates a draft of the prompt well. However, it is still a person who must understand whether it really solves the task.
How to automate the transfer of prompts between models
How to automate the transfer of prompts between models
If you are working with neural networks through API, it is not necessary to copy the prompt manually each time. You can set it up so that one model automatically passes the result to another.
For example, a user writes a couple of sentences about what they want to achieve. This description first goes to the LLM, which turns it into a proper prompt. Then the finished text is automatically sent to an image generator, video, or another necessary model.
Example of a chain
User ↓Short task description ↓LLM composes the prompt ↓Prompt is sent to the generator ↓The finished result is returned to the user
Similarly, you can work with images:
Uploaded image ↓Model describes the content ↓LLM creates a new prompt ↓Generator creates the image
To ensure this chain works without errors, it’s best to define the response format in advance.
For example, ask LLM to return only the prompt itself, without explanations and extra phrases. This way, the obtained text can be immediately sent further.
If models exchange data automatically, it is helpful to use a strict format:
This will make it easier for the program to understand where the prompt is located and where it needs to be sent.
Universal metaprompt for creating prompts
Universal metaprompt for creating prompts
Below is a simple template that can be used for various tasks. Instead of the text in square brackets, you need to substitute your information.
Universal metaprompt
You are helping to create a prompt for the model [model name or type].
I need to obtain the following result: [describe the task in your own words].
First, ask me a few questions if there is not enough information. Only ask about those details that will genuinely affect the outcome.
After my responses, compile the finished prompt considering the specificities of the selected model.
The prompt should be clear, without repetitions or conflicting requirements.
Do not add explanations before or after it. Output only the finished text of the prompt.
This template can be used to generate:
articles;
images;
videos;
music;
voiceovers;
programming code;
data analysis requests.
You just need to name the model and explain what you want to achieve.
The main points about creating prompts using LLM
The main points about creating prompts using LLM
You do not necessarily have to be able to write large and detailed prompts right away. Initially, it is enough to tell LLM what you have in mind in plain words.
If some details are missing, let the model first ask questions. This way, it won't have to figure everything out by itself, and the result will be closer to your idea.
The finished prompt should still be tested in practice. The first version may not be ideal, so it can be gradually changed and run again.
The most convenient aspect of this approach is that you do not have to start from scratch each time. You can save a successful metaprompt and use it as a basis for new tasks.
In short
First, describe the task in simple words.
Specify which model the prompt is for.
Allow LLM to ask clarifying questions.
Test the finished request in practice.
Do not change everything at once — correct one detail at a time.
Save successful versions for future tasks.
LLM does not come up with your goal for you. It helps clarify it and communicate it faster to another model.