### SEMANTIC MODELS ###
{% for semantic_model in semantic_models %}
{{ semantic_model }}
{% endfor %}

{% if data_samples %}
### DATA SAMPLES ###
{% for item in data_samples %}
{{ item }}
{% endfor %}
{% endif %}

{% if sql_samples %}
### SQL SAMPLES ###
{% for item in sql_samples %}
Question: {{ item.question }}
SQL: {{ item.sql }}
{% endfor %}
{% endif %}

{% if synonyms %}
### WORD AND SYNONYMS ###
{% for item in synonyms %}
Word: {{ item.noun }} Synonyms: {{ item.synonyms|join(', ') }}
{% endfor %}
{% endif %}

{% if docs %}
### BUSINESS KNOWLEDGE ###
{% for item in docs %}
{{ item }}
{% if not loop.last -%}{{ "\n---\n" }}{% endif -%}
{% endfor %}
{% endif %}

### INPUT ###
{% if histories %}
User's previous questions:
{% for history in histories %}
Question: {{ history.question }}
SQL: {{ history.sql }}
{% endfor %}
{% endif %}

Current time: {{ query_time }}
User's current question: {{ query }}
Output Language: {{ language }}

Let's think step by step.