FasterDecoding / SnapKV

200 stars 8 forks source link

What prompt was used in Needle in a Haystack test? #14

Closed 66RING closed 4 months ago

66RING commented 5 months ago

I try to reproduce needle test with LWM-Text-Chat-1M but the model just refuse to answer. I have tried following prompts in Needle test and the model just generate </s>

<s>[INST] <<SYS>>
You are a helpful AI bot that answers questions for a user. Keep your response short and direct
<</SYS>>
{ context }

{retrieval_question} Don't give information outside the document or repeat your findings
[/INST]

and

<s>[INST] <<SYS>>
You are a helpful AI bot that answers questions for a user. Keep your response short and direct
<</SYS>>
{ context }

{retrieval_question} Don't give information outside the document or repeat your findings
[/INST]</s>
WendyH1108 commented 4 months ago

We used the same evaluation code as https://github.com/FranxYao/Long-Context-Data-Engineering/blob/main/eval/needle/needle_in_haystack.py

return [ { "role": "system", "content": "You are a helpful AI bot that answers questions for a user. Keep your response short and direct" }, { "role": "user", "content": context }, { "role": "user", "content": f"{self.retrieval_question} Don't give information outside the document or repeat your findings. The document definitely contains the answer, and I'm 100% sure. So try your best to find it." }, { "role": "assistant", "content":"", },