The answer prompt puts the four retrieved chunks inside the system message, before the chat history.
The chunks change on every question, so from the second question on the provider cannot reuse any of the earlier conversation and recomputes the whole history on every answer call.
- What to change
- Keep the system message fixed (the instructions only) and send the retrieved context with the newest question, after the history: for example a last user message 'Context: <context>...</context> Question: {input}'.
- Why it matters
- Together caches the longest identical prefix automatically, and its prompt-caching page says to put retrieved snippets at the end. Here the first difference is about 90 tokens in, so every follow-up answer prefills all earlier questions and answers again.
- Estimate
- about 360k prompt tokens per 1,000 calls not served from cache (estimate)
What the estimate assumes
4-question conversations, answers of about 400 tokens, 4 chunks of 1,000 characters (about 1,000 tokens); 7 calls per conversation (4 answers, 3 rephrase calls). Together's minimum cacheable prefix is not published. Qwen/Qwen3.5-9B has no cached-input price on Together (serverless models page, checked 2026-11-27), so on today's model the saving is prefill time, not money.