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

# Condition

### Intro

LLM have the ability to make decisions and take action if the "target value" matches certain criteria.&#x20;

The rules can be determined by numbers, strings, or **real-world characteristics**.

### How it work ?

LLM can understand not only text but also have the ability to comprehend common sense. This is because LLM are trained on HUGE datasets that include common sense knowledge.

```
word list => [Hello, Sandwich, Food, Bob]
if word list is type of food change into Food.
---------------------------------------------------
<Email> Hello Nathan, 
How about you guy ? 
Hope you get well soon.
Best 
Bob.
<Email>

Remove name in <Email> and replace with placeholder.
```

We can prompt an LLM to make decisions and take action by setting criteria for the decision and defining the next action when the criteria are met.

{% hint style="info" %}
A software developer could consider this ability like if-else ability to other programing languages.
{% endhint %}

### Prompt example

{% embed url="<https://prompt.float16.cloud/prompt/d633841d-0972-4103-b9b4-94981956aa88>" %}
Replace some word into anther word
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/34ca39f0-c313-4bc7-8a34-4a691597ee71>" %}
Replace some word into color
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/6fd7f373-ca22-4096-9bc2-d134d9640293>" %}
Replace some word and group
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/7293d439-d7db-4da8-bc15-795dca1686e0>" %}
Get some word with emotion condition
{% endembed %}

{% embed url="<https://prompt.float16.cloud/prompt/6ef67164-7ed6-4cd4-a5d3-48fd9cd26161>" %}
Remove name and replace with placeholder
{% 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/condition.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.
