The default chat engine is an agent.
The qa/refine prompts are in the query engine.
The agent decides whether or not to use the query engine based on the chat history and list of tools + descriptions.
You might get better performance by tweaking things from a lower level and skipping
as_chat_engine()
(which hides too many details/parameters imo)
https://docs.llamaindex.ai/en/stable/examples/agent/openai_agent_with_query_engine.html