Introduction: Why Structuring Your Prompts Matters

Welcome to the first lesson of the course! This lesson will teach you why structuring your prompts is essential when working with large language models.

When you write a prompt, you are giving instructions to the LLM. If your instructions are clear and well-organized, the model is much more likely to provide you with a helpful and accurate response. On the other hand, if your prompt is messy or hard to follow, the model might misunderstand what you want.

Structuring your prompts is not just about making them look nice. It helps the LLM:

  • Understand the context and the specific question or task.
  • Separate different parts of your request, such as background information and the actual question.
  • Focus on the most critical details.

Throughout this lesson, you will see how simple structuring choices can make a big difference in the quality of the responses you get.

What Does It Mean to Structure a Prompt?

Structuring a prompt means organizing your prompt in a way that is easy for both you and the LLM to read and understand. This often involves using clear sections, lists, or other visual cues to separate different parts of your request.

For example, you might:

  • Use headings or labels to separate context from your main question.
  • Break down complex requests into bullet points or numbered lists.
  • Highlight important words or phrases using capitalization, symbols, or spacing.

The key is to present your prompt clearly, so the LLM can easily identify what you want.

Let's look at a few examples to see how structuring helps.

Example 1: Research Summary Request

Unstructured:

Structured (using headings and bullet points):

Example 2: Email Drafting

Unstructured:

Structured (using different style of headings and a numbered list):

Example 3: Event Planning Checklist

Unstructured:

Structured (using a bulleted list and separating the context from the instructions):

Please note that we use various structuring styles. Sometimes, headers are written in all caps, other times they appear as plain text.

You are free to use any structuring style you find comfortable—there is no single "best" way. Any clear and organized format is equally effective, as long as it helps both you and the LLM understand the prompt better.

Using Markdown for Prompt Structuring

One of the most popular ways to structure prompts is by using Markdown. Markdown is a simple way to format text using plain characters and symbols. It's widely used for writing prompts, documentation, and notes because it's easy to read and write.

With Markdown, you can quickly add structure and emphasis to your prompts. Here are a few basics:

  • Headings: Use # for headings. More # symbols mean smaller headings.
    • # Heading 1
    • ## Heading 2
  • Bold: Use double asterisks or double underscores.
    • **bold text** or __bold text__
  • Italics: Use single asterisks or underscores.
    • *italic text* or _italic text_
  • Lists: Use dashes -, asterisks *, or numbers for lists.
    • - Item 1
    • - Item 2
    • 1. First item
Summary And What's Next

In this lesson, you learned why prompt structuring is necessary and how to use simple styles like headings, lists, and spacing to make your prompts more straightforward. Well-structured prompts help LLMs understand your requests and provide better answers.

Next, you will get a chance to practice structuring prompts yourself. You'll see how small changes in organization can significantly improve the quality of the responses you receive.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal