Prompt Engineering Concepts

Pedro VG

Pedro VG

Ultima Actualización: 25/5/2025

In this article, we will delve into the "art" of Prompt Engineering and how it can enhance our way of interacting with language model (LLMs).

The Myth

Prompt Engineering has often been presented as a new branch of computing, but in reality, it is a set of techniques that enable us to get better responses from language models.

These concepts vary depending on the model, so they are not universally applicable and can even change based on elements like previous context or System Prompt.

Here we present three key concepts for interacting with an LLM:

  1. Define the Format: It is crucial to clearly define the expected structure from the model. For instance, if you want the response in a specific JSON format or as a numbered list with certain elements, specify it in the prompt. The LLM cannot guess the desired format unless it's very obvious or common, like narrative structure.

  2. Be Clear and Specific: To obtain effective responses from the model, you must precisely indicate what is expected. Here are some examples:

    "Fix the syntax errors in this function."
    "Write a commercial-style email with three paragraphs and a brief greeting at the start. Frame it as a temporary proposal using these context documents."

    On the other hand, asking the model to perform multiple unrelated tasks significantly increases the chance of getting unsuitable responses, like in this case:

    "Fix bugs in this function and write code for another functionality."

    More advanced LLMs are less prone to errors in such cases, but accuracy still decreases.

  3. Converse and Learn: Developing an effective prompt is an iterative task that may require several attempts and adjustments. The more compact the model, the more it will need fine-tuning of the prompts. Furthermore, since interaction with the LLM typically involves conversation, multiple steps can be taken to complete a desired task.

Conclusion

Understanding how Prompt Engineering works turns this tool into a valuable resource for boosting the productivity we can derive from language models,further facilitating our way of interacting with AI.

Prompt Engineering Concepts | Valentia.