> For the complete documentation index, see [llms.txt](https://docs.float16.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.float16.cloud/prompting/formatting.md).

# 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.float16.cloud/prompting/formatting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
