# How it Works ?

#### **Step 1: Have a Conversation**

Start a normal chat. Each assistant message is tagged with the model that generated it (e.g., "GPT-4.1", "Claude Sonnet 4.6"), so users always know which model they're interacting with.

#### **Step 2: Regenerate with a Different Model (Branching)**

Users can regenerate any assistant response using a different model. This creates a **branch**—an alternative response to the same question. The branch appears inline alongside the original, allowing users to compare them.

Users can generate up to **5 branches per message**, building a collection of responses from different models. For example:

<table data-header-hidden><thead><tr><th width="158.19921875">Branch</th><th width="265.453125">Model</th><th>Why</th></tr></thead><tbody><tr><td>Original</td><td>GPT-4.1</td><td>Default response</td></tr><tr><td>Branch 2</td><td>Claude Sonnet 4.6</td><td>Different writing style</td></tr><tr><td>Branch 3</td><td>Gemini 2.5 Pro</td><td>Compare Google's approach</td></tr><tr><td>Branch 4</td><td>DeepSeek R1</td><td>Reasoning-focused model</td></tr><tr><td>Branch 5</td><td>Grok 4</td><td>Another perspective</td></tr></tbody></table>

Each branch is clearly labeled with its model for easy comparison.

#### **Step 3: Continue from a Branch (Forking)**

After comparing branches, users can continue the conversation from any branch. This creates a **fork**—a new thread that picks up from the selected branch. The original thread remains intact, allowing users to revisit or explore other branches.

Forks can be nested up to **5 levels deep**, enabling exploratory conversation trees.

***

#### **Per-Message Branch Indicators**

Messages with branches display a count of alternative responses (e.g., "1 of 4"). Each response shows:&#x20;

* **Model name** (with logo).
* **Token usage** (response cost).
* **Reasoning content** (if supported by the model).

#### **Thread Sidebar**

Forked threads are **hidden from the main list** to keep the sidebar clean. They are accessible through the parent thread's conversation tree view.

#### **Full Conversation Tree**

The `/full` endpoint displays the entire conversation tree, showing where branches and forks occurred.


---

# 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/model-selection/chat-branching/how-it-works.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.
