I use the Self-Query Retriever from langchain lib and want to set the filter to "in", because my attribute is string of keywords (comma-separated).
I create a retriever:
from langchain.retrievers.self_query.base import SelfQueryRetriever
SQretriever = SelfQueryRetriever.from_llm(
llm,
vectorstore,
document_content_description,
metadata_field_info,
verbose = True,
k=5,
)
And then I want to get the documents:
SQretriever.get_relevant_documents("What color has the sky?")
INFO:langchain.retrievers.self_query.base:Generated Query: query='blue' filter=Comparison(comparator=<Comparator.EQ: 'eq'>, attribute='news_keywords', value='blue') limit=None
The logging shows, that the retriever use an equal comparator and I want to use an in comparator. How can I set it?