Clarifying Questions and Branching Conversations in LLM Collaboration

    This article presents practical methods for managing conversational state in multi-turn LLM development workflows. It explains how clarifying questions can surface missing requirements before execution, how branching conversations can isolate exploratory work from the main thread, and how the two techniques can be combined. It also outlines an evaluation approach for comparing models and prompt strategies objectively.

    1. Problem Background

    Large language models are now part of everyday development workflows, but multi-turn conversations still suffer from three common problems. First, requirements are often incomplete. The model fills gaps with assumptions, producing output that looks reasonable but drifts from the goal. Second, a single follow-up question may introduce too much unrelated content. Later answers gradually drift, and earlier constraints are diluted. Third, developers may repeatedly modify the main conversation to test an idea. The main thread ends up mixed with trial-and-error records, making it hard to trace or reuse.

    These problems share the same root cause: conversational state is not managed deliberately. The two methods below address the first two problems and the third problem respectively.

    2. Clarifying Questions: Confirm Before Execution

    The core idea of clarifying questions is to make the model identify information gaps before executing a task. When facing a gap, a model usually chooses a reasonable assumption and answers directly. If the gap materially affects the result, that assumption is likely wrong, and the error may be hard to notice.

    When designing a clarification mechanism, three parameters need to be controlled.

    1. Trigger conditions: Ask only when information is missing, multiple reasonable interpretations exist, or the operation is irreversible. Otherwise, the model may interrupt the workflow too often and reduce efficiency.
    2. Number of questions: Ask no more than three questions at a time. Too many questions may cause users to abandon answering, leaving the model to proceed with guesses.
    3. Default assumptions: Attach the model’s default assumption to each question. If the user does not answer, the model can continue based on the assumption and list the assumptions at the beginning of the output for later correction.

    A sample prompt template is shown below:

    1. Before starting, check whether the task description has any of the following gaps: target audience, input format, output constraints, performance or resource limits.
    2. If a gap would clearly affect the result, confirm with me using no more than three questions, and provide your default assumption for each question.
    3. If a gap would not affect the result, start directly and list the assumptions you used at the beginning of your answer.

    The key point of this template is to let the model decide whether to ask, while defining the boundaries of questioning. Teams can turn it into a standard prefix to reduce the cost of repeating the description each time.

    3. Branching Conversations: Isolate Experiments and Protect the Main Thread

    The idea of branching conversations is to copy a snapshot of the current context, explore in the branch, and bring only the conclusion back to the main thread. Intermediate attempts, wrong directions, and invalid code in the branch do not pollute the main thread.

    This approach fits scenarios such as verifying whether an implementation idea is feasible, requesting several alternatives for comparison, troubleshooting a local error, or temporarily confirming a concept. These tasks need context, but the discussion process itself does not need to remain in the main thread.

    The sample code below shows the basic data structure for branching. The model invocation function call_model is provided by the caller, and the code does not depend on any specific service.

    1. from copy import deepcopy
    2. from dataclasses import dataclass, field
    3. @dataclass
    4. class Conversation:
    5. messages: list = field(default_factory=list)
    6. def fork(self) -> "Conversation":
    7. # Deep-copy message history so branches do not affect each other
    8. return Conversation(messages=deepcopy(self.messages))
    9. def ask(self, text: str, call_model) -> str:
    10. self.messages.append({"role": "user", "content": text})
    11. reply = call_model(self.messages)
    12. self.messages.append({"role": "assistant", "content": reply})
    13. return reply
    14. def absorb_summary(main: Conversation, summary: str) -> None:
    15. # Write only the branch conclusion back to the main thread and discard trial-and-error details
    16. main.messages.append({"role": "user", "content": f"Branch conclusion: {summary}"})

    In practice, first define the goal in the main thread, then call fork() to create a branch. After exploration in the branch is complete, compress the conclusion into one or two sentences and write it back to the main thread through absorb_summary. The branch object is then discarded and does not participate in later conversations.

    4. A Combined Workflow

    The two methods can be combined into a clear workflow.

    1. Define the goal in the main thread. Use the clarification mechanism to ensure requirement boundaries are complete.
    2. Open a branch when encountering a local problem. For example, compare two implementations, debug a piece of code, or ask about a concept.
    3. Explore freely inside the branch. Trial and error is allowed, and the branch does not need to stay clean.
    4. Recover the conclusion. Bring only reusable conclusions back to the main thread and note the basis.
    5. Discard the branch. The main thread keeps a clean context, so later answers are not diluted by constraints.

    The clarification mechanism reduces wrong directions, while the branching mechanism reduces the main thread’s exposure to incorrect information. Together, they lower the cost of each trial. It should be noted that this benefit should be confirmed through actual measurement rather than personal experience alone.

    5. How to Objectively Evaluate Model Performance

    Personal experience is easily affected by sample selection and psychological expectations. If a team wants to compare different models or prompt strategies, it should establish a fixed evaluation set. Evaluation can focus on the following dimensions:

    • Task accuracy: whether the output meets clear acceptance criteria;
    • Instruction following: whether format, length, and constraints are strictly followed;
    • Context consistency: whether earlier constraints are still respected after multiple turns;
    • Factual reliability: whether unsupported claims appear;
    • Latency and cost: whether response time and resource consumption are acceptable;
    • Reproducibility: how much results vary when the same input is run multiple times.

    Evaluation should combine automated checks with blind human review. Tasks that can be automatically verified, such as whether output conforms to a JSON structure or whether code passes unit tests, should be judged by programs first. Tasks that cannot be automatically verified should be scored independently by multiple reviewers who do not know the model source.

    A simple evaluation framework is shown below:

    1. def evaluate(model_fn, cases):
    2. results = []
    3. for case in cases:
    4. output = model_fn(case["prompt"])
    5. passed = case["check"](output)
    6. results.append({"id": case["id"], "passed": passed})
    7. pass_rate = sum(r["passed"] for r in results) / len(results)
    8. return pass_rate, results

    Evaluation samples need to cover real business scenarios and retain some difficult samples. When the sample size is too small, differences in pass rate may be random fluctuations, making conclusions unreliable. After changing a model version or modifying a prompt, the evaluation set should be rerun to observe metric changes.

    6. Implementation Recommendations

    To apply these methods in team workflows, proceed in the following order.

    1. Include the clarification template in the team’s prompt standards and limit trigger conditions to avoid over-asking.
    2. Define a format for branch conclusions, such as three parts: conclusion, basis, and items to verify, to ensure the quality of recovered information.
    3. Build a small evaluation set and record accuracy, compliance, and consistency metrics. Use data to decide which practices are worth promoting.
    4. Review the evaluation set regularly, remove invalid samples, and add newly emerging typical problems.

    The methods themselves are not complex. The key is continuous execution and measurement. Over time, the team’s use of models will shift from relying on personal experience to verifiable and reproducible engineering practices.