= [    AttributeInfo(        name="genre",        description="The genres of the movie",        type="list[string]",    ),    # If you want to include length of a list, just define it as a new column    # This will teach the LLM to use it as a column when constructing filter.    AttributeInfo(        name="length(genre)",        description="The length of genres of the movie",        type="integer",    ),    # Now you can define a column as timestamp. By simply set the type to timestamp.    AttributeInfo(        name="date",        description="The date the movie was released",        type="timestamp",    ),    AttributeInfo(        name="director",        description="The name of the movie director",        type="string",    ),    AttributeInfo(        name="rating", description="A 1-10 rating for the movie", type="float"    ),]document_content_description = "Brief summary of a movie"llm = OpenAI(temperature=0)retriever = SelfQueryRetriever.from_llm(    llm, vectorstore, document_content_description, metadata_field_info, verbose=True)Testing it out with self-query retriever's existing functionalities‚ÄãAnd now we can try actually using our retriever!# This example only specifies a relevant queryretriever.get_relevant_documents("What are some movies about dinosaurs")# This example only specifies a filterretriever.get_relevant_documents("I want to watch a movie rated higher than 8.5")# This example specifies a query and a filterretriever.get_relevant_documents("Has Greta Gerwig directed any movies about women")# This example specifies a composite filterretriever.get_relevant_documents(    "What's a highly rated (above 8.5) science fiction film?")# This example specifies a query and composite filterretriever.get_relevant_documents(    "What's a movie after 1990 but before 2005 that's all about toys, and preferably is animated")Wait a second... what else?Self-query retriever with MyScale can do more! Let's find out.# You can use length(genres) to do anything you
MyScale is an integrated vector database. You can access your database in SQL and also from here, LangChain.
MyScale is an integrated vector database. You can access your database in SQL and also from here, LangChain. ->: = [    AttributeInfo(        name="genre",        description="The genres of the movie",        type="list[string]",    ),    # If you want to include length of a list, just define it as a new column    # This will teach the LLM to use it as a column when constructing filter.    AttributeInfo(        name="length(genre)",        description="The length of genres of the movie",        type="integer",    ),    # Now you can define a column as timestamp. By simply set the type to timestamp.    AttributeInfo(        name="date",        description="The date the movie was released",        type="timestamp",    ),    AttributeInfo(        name="director",        description="The name of the movie director",        type="string",    ),    AttributeInfo(        name="rating", description="A 1-10 rating for the movie", type="float"    ),]document_content_description = "Brief summary of a movie"llm = OpenAI(temperature=0)retriever = SelfQueryRetriever.from_llm(    llm, vectorstore, document_content_description, metadata_field_info, verbose=True)Testing it out with self-query retriever's existing functionalities‚ÄãAnd now we can try actually using our retriever!# This example only specifies a relevant queryretriever.get_relevant_documents("What are some movies about dinosaurs")# This example only specifies a filterretriever.get_relevant_documents("I want to watch a movie rated higher than 8.5")# This example specifies a query and a filterretriever.get_relevant_documents("Has Greta Gerwig directed any movies about women")# This example specifies a composite filterretriever.get_relevant_documents(    "What's a highly rated (above 8.5) science fiction film?")# This example specifies a query and composite filterretriever.get_relevant_documents(    "What's a movie after 1990 but before 2005 that's all about toys, and preferably is animated")Wait a second... what else?Self-query retriever with MyScale can do more! Let's find out.# You can use length(genres) to do anything you