# Build Standalone Query

**Purpose**: Converts a query that depends on conversation history into a standalone, context-independent query suitable for retrieval.

**Pipeline Stage**: Preprocessing

**When Called**:

* ✓ Conversation history exists
* ✓ Combined history + query < 32,000 characters (context limit check)
* If conditions not met: Uses `query_with_history` directly as standalone query

**Input/Output Example**:

````
**History:**
"What are the deployment process for the staging environment for SERVICE_NAME?"

**User Input:**
"What are the specific steps?"

**Output:**
```json
{{
  "transformed_query": "What are the specific steps to deploy the SERVICE_NAME in the staging environment?"
}}
```
````

**Configuration:**

```json
{
  "model": "gpt-5-nano",
  "prompt_builder_type": "prompt_builder",
  "output_parser_type": "none",
  "model_kwargs": {
    "response_schema": {
      "type": "object",
      "properties": {
        "transformed_query": {
          "type": "string",
          "title": "Transformed Query"
        }
      },
      "required": ["transformed_query"]
    },
    "default_hyperparameters": {
      "reasoning": {
        "effort": "minimal"
      }
    },
    "retry_config": {
      "timeout": 300,
      "max_retries": 2
    }
  }
}
```
