# Demonstration

### Intro

LLMs have the ability to follow demonstrations by example that we have provided, without any explicit instructions or conditions. It's like providing X as input and Y as output.&#x20;

If we have enough pairs to demonstrate, the LLM will learn and try to predict Y for incoming X.

### How it work ?

LLMs have an ability called "in-context learning."

In-context learning comes along with LLMs by providing examples called few-shot or many-shot examples in the prompt.&#x20;

If you have some experience with training machine learning models, you will notice this concept is similar to preparing a dataset for supervised learning by providing x\_train and y\_train.

```
Rice => noun
Eat => verb
Sleep => verb
Food => 
```

{% hint style="info" %}
A software developer could consider this ability to be a **new type** of capability for programming languages. In traditional programming languages, you need to define conditions to modify the input. However, with this ability, you just prepare example pairs of input and output for the LLM. You no longer need to write conditions to modify the input.
{% endhint %}

### Prompt example

{% embed url="<https://prompt.float16.cloud/prompt/240fbb48-5175-471c-ac72-45012b2e386e>" %}
Machine translation
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/af7f1030-c94e-4787-91fc-a80f8d6aa23a>" %}
Part of speech
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/7911b435-0298-488d-82b6-70b0965318b3>" %}
Arrange text by demonstration
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/ee4a228f-9d45-4f24-abe7-454a287548dd>" %}
Information extraction
{% 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/demonstration.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.
