Repository navigation
[context] Store context messages in rollouts - #2243
Conversation
|
|
||
| // Always record an initial environment context snapshot. | ||
| let ec_msg: ResponseItem = EnvironmentContext::from(sess_arc.as_ref()).into(); | ||
| sess_arc.record_conversation_items(&[ec_msg]).await; |
There was a problem hiding this comment.
Intentionally changing the order here, since we are no currently planning on re-reading user_instructions, but are planning on sending multiple environment_context messages. I don't think it's material, but noting for posterity
|
Summary Notable changes
Review
|
2f76c1f to
12dd2ee
Compare
12dd2ee to
56ce1cd
Compare
56ce1cd to
1dca123
Compare
e5a5c9b to
1cd3eb0
Compare
| .history | ||
| .record_items(&[Prompt::format_user_instructions_message(&user_instructions)]); | ||
| } | ||
| state |
There was a problem hiding this comment.
Don't we want to store it in a more structured way so it's easier to parse?
There was a problem hiding this comment.
That is handled by #2272! They are independent and this change is more urgent
| sess.get_sandbox_policy().clone(), | ||
| ))]) | ||
| .await; | ||
|
|
There was a problem hiding this comment.
@bolinfest is this the preferred spot where we'd like to add this? I know we also have #2305
There was a problem hiding this comment.
At a minimum, we should combine this into one call to record_conversation_items() so we only have one lock/await. I will try to fix this in #2305.
Summary
Currently, we use request-time logic to determine the user_instructions and environment_context messages. This means that neither of these values can change over time as conversations go on. We want to add in additional details here, so we're migrating these to save these messages to the rollout file instead. This is simpler for the client, and allows us to append additional environment_context messages to each turn if we want
Testing