So, I have created a compression_retriever as such
retriever=db.as_retriever(search_kwargs=search_kwargs)
compressor = LLMChainFilter.from_llm(llm)
compression_retriever = ContextualCompressionRetriever(base_compressor=compressor, base_retriever=retriever)
Here llm used is:
llm = Bedrock(model_id="anthropic.claude-v2", client=bedrock_client)
Now when I am trying to retrieve the relevant documents using 'answer' in this way
compressed_docs = compression_retriever.get_relevant_documents(answer)
I am getting an error saying:
An error occurred BooleanOutputParser expected output value to either be YES or NO
But, with the set the LLM as OpenAI 3.5 it works fine.
I tried going through the documentations but no solution seems to pop up.
This may be a limitation of
anthropic.claude-v2
. Try usinganthropic.claude-v1
instead.