Choose a narrow task
Define which questions the chatbot should answer, which sources it may use, and when it should decline or hand off.
Design complete conversation states
Generate the initial, streaming, stopped, error, retry, and citation states together so the interface remains understandable under real network conditions.
Connect the model safely
Keep provider credentials on the server, validate uploaded material, and avoid sending personal data that the workflow does not need.
