Prompt examples for the most common everyday tasks

In the previous section we looked at a basic example of using prompts with large language models (LLMs). Now let's go deeper and study in more detail how prompts can be used for a variety of tasks. The examples below will help you get a better feel for the key concepts worth keeping in mind when designing prompts, and show how they can deliver strong results.

Text compression

Text compression is one of the core tasks in natural language processing: turning long texts into short, easy-to-digest summaries. The technique is especially handy when you need to convey the gist of an article or a complicated concept quickly.

For instance, imagine you need a quick, brief explanation of what quantum computers are. You could use the following prompt with GPT-4o:

Prompt:

Explain what quantum computers are.

Result:

Quantum computers are devices that use the principles of quantum mechanics to process information. Unlike classical computers, which operate on bits (0 or 1), quantum computers use qubits. A qubit can be in state 0, state 1 or in a superposition of both at once, which lets quantum computers perform certain calculations far faster than classical machines.

The core principles of quantum computing include:
• Superposition: this property lets qubits be in several states at the same time. Thanks to it, quantum computers can process an enormous number of possible solutions simultaneously.
• Entanglement: a phenomenon in which qubits become linked so that the state of one qubit depends directly on the state of another, no matter the distance between them. This allows information to be transferred more efficiently.
• Interference: used to reinforce correct solutions and suppress incorrect ones during computation.

Quantum computers have the potential to solve problems considered hard for classical computers, such as factoring large numbers, optimizing complex systems and simulating molecular structures. That said, they are still under development, and their practical use is limited by technical difficulties such as the need to keep qubits in a stable state.

Quantum computers could revolutionize fields such as cryptography, artificial intelligence and scientific research, but that will take considerable further development of the technology and the infrastructure around it.

If that explanation is too much and you want something even more compact, you can ask the model to cut the answer down to a single sentence:

Prompt:

Explain this in one sentence.

Result:

Quantum computers are devices that use the principles of quantum mechanics, such as superposition and entanglement, to perform calculations far faster than classical computers, opening up new possibilities for solving hard problems.

These examples show how different approaches can give you shorter, more precise results when you experiment with the wording of your prompts.

Information extraction

Language models can not only generate text but also pull key information out of existing text. That makes them indispensable tools for natural language processing (NLP) tasks such as classification, data extraction and text analysis.

Consider a case where you need to extract specific information from a text. Suppose we have the following paragraph:

Prompt:

OpenAI's language models, including GPT-4, have revolutionized artificial intelligence by providing powerful tools for natural language processing. These models are widely used in applications ranging from chatbots to advanced research assistants.

Which language model is mentioned in the paragraph above?

Result:

GPT-4.

The model correctly pulled the name of the language model out of the text. This approach is especially useful when you need to isolate important information from a large body of text quickly, which speeds up working with data and analyzing it.

Question answering systems (Q&A)

To get precise, specific answers from a language model, you need to structure the prompt properly. The clearer and more specific your instruction, the more accurately the model can answer your question.

Consider a case where the model has to answer a question using a specific context.

Prompt:

Answer the question based on the context below. Give a short, precise answer. Reply 'Not sure about the answer' if you are not confident the answer is correct.

Context: In 2024 OpenAI released GPT-4, an improved version of its predecessor, GPT-3.5, offering expanded capabilities for understanding and generating human-like text.

Question: When was GPT-4 released? Answer:

Result:

2024

In this example a well-structured prompt let the model give a precise, concise answer. The context provided helped the model understand the request, and the clear instruction ensured a specific result.

Text classification

Text classification is another task language models handle well. Sometimes you need not just to generate text but to determine its tone or sentiment. For that it is important to give the model clear instructions and, where needed, examples.

Prompt:

Rate the sentiment of the following text as positive, neutral or negative.
Text: I liked the film, but the ending was disappointing.
Sentiment:

Result:

Neutral.

