> 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/chat.md).

# Chat

### Intro

ChatGPT is one of the well-known use cases that draws our attention to the capabilities of LLMs.

### How it work ?

The chat capability of an LLM is not a magic trick. It's based on a prompt template that segments user turns and assistant (LLM) turns and combines them. That's why an LLM can recall information from previous chats.

The system prompt can be an important part because it allows us to control the chat style and chat objectives.

{% code overflow="wrap" %}

```
SYSTEM PROMPT
You are an assistant and need to collect data from the user, including their name, age, and gender. You need to guide and help the user input the correct data.
USER PROMPT
What about pricing ?
```

{% 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/b3f3884a-ff37-42aa-bc84-de263bcfd108>" %}
Change previous number into another language
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/9a265806-eeb7-4dd7-9c8c-cdceaee969fd>" %}
Chatbot to collect information
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/e4925c87-2261-4877-9168-9871a4459104>" %}
Chatbot to collect information and refused non-relevant task
{% 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/chat.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.
