Ensemble Retriever giving me a float error #30210
Replies: 2 comments 2 replies
-
Hey @Keith-Ho! 👋 I'm here to help you with bug fixes, answer questions, and guide you on your journey to becoming a contributor. The error you're encountering with the To resolve this issue, ensure that the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
Setting k as 50 solved this for me |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Code:
self.vector_store = AzureSearch(azure_search_endpoint=self.endpoint, azure_search_key=self.key, index_name=self.index_name, embedding_function=self.embedding_function, semantic_configuration_name="my-semantic-config)
retriever = self.vector_store.as_retriever(search_type="semantic_hybrid", k=k, semantic_configuration_name="my-semantic-config")
retriever = EnsembleRetriever(retrievers=[retriever])
qa_prompt = ChatPromptTemplate.from_messages([("system", self.prompt), MessagesPlaceHolder("chat_history), ("human", "{input}")])
question_answer_chain = create_stuff_documents_chain(self.llm, qa_prompt)
rag_chain = create_retrieval_chain(retriever, question_answer_chain)
result = rag_chain.invoke({"input"}: question, "chat_history":chat_history
Error:
float() argument must be a string or a real number, not 'NoneType'
Description:
I'm having trouble understanding where this error is coming from. When I don't use the EnsembleRetriever, I have no issues with retrieving an answer from the result. However, when I add it into an EnsembleRetriever, it gives me this error. I have to use the EnsembleRetriever because I'm combining more than one index.
Beta Was this translation helpful? Give feedback.
All reactions