Introduction: The Value of Reformatting with LLMs

As an educator, you often work with materials that come in many different formats — sometimes not in the format you need. For example, you might receive a lesson outline as a long paragraph, download a table in HTML, or have an assessment written in markdown. Reformatting these materials by hand can be tedious and time-consuming, taking away from your creative work and lesson planning.

LLMs can help you quickly reorganize or reformat these materials. With the right prompt, you can turn raw content into the exact format you need, saving time and effort. In this lesson, I will show you how to use LLMs to handle these tasks efficiently.

The examples in this lesson are simple, but remember that LLMs can work with much larger and more complex materials as well.

Example 1: Specific Format

Let’s walk through how to write prompts that help LLMs reformat your materials. We’ll build each example step by step, explaining the reasoning behind each prompt.

Suppose you have an assessment written in some specific format, like markdown, but you want to remove all special symbols so it’s just plain text.

First, you need to tell the LLM what your input is and what you want as output. Be clear about both.

Start by giving the context:

Context:
I have a small assessment in a markdown format.

Next, provide the actual content. For this example, let’s use a short assessment:

# Geography Assessment

**Name:** ___________________  
**Date:** ___________________

### Multiple Choice

1. What is the largest ocean?
   - a) Atlantic
   - b) Indian
   - c) Pacific
   - d) Arctic

2. Which continent is Egypt in?
   - a) Asia
   - b) Africa
   - c) Europe
   - d) South America

### Short Answer

3. Name one country that borders the United States.

   ___________________________

### True or False

4. The Amazon River is in Africa.  
   - True / False

**End of Assessment**

Now, clearly state what you want the LLM to do:

Ask:
Rewrite it **without** markdown-specific symbols.

By providing both the context and clear instructions, you help the LLM understand exactly what you want. The model will remove all markdown formatting (like #, **, and -) and return the assessment as plain text, making it easier to print or share.

Example 2: Cleaning Data

Now, let’s say you have a table in HTML, but you want it in markdown format for your handout.

First, explain your context:

Context:
I downloaded a table with Beethoven's most famous compositions, but it is in HTML code:

<body>
    <table>
        <caption>Beethoven's Most Famous Pieces</caption>
        <thead>
            <tr>
                <th>Title</th>
                <th>Year Composed</th>
                <th>Genre</th>
                <th>Notable Facts</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Symphony No. 5 in C minor, Op. 67</td>
                <td>1804–1808</td>
                <td>Symphony</td>
                <td>Famous for its iconic four-note motif ("da-da-da-dum")</td>
            </tr>
            <tr>
                <td>Für Elise (Bagatelle No. 25 in A minor)</td>
                <td>1810</td>
                <td>Piano Solo</td>
                <td>One of the most popular piano pieces ever written</td>
            </tr>
            <tr>
                <td>Symphony No. 9 in D minor, Op. 125 ("Choral")</td>
                <td>1822–1824</td>
                <td>Symphony</td>
                <td>Features the "Ode to Joy" in the final movement</td>
            </tr>
            <tr>
                <td>Piano Sonata No. 14 in C-sharp minor, Op. 27, No. 2 ("Moonlight Sonata")</td>
                <td>1801</td>
                <td>Piano Sonata</td>
                <td>Renowned for its dreamy first movement</td>
            </tr>
            <tr>
                <td>Symphony No. 6 in F major, Op. 68 ("Pastoral")</td>
                <td>1808</td>
                <td>Symphony</td>
                <td>Evokes scenes of nature and countryside</td>
            </tr>
            <tr>
                <td>Piano Concerto No. 5 in E-flat major, Op. 73 ("Emperor")</td>
                <td>1809</td>
                <td>Piano Concerto</td>
                <td>Beethoven's last and grandest piano concerto</td>
            </tr>
        </tbody>
    </table>
</body>

Finally, ask for the transformation:

Ask:
Rewrite it as a markdown table.

By specifying both the input (HTML table) and the desired output (markdown table), you guide the LLM to convert the content into a format that is easier to use in your handouts or lesson materials.

Example 3: Turning a Paragraph into a Bulleted Nested List

Sometimes, you have a block of text and want to change it's structure. Imagine you have a lesson outline written as a text block. You want to make it appropriately structured.

Start with your context:

Context:
I have a lesson outline written as a sample text.

A computer is made up of several important parts that work together to process information. The central processing unit, or CPU, is often called the brain of the computer because it carries out instructions and calculations. The motherboard is the main circuit board that connects all the components. Memory, or RAM, is used to temporarily store data that the computer is currently using. Storage devices, such as hard drives or solid-state drives, keep data and programs even when the computer is turned off. The power supply provides electricity to all the parts. Input devices like keyboards and mice allow users to interact with the computer, while output devices like monitors and printers display or produce results. The graphics card helps create images and videos on the screen. All these parts must work together for the computer to function properly.

Then, ask for the transformation:

Ask:
Organize it as a bulleted nested list.

By asking the LLM to organize the information as a bulleted nested list, you make the content easier to read and understand. This is especially helpful when you want to present information in a more structured way.

More Ways LLMs Can Help with Reformatting

Beyond the examples above, LLMs can help you with many other reformatting tasks. Here are a few more quick ideas:

  • Convert a list to a paragraph:
    If you have a list of points and want to turn them into a smooth paragraph, just ask the LLM to rewrite the list as a paragraph.

  • Reorder content:
    If you want to change the order of sections or items, you can ask the LLM to sort or group them differently.

  • Summarize for different formats:
    You can ask the LLM to summarize a long text for a slide, a handout, or an email.

  • Change between file formats:
    For example, you can ask the LLM to convert CSV data to a markdown table, or vice versa.

The key is to be clear about your input and your desired output. The more specific you are, the better the results.

Summary and What’s Next

In this lesson, you learned how LLMs can help you quickly reorganize or reformat your educational materials. By providing clear context and instructions, you can turn markdown into plain text, HTML tables into markdown, and paragraphs into structured lists — saving you time and effort.

Now, you will get a chance to practice these skills with hands-on exercises. Try out different prompts and see how LLMs can make your workflow easier and more efficient. The more you practice, the more confident you’ll become in using LLMs to handle all kinds of reformatting tasks.

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