Find answers from the community

Updated 11 months ago

Retriever

Hi Is there any complete doc regarding structural hierarchical retriever? Is it mandatory to have meta data filters? any document regarding metadata filter would be useful.

testing the example from llama index

wiki_titles = ["Michael Jordan", "Elon Musk", "Richard Branson", "Rihanna"]
wiki_metadatas = {
"Michael Jordan": {
"category": "Sports",
"country": "United States",
},
"Elon Musk": {
"category": "Business",
"country": "United States",
},
"Richard Branson": {
"category": "Business",
"country": "UK",
},
"Rihanna": {
"category": "Music",
"country": "Barbados",
},
}
....................

vector_store_info = VectorStoreInfo(
content_info="brief biography of celebrities",
metadata_info=[
MetadataInfo(
name="category",
type="str",
description=(
"Category of the celebrity, one of [Sports, Entertainment,"
" Business, Music]"
),
),
MetadataInfo(
name="country",
type="str",
description=(
"Country of the celebrity, one of [United States, Barbados,"
" Portugal]"
),
),
],
)

in the above case if I didnt specify any metadata filter , will it used for the retriever or not ,please clarify.

Thanks
L
1 comment
It's not mandatory. The auto retriever just uses the vector store info to try and write filters in the fly for you.
Add a reply
Sign up and join the conversation on Discord