Question 1 · choose 1
A web app talks to a prompt agent in Foundry Agent Service. Users ask follow-up questions such as "and the second one?", so the agent must see earlier turns. The app wants the service to keep the history rather than resend it. What should the app do?
- AAdd the earlier turns to the agent's instructions after each reply
- BSend all earlier messages in every request and start a new conversation
- CCreate a conversation and pass its ID with every request to the agent
- DSend each follow-up with a new conversation ID
Show the answer and why
AAdd the earlier turns to the agent's instructions after each reply
Incorrect
Instructions define the agent for all users; rewriting them per chat would mix users' histories.
BSend all earlier messages in every request and start a new conversation
Incorrect
That works but is the resending the app wants to avoid, and it grows token use every turn.
CCreate a conversation and pass its ID with every request to the agent
Correct
A conversation keeps the history of turns, so each request only adds the new user message.
DSend each follow-up with a new conversation ID
Incorrect
A new conversation starts without the earlier turns, so follow-ups lose their context.
Conversation state is the turn-by-turn history of a chat: create a conversation once and reference it on each turn instead of resending history.
Microsoft documentation