> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odella.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamic Prompting

<Note>
  In this section, we'll explore how to create dynamic prompts and use various block types in Odella.
</Note>

## Getting Started

1. In the sidebar, locate the "Flows" tab.
2. Find the folder named "2. Dynamic Prompting".
3. Open the "Dynamic Prompting" flow.

You should see a flow that looks like this:

<Frame>
  <img src="https://mintcdn.com/odella/51HWMsOHcHsu1IXd/workflow-tutorial/assets/02-interpolation-overview.png?fit=max&auto=format&n=51HWMsOHcHsu1IXd&q=85&s=ca637e99a2c6e1f29c799ceda97ada16" alt="Dynamic Prompting Flow" width="1812" height="514" data-path="workflow-tutorial/assets/02-interpolation-overview.png" />
</Frame>

## Running the Flow

<Steps>
  1. Click the "Run" button to start the flow.
  2. You'll see two Chat Blocks running at the same time.
  3. A user input prompt will appear, asking you to choose a contract type.
  4. Enter one of the listed contract types and submit.
  5. The final Chat Block will generate a template for your chosen contract type.
</Steps>

## Understanding the Flow

Let's break down this flow into simpler parts:

### 1. Setup

<Frame>
  <img src="https://mintcdn.com/odella/51HWMsOHcHsu1IXd/workflow-tutorial/assets/02-interpolation-setup.png?fit=max&auto=format&n=51HWMsOHcHsu1IXd&q=85&s=9a05d57ff14cf933dc18b414d1cd217d" alt="Setup Blocks" width="674" height="893" data-path="workflow-tutorial/assets/02-interpolation-setup.png" />
</Frame>

We start with three blocks:

* A Text Block for the system prompt
* Two Prompt Blocks to guide the AI's responses

### 2. Combining Outputs

After the initial chats, we use a Text Block to combine their outputs into one message.

### 3. User Input

<Frame>
  <img src="https://mintcdn.com/odella/51HWMsOHcHsu1IXd/workflow-tutorial/assets/02-interpolation-user-input-toggle.png?fit=max&auto=format&n=51HWMsOHcHsu1IXd&q=85&s=fd7aea7f10997e42e55ba14368e7a0ae" alt="User Input Toggle" width="189" height="161" data-path="workflow-tutorial/assets/02-interpolation-user-input-toggle.png" />
</Frame>

We use a User Input Block to ask the user which contract type they want. The question is created dynamically based on the previous outputs.

### 4. Final Response

<Frame>
  <img src="https://mintcdn.com/odella/zgwzHMHNE4aWdtAR/workflow-tutorial/assets/02-interpolation-final-response.png?fit=max&auto=format&n=zgwzHMHNE4aWdtAR&q=85&s=bb7afbd08412af52472bae9ea039a353" alt="Final Response" width="304" height="726" data-path="workflow-tutorial/assets/02-interpolation-final-response.png" />
</Frame>

The flow ends with a final Chat Block that generates the contract template based on the user's choice.

## Key Concept: Dynamic Prompting

Dynamic prompting allows us to create flexible, context-aware interactions. In this flow, we use it to:

1. Combine AI-generated introductions and contract lists
2. Create a personalized user input prompt
3. Generate a specific contract template based on user input

By using dynamic prompts, we can create more interactive and responsive workflows in Odella.