The model correctly determined that the overall tone of the text is neutral, despite the presence of both positive and negative elements.

To improve classification accuracy, you can add more examples:

Prompt:

Rate the sentiment of the following text as positive, neutral or negative.
Text: The service was excellent and the food was delicious.
Sentiment: Positive.
Text: I liked the film, but the ending was disappointing.
Sentiment:

Result:

Neutral.

Adding an example helped the model interpret the sentiment of the text more accurately, which again underlines how important examples are for improving answer quality.

Role

Building role-based dialogues with language models is one of the most entertaining tasks. It lets the model behave according to a given role or context, which can be useful in a variety of scenarios — scientific discussions or friendly conversation, for example.

Prompt:

The following dialogue is with an AI assistant that specializes in space science. The assistant gives detailed, technical explanations.

Human: Can you explain how black holes form?
AI:

Result:

Of course! Black holes form when a massive star exhausts its nuclear fuel and its core collapses under its own gravity, creating a singularity of infinite density where the escape velocity exceeds the speed of light.

This example shows how a prompt can set the tone and the technical level of the model's answer.

If you need a simpler explanation, you can change the instruction:

Prompt:

The following dialogue is with an AI assistant that gives simple, clear explanations suitable for a general audience.

Human: Can you explain how black holes form?"
AI:

Result:

Of course! Black holes are created when very large stars run out of fuel and collapse, pulling everything around them into a very small space with strong gravity.

By changing the tone of the instructions, you can tailor the model's answers to the audience you need, which makes the dialogue more relevant and more useful for the end user.

Reasoning

Reasoning is one of the hardest tasks for language models, because it demands deep processing of information and analytical ability. Even so, carefully designed prompts can produce significant results here too.

Prompt:

What is the result of multiplying 7, 8 and 9?

Result:

504

Now let's look at a harder task that requires analysis.

Prompt:

Identify the odd numbers in this sequence: 4, 7, 10, 13, 16, 19, and add them up.

Result:

Odd numbers: 7, 13, 19. Sum: 39.

This example demonstrates how a model can be used for tasks that require step-by-step reasoning. Keep in mind that harder tasks may call for detailed instructions and a clear description of the steps, which significantly improves the accuracy of the result.

Code generation

Language models such as GPT-o1 or Claude Sonnet 3.5 have strong potential for generating code, which makes them indispensable tools for developers and programmers. Their ability to understand complex requests and produce working software solutions can cut development time considerably.

It matters that prompts are worded properly, because that directly affects the quality of the generated code. Let's look at a few examples of how this works in practice. Suppose you need to write a Python function that takes a list of numbers and returns the sum of all the even numbers in it. You could send the following request:

Prompt:

Write a Python function that takes a list of numbers and returns the sum of all the even numbers in that list. The function only.

Result:

JavaScript
def sum_even_numbers(numbers):
    return sum(num for num in numbers if num % 2 == 0)

This simple request shows how a language model can interpret an instruction and generate correct code that does the job. It is especially useful when you need a ready solution quickly without writing the code by hand from scratch.

Now let's look at a more complex example. Suppose you need to build an SQL query that selects every employee from the 'employees' table whose salary is above 50,000. You could use the following prompt:

Prompt:

Write an SQL query that finds every employee in the 'employees' table whose salary is greater than 50,000."

Result:

Here is an example of an SQL query that selects every employee from the employees table whose salary is greater than 50,000:

JavaScript
SELECT *
FROM employees
WHERE salary > 50000;

This query selects all fields (*) for those employees whose value in the salary column exceeds 50,000.

Here the language model generates a correct SQL query that fully matches the description of the task. This demonstrates how models can be used to automate routine work, speeding up development and reducing the chance of errors.

Using language models for code generation makes programming tasks much easier and lets you focus on the harder parts of development. Remember, though, that the quality of the result depends on how precisely and clearly the prompt is worded. If you want optimal code, be sure to spell out every necessary detail and check the result against your expectations.

