quivr
quivr copied to clipboard
Prompt word invalid
When i use verbose mode,the logs:
Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer.
....
Question: ....
Helpful Answer:
My prompt doesn't include at the end
, maybe the prompt in LANGUAGE_PROMPT.py doesn't override the default prompt in Langchain.
My prompt: Use the following pieces of context to answer the question in Chinese. If you don't know the answer, just say that you don't know, don't try to make up an answer.
How can i solve it? Or it's because I didn't use it correctly?
#Try this backend/llm/qa.py
from llm import LANGUAGE_PROMPT from llm.LANGUAGE_PROMPT import CONDENSE_QUESTION_PROMPT, QA_PROMPT
ChatOpenAI( model_name=chat_message.model, openai_api_key=openai_api_key, temperature=chat_message.temperature, max_tokens=chat_message.max_tokens), vector_store.as_retriever(), memory=memory, verbose=True, max_tokens_limit=1024, combine_docs_chain_kwargs={'prompt': QA_PROMPT}, condense_question_prompt=CONDENSE_QUESTION_PROMPT)
@whoaisk That solution seems to have worked for me. Thank you so much!
@canw1nter did it not work for you?
@whoaisk That solution seems to have worked for me. Thank you so much!
@canw1nter did it not work for you?
it's worked, thank you!