Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When should we set example_prefix to be True? And what is the difference between put ICL examples into system prompt versus multi-turn user-assistant chat? #49

Open
peter-peng-w opened this issue Mar 25, 2024 · 1 comment

Comments

@peter-peng-w
Copy link

peter-peng-w commented Mar 25, 2024

I understand that example_prefix is used during ICL so that we can put examples into the system prompt, especially when we are using GPT-4. However, I have several questions regarding this feature:

  1. What is the difference between putting ICL examples into system prompts versus putting them into multi-turn conversations between user and assistant after system prompt?
  2. Is it recommend only for GPT-4 or both GPT-4 and GPT-3.5? I found there are some discussion regarding the difference between GPT-4 and GPT-3.5 when they are taking system prompt with different name attributes, what is the suggestion from the authors regarding this issue?
  3. If my understanding is correct, when using open source models such as Llama-2, we shouldn't set example_prefix to be true as this will cause some issues with the prompt. To be more concrete, when calling the HFChat class in the src/dt/chat.py at line 395, if we are using example_prefix, we will construct multiple system prompts (2 for each ICL example, with name of example_user and example_assistant). However, at line 395, the implementation seems to overlap previous system prompt with the latest system prompt (i.e., conv.system) rather than concatenate multiple system prompts together, which will cause issue when loading multiple system prompts.

Please help me verify my understandings here. Thanks!

@danielz02
Copy link
Member

Thanks for reaching out! This understanding is largely correct. We will move away from using example_prefix when evaluating open-source models

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants