Find answers from the community

Updated 3 months ago

Metadata

hey , ,
while using Pinecone auto-retriever for
1> assigning multiple tags per category
eg
Plain Text
from llama_index.data_structs.node import Node

nodes = [
    Node("Michael Jordan is a retired professional basketball player, widely regarded as one of the greatest basketball players of all time.", extra_info={
        "category": ["Sports", "Entertainment"],
        "country": "United States",
    })

we get error ValueError: Value must be one of (str, int, float, None)

2> incase a query is "Tell me about two sport persons and business men from United States"
even through gpt gives the response
Plain Text
{"query": "sport persons business men", "filters": [{"key": "category", "value": "Sports"}, {"key": "category", "value": "Business"}, {"key": "country", "value": "United States"}], "top_k": 2}

but auto-retriever only uses one value per category.
Plain Text
Using filters: {'category': 'Business', 'country': 'United States'} #here sport was not used


can you please confim if this is a bug?
L
1 comment
Not quite a bug. Our metadata has a restriction to be a flat values, in order to ensure its supported across multiple vector DBs

This mean each key/value pair in the metadata should be a single value (I.e. float, int, or str)

We could reconsider how this is supported I suppose, it just adds a lot of development load to support different metadata restrictions on a per db basis
Add a reply
Sign up and join the conversation on Discord