# Formatting

### Intro

Text formatting is a crucial ability of LLMs because LLMs can understand the text that we provide to them. LLMs can then format or arrange this text into another structure.&#x20;

Text processing is not an easy task to handle if we rely solely on programming languages.&#x20;

The emergence of LLMs can help us significantly with tasks involving text processing, including formatting.

### How it work ?

By formatting the text, we can clarify the structure of the output as we desire.&#x20;

If we do not specify the structure, the LLM will determine the most general output structure for all audiences, which may not be precise for domain-specific needs.&#x20;

The best approach is to provide detailed information about the desired structure of the output.

{% code overflow="wrap" %}

```
"In a quiet village, a young girl named Mia discovered a hidden key in her grandmother's attic. Curious, she followed a map etched on the key, leading her to an ancient oak tree in the forest. As she turned the key in a concealed lock, a door opened, revealing a magical world filled with talking animals and shimmering rivers. Mia befriended a wise fox who guided her through enchanting adventures. When she returned home, she knew the magic was real, for the key glowed warmly in her hand, a reminder of the wonders just beyond the ordinary."

Format the text into 3 sectors.
```

{% endcode %}

{% hint style="info" %}
A software developer could consider this ability to be a **new type** of capability for programming languages.
{% endhint %}

### Prompt example

{% embed url="<https://prompt.float16.cloud/prompt/347f008b-e02e-45f9-997b-324edcbb058b>" %}
CSV to JSON
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/8ed38a37-29fd-4939-bf70-18e777bbbe07>" %}
JSON to case report
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/e5dbe06a-95dd-4210-9097-5c5f574aecbe>" %}
User requirement to functional and non-functional requirement
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/99b65ed2-7e87-4142-9160-77f791ffcac5>" %}
Formatting text into 3 sectors
{% endembed %}
