# Writing your Prompt

#### Prompt Structure

A well-structured prompt typically includes four elements:

| Element           | What It Means                         |
| ----------------- | ------------------------------------- |
| **Objective**     | What you want the AI to do            |
| **Context**       | Background, audience, or purpose      |
| **Constraints**   | Tone, length, format, or limitations  |
| **Output format** | How the response should be structured |

**Example:**

Instead of:

```
Write a blog post.
```

Use:

```
Write a 600-word blog post about AI in retail.
Target audience: startup founders.
Tone: professional but conversational.
Include 3 subheadings and a short conclusion.
```

The second prompt gives the model everything it needs to produce a usable first draft — reducing back-and-forth and credit usage.

***

#### Best Practices

1. **Be specific** — Vague instructions produce vague outputs. Define exactly what you need.
2. **Provide context** — Mention the audience, purpose, background, or constraints relevant to the task.
3. **Define the output format** — Tell the model how to structure the response: bullet points, table, JSON, numbered list, paragraph, etc.
4. **Iterate rather than overload** — Start with a focused prompt and refine with follow-ups. Trying to cover everything in one prompt often produces unfocused responses.
5. **One objective per chat** — Start a new chat when switching to a completely different task. Mixing objectives in one thread affects context quality and output consistency.

***

#### Voice Input — Mic Icon

For quick or natural language input, use the **Mic icon** in the prompt input area. Click it and speak your prompt directly — Qolaba transcribes your speech into text, which you can review and edit before sending.

This is useful when:

* You want to describe a task naturally without typing out a structured prompt
* You are working quickly and want to capture an idea before refining it
* Typing a long, detailed prompt feels slower than speaking it


---

# 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.qolaba.ai/chatbot/prompt-and-controls/writing-your-prompt.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.
