Reformatting Educational Materials Effortlessly with LLMs

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.

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