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

# Prompting Best Practices

> Learn how to write effective prompts

Writing good prompts is the key to getting great results from Leo. Here's how to do it effectively.

## Be Specific

The more specific you are, the better Leo can understand what you want.

### ❌ Too Vague

```
Make the dashboard better
```

### ✅ Specific

```
Add a search bar at the top that filters products as I type. 
Show results instantly without clicking a button.
```

## Focus on Outcomes

Describe what you want to achieve, not how to build it. Leo handles the technical details.

### ❌ Too Technical

```
Create a React component with useState hook and useEffect 
to fetch data from the API endpoint
```

### ✅ Outcome-Focused

```
Show a list of all customers from Odoo. Display their name, 
email, and total orders. Update the list automatically when 
new customers are added.
```

## One Feature at a Time

Break complex requests into smaller, focused prompts.

### ❌ Too Complex

```
Build a complete CRM system with customer management, 
order tracking, inventory, and reporting dashboard
```

### ✅ Step by Step

```
First, create a customer list page that shows all customers 
from Odoo with their contact information.
```

Then after that's done:

```
Add a search function that filters customers by name or email.
```

## Use Examples

Reference similar features or describe desired behavior.

### ✅ Good Examples

```
Add a product card similar to the customer card, but show 
product image, name, price, and stock quantity.

Create a form like the contact form, but for creating 
new orders in Odoo.
```

## Describe the User Experience

Explain how users should interact with the feature.

### ✅ User-Focused

```
When a user clicks the "Add to Cart" button, show a 
confirmation message and update the cart count in the header. 
If the item is out of stock, show an error message instead.
```

## Provide Context

Help Leo understand the bigger picture.

### ✅ With Context

```
In the customer detail page, add a section showing all 
orders for this customer. Display order date, total amount, 
and status. Link each order to the order detail page.
```

## Iterate and Refine

Start simple, then add details based on results.

### Step 1: Basic Feature

```
Create a product list page
```

### Step 2: Add Details

```
Add filters for category and price range
```

### Step 3: Enhance

```
Add sorting by name, price, and date added
```

## Common Patterns

### Creating Pages

```
Create a [page name] page that shows [what to display]. 
Include [specific features].
```

### Adding Features

```
Add [feature] to the [page/component]. When [action], 
[what should happen].
```

### Modifying Existing

```
Update the [component/page] to [change]. Make sure 
[requirement].
```

## What to Avoid

### ❌ Vague Requests

* "Make it better"
* "Fix the bugs"
* "Improve the design"

### ❌ Too Many Features

* Asking for multiple unrelated features
* Complex workflows in one prompt
* Entire applications at once

### ❌ Technical Jargon

* You don't need to know programming terms
* Leo handles the technical implementation
* Focus on what you want, not how

## Remember

* **1 prompt = 1 credit** (error fixes are free)
* **Be descriptive** - More details = better results
* **Iterate** - Build features gradually
* **Use examples** - Reference similar features
* **Focus on outcomes** - What should happen, not how

<CardGroup cols={2}>
  <Card title="Common Patterns" icon="repeat" href="/prompting/common-patterns">
    See real examples of effective prompts
  </Card>

  <Card title="What to Avoid" icon="x-circle" href="/prompting/what-to-avoid">
    Learn common mistakes to avoid
  </Card>
</CardGroup>