By the way, GPTunneL has a library of ready-made code snippets created by users with AI.

Text translation

Translating text from one language into another is one of the basic tasks language models can handle. What matters is that the translation is not just accurate but also true to the style and context of the source text. A model can manage that if you give it the right prompt.

Prompt:

Translate the following text from English into Spanish: 'The rapid development of artificial intelligence is transforming many industries, including healthcare, finance, and education.'

Result:

El rápido desarrollo de la inteligencia artificial está transformando muchos sectores, incluidos la sanidad, las finanzas y la educación.

With a prompt like this you get an accurate, well-written translation that keeps the meaning of the original and adapts it for a Spanish-speaking audience. If you need a stylistically or contextually trickier translation, you can spell out your requirements in the prompt.

Building to-do and shopping lists

Putting together a list of tasks or the things you need is an important part of planning, whether for a working day or a whole week. A language model can help you structure tasks, sorting them by priority or by area of life, which makes it easier to manage your time and get things done.

Prompt:

Create a list of the basic foods needed for a Mediterranean diet.

Result:

The Mediterranean diet is built on fresh, natural foods that support a healthy lifestyle. Here is a list of the basic foods it calls for:
1. Olive oil – the main source of fats.
2. Fresh vegetables – such as tomatoes, cucumbers, peppers, eggplants and zucchini.
3. Fruit – oranges, apples, grapes, figs and pomegranates.
4. Whole grain products – bread, pasta and rice.
5. Legumes – chickpeas, beans, lentils.
6. Nuts and seeds – almonds, walnuts, sunflower seeds.
7. Fish and seafood – salmon, sardines, tuna, mussels.
8. Lean meat – chicken and turkey.
9. Dairy – yogurt and cheese, preferably low-fat.
10. Herbs and spices – basil, oregano, rosemary, garlic.
11. Red wine – in moderation.

These foods form the basis of the Mediterranean diet, which puts the emphasis on freshness and variety.

Text summaries

Writing a short summary of a text is the skill of picking out what matters most from any volume of information. It is especially useful when you need to grasp the substance of a complex document or a scientific paper quickly. A well-written prompt lets a language model do it efficiently.

Prompt:

Read the following text and write a short summary: 'Research has shown that regular physical exercise improves cognitive function, helps control weight and reduces the risk of chronic disease.

Result:

Physical exercise improves brain function, helps maintain weight and reduces the risk of disease.

With this approach you can quickly get a clear, concise summary that conveys the main ideas of the text. If you need deeper analysis or extra context, you can build that into the instruction.

Writing a letter

Writing a formal letter is a task that calls for precision and a respectful tone. A model can help you produce a professional letter that meets all the norms of business communication.

Prompt:

Write a formal letter thanking a colleague for their help on a project.

Result:

Dear [Name],
Thank you for your invaluable help in delivering the project. Your contribution was key to our success. I look forward to continuing to work together productively.
Kind regards, [Your name].

A letter like this lets you express your gratitude and underline how much your colleague's contribution mattered to the shared result. If you need to make the thanks more specific or mention details of the project, say so in the prompt.

Building a schedule

Planning a day or a week is a key part of productivity. A language model can help you put together a schedule that accounts for every important event and task, spreading them across the day so you get everything done.

Prompt:

Put together a schedule for a working day, allowing for meetings, a lunch break and time to work on tasks.

Result:

9:00 - 10:00: Morning stand-up.
10:00 - 12:00: Work on the report.
12:00 - 13:00: Client meeting.
13:00 - 14:00: Lunch.
14:00 - 16:00: Work on the project.
16:00 - 17:00: Preparation for tomorrow's presentation.

A schedule like this makes efficient use of your working hours without letting important tasks or meetings slip. You can also ask the model to allow for rest or breaks so you avoid overload.

Try it in GPTunneL