Skip to content

ConversationalRetrievalQAChain answering general questions #1120

Answered by markusobermaier96
jteso asked this question in Q&A
Discussion options

You must be logged in to vote

I think the right way to do it is to define a custom qaTemplate like so:

const QA_PROMPT = PromptTemplate.fromTemplate(
`You are an AI assistant providing helpful advice. You are given the following extracted parts of a long document and a question. Provide a conversational answer based on the context provided.
You should only provide hyperlinks that reference the context below. Do NOT make up hyperlinks.
If you can't find the answer in the context below, just say "The document does not provide information to answer your question." Don't try to make up an answer.
If the question is not related to the context, politely respond that you are tuned to only answer questions that are related to…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jteso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants