
Giovanna Caneva
Sr. Creative Copywriter at Coderhouse
Artificial Intelligence
Key Prompt Engineering Terms to Understand LLMs
Publicado el
Prompt Engineering is the discipline of designing and optimizing the inputs (prompts) to get the best responses from Large Language Models (LLMs). Understanding its terminology is fundamental for anyone who wants to master the interaction with artificial intelligence and unlock its maximum potential. This article will guide you through the most important concepts so you can start building effective prompts and understand how these powerful systems work.
What Is Prompt Engineering?
Prompt Engineering is the art and science of communicating with LLMs. It's about how we formulate our questions, instructions or requests to guide the model to generate precise, relevant and useful responses. It's not just about writing text, but about structuring that text in a way the model can interpret as efficiently as possible. Good prompt engineering can transform an LLM from a basic tool into an incredibly powerful assistant, capable of performing complex tasks from code generation to the creation of creative content.
Fundamental Prompt Engineering Terms
Prompt
The prompt is the text input you give to an LLM. It can be a question, an instruction, a text fragment to complete, or a combination of these. It's the starting point for any interaction with the model.
Large Language Models (LLMs)
Large Language Models (LLMs) are artificial intelligence models trained on vast amounts of textual data to understand, generate and respond to questions in natural language. They are the basis of tools like ChatGPT, Gemini and Llama. Their ability to process and generate text makes them the center of the generative AI revolution. You can learn more about the technology behind these models in OpenAI's research documentation.
Tokens
Tokens are the basic units of text that LLMs process. They can be complete words, parts of words, or even individual characters and spaces. When you enter a prompt, the LLM breaks it down into tokens for processing. Understanding tokens is crucial for managing the length of your prompts and the generated responses, since most LLMs have limits on the number of tokens they can process per interaction. Google AI offers a good definition of tokenization in the context of Machine Learning.
Context Window
The context window refers to the maximum number of tokens (both input and output) that an LLM can 'remember' and process in a single interaction. If your prompt and the response exceed this limit, the model may 'forget' previous parts of the conversation or truncate the response.
Temperature
Temperature is a parameter you can adjust in LLMs to control the randomness or creativity of their responses. A low temperature value (e.g. 0.2) will make the model more deterministic and predictable, while a high value (e.g. 0.8) will make it more creative and prone to generating diverse and unexpected results.
Top-k and Top-p Sampling
These are sampling methods used to generate text. Top-k restricts the selection of the next word to the 'k' most probable words, while Top-p (or nucleus sampling) selects a set of words whose cumulative probability reaches the value 'p'. Both seek to balance coherence with diversity in the model's responses.
Few-shot Learning / Zero-shot Learning
Zero-shot Learning: The LLM responds to a task without having seen any explicit example of that task in the prompt. It relies on its pre-trained knowledge.
Few-shot Learning: You provide the LLM with a few examples of the task you want it to perform within the same prompt. This helps the model better understand the format or the type of response expected.
Role-playing / Persona Prompts
This technique consists of instructing the LLM to assume a specific role or persona (e.g. 'Act as a digital marketing expert', 'You are a history teacher'). This helps shape the tone, style and content of its responses so they fit that profile.
Chain-of-Thought (CoT) Prompting
Chain-of-Thought (CoT) Prompting is an advanced technique that instructs the LLM to 'think out loud' and show the intermediate steps of its reasoning before giving a final answer. This is particularly useful for complex problems that require multiple logical steps, improving the precision and explainability of the model's solutions. A key study on CoT can be found in research articles like those published on arXiv.
Guardrails
Guardrails are additional mechanisms or instructions implemented to ensure that an LLM behaves safely, ethically and within the desired limits. They can be rules to avoid toxic, biased, irrelevant responses or ones that generate false information (hallucinations).
FAQ about Prompt Engineering and LLMs
Why is Prompt Engineering important? It's crucial for getting precise and relevant responses from LLMs, maximizing their usefulness and efficiency in various tasks.
What is a 'hallucination' in an LLM? It's when an LLM generates false, invented information or information without a basis in the training data or the prompt, presenting it as a fact.
Can I use Prompt Engineering without being a programmer? Absolutely! Prompt Engineering is a textual communication skill accessible to everyone, although programmers can integrate it into applications.
How can I improve my prompts? Be specific, provide context, use examples (few-shot), define the LLM's role and experiment with temperature.
Take Your Career to the Next Level
Mastering Prompt Engineering and the interaction with LLMs is an indispensable skill in today's job market. At Coderhouse, we offer the courses and careers you need to become an expert in artificial intelligence.
If you'd like to keep exploring this topic, you can also read how to use AI to boost your professional profile.
Recommended Coderhouse courses
If you want to understand and apply artificial intelligence in your work, Coderhouse has programs for all levels:
Introduction to Artificial Intelligence Course: to understand how AI models work and start applying them from scratch.
AI Automation Course: to automate workflows with tools like n8n and Make, without needing to code.
AI Engineering Course: for developers who want to integrate language models into real applications.

Sobre el autor
Hi! People call me Gio 👋🏽 I hold a degree in Advertising with a solid track record in digital marketing and content management across UGC, influencers, paid media & owned media. I've collaborated with industries in the Tech, Beauty, Fashion and Finance worlds, each of which added value to my professional profile from a different angle. 📲 I'm a heavy social media user, which keeps me constantly up to date on trends, vocabulary and best practices across the different platforms. To learn more about my background, feel free to check out my LinkedIn profile!