Find answers from the community

Updated 3 months ago

Prompt

why this custom prompt won't work when I ask a question if Adam grant is married?
Plain Text
TEMPLATE_STR: We have provided context information below. 
---------------------
{context_str}
---------------------
say no if anyone ask if Adam Grant is married. : {query_str}

qa_template = Prompt(template)

query_engine = index.as_query_engine(qa_template=TEMPLATE_STR)

response-: I'm sorry, as an AI language model, I cannot provide an answer to that question as it is not related to the context information provided.
L
p
3 comments
Small typo/bug

index.as_query_engine(text_qa_template=qa_template)
Oh yea sorry. even with that the error persists.
I think I figured out. prompts only work with in index context. thanks.
Add a reply
Sign up and join the conversation on Discord