Spaces:
Running
Running
put task instruction at the end
Browse filesmove the "system" prompt with the task instructions to the end, as the model appears to forget the instructions otherwise
rag.py
CHANGED
@@ -44,7 +44,7 @@ class RAG:
|
|
44 |
|
45 |
#sys_prompt = "You are a helpful assistant. Answer the question using only the context you are provided with. If it is not possible to do it with the context, just say 'I can't answer'. <|endoftext|>"
|
46 |
#query = f"Context:\n{context}\n\nQuestion:\n{instruction}"
|
47 |
-
query = f"{
|
48 |
print(query)
|
49 |
#query = f"{sys_prompt}\n\nQuestion:\n{instruction}\n\nContext:\n{context}"
|
50 |
chat_completion = client.chat.completions.create(
|
|
|
44 |
|
45 |
#sys_prompt = "You are a helpful assistant. Answer the question using only the context you are provided with. If it is not possible to do it with the context, just say 'I can't answer'. <|endoftext|>"
|
46 |
#query = f"Context:\n{context}\n\nQuestion:\n{instruction}"
|
47 |
+
query = f"Context:\n{context}\n\nQuestion:\n{instruction}\n\n{sys_prompt}"
|
48 |
print(query)
|
49 |
#query = f"{sys_prompt}\n\nQuestion:\n{instruction}\n\nContext:\n{context}"
|
50 |
chat_completion = client.chat.completions.create(
|