# 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: 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:

```
GET https://docs.float16.cloud/prompting/chat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
