[BFCL] How Should We Phrase the System Prompt for Multi-Turn Category Models? #664
Closed
HuanzhiMao
started this conversation in
General
Replies: 1 comment
-
Completed in #725 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In BFCL, our inference pipeline for multi-turn categories operates as follows: as long as the model outputs function calls that can be decoded by the
decod_exec
method, those functions are executed, the results are returned to the model and the turn continues. If the model ceases to output function calls, or if the output can't be decoded properly, we interpret this as the end of the current turn and move to the next one. Importantly, regardless of the model's response in the previous turn, the next turn is always initiated with the same user prompt (due to fixed dataset entries).In the intended strategy, if the model asks clarification questions, we interpret this as the end of a turn—even though the model may not intend for that to happen. While we've aimed to reduce ambiguity in prompts to avoid the need for clarification questions, we also don't want to penalize the model for being cautious or thorough.
Possible Solutions
Introduce an LLM in the Loop: One approach could be to have a secondary LLM generate real-time user responses based on the current system state and the model's response (essentially having an LLM perform Q&A to address clarification questions). However, this isn't ideal since it could lead to non-deterministic outcomes and could be challenging to implement.
Modify the System Prompt: Alternatively, we could explicitly state in the system prompt that clarification questions will be treated as no function call/end of turn. We think this might be the best approach for now. However, the downside is that this might cause the model to perform poorly in irrelevant scenarios, as it may try to produce a function call prematurely (even if it's just guessing), thinking it won't have another chance to ask for clarifications.
What Are Your Thoughts?
We'd love to hear your opinions on how best to phrase the system prompt or any alternative solutions you might have. Thanks for your input!
Beta Was this translation helpful? Give feedback.
All reactions