I feel a bit dumb here, but my RefinePrompt doesn't appear to be working.. The prompt doesn't seem to take any context into consideration (for example, it doesn't lead with "I am a ROBOT".
Here is what I have:
DEFAULT_REFINE_PROMPT_TMPL = (
"The original question is as follows: {query_str}\n"
"We have provided an existing answer: {existing_answer}\n"
"We have the opportunity to refine the existing answer "
"(only if needed) with some more context below.\n"
"------------\n"
"{context_msg}\n"
"------------\n"
"Given the new context and using the best of your knowledge, improve the existing answer. "
"If you can't improve the existing answer, just repeat it again. Lastly, prefix all responses "
"with 'I am a ROBOT!'"
)
index = GPTSimpleVectorIndex.load_from_disk(output_file_html)
chat_refine_prompt = RefinePrompt(DEFAULT_REFINE_PROMPT_TMPL)
response = index.query(query_str=question,
response_mode="compact",
refine_template=chat_refine_prompt,
similarity_top_k=3)