Skip to main content
You can upload a file with metadata to store additional information about the file as key-value pairs.
File metadata can be set only when the file is uploaded. You cannot update metadata after the file is uploaded.
Use file metadata to:

Supported metadata size and format

Pinecone Assistant supports 16 KB of metadata per file.
  • Metadata fields must be key-value pairs in a flat JSON object. Nested JSON objects aren’t supported.
  • Keys must be strings and must not start with a $.
  • Values must be one of the following data types:
    • String
    • Integer (converted to a 64-bit floating point by Pinecone)
    • Floating point
    • Boolean (true, false)
    • List of strings
  • Null metadata values aren’t supported. Instead of setting a key to null, remove the key from the metadata payload.
Examples

Metadata query language

Pinecone’s filtering language supports the following operators: At the top level, list one or more fields (combined with implicit AND) or combine clauses with the logical operators $and and $or. Use $not to negate a clause, as shown in the table. A bare comparison operator (like $gt) can’t appear at the top level. Nest it under a field. A metadata field can hold an array of strings, such as {"genre": ["comedy", "documentary"]}. A filter on that field matches when any value in the array satisfies it, so each of these filters matches:
JSON
These filters don’t match, because the array has no "drama" value and because $ne and $nin exclude an item when any of its values matches:
JSON
A filter value can’t be an array. To match several values, use $in. These filters are invalid and return a 400 error:
JSON