Supported file types
Pinecone Assistant supports the following file types:- DOCX (.docx)
- JSON (.json)
- Markdown (.md)
- PDF (.pdf)
- Text (.txt)
For PDF files, assistants support multimodal context, allowing them to analyze and gather context from images. This feature is in public preview.
File storage
Files are uploaded to Google Cloud Storage (us-central1
region) and to your organization’s Pinecone vector database. The assistant processes the files, so data is not sent outside of blob storage or Pinecone.
Some API responses include a signed_url
field, which provides temporary, read-only access to one of the assistant’s files. The URL is signed and hard to guess, but publicly accessible, so treat it as sensitive. signed_url
links expire in one hour.
File metadata
You can upload a file with metadata, which allows you 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.
- Filtering chat responses: Specify filters on assistant responses so only files that match the metadata filter are referenced in the response. Chat requests without metadata filters do not consider metadata.
- Viewing a filtered list of files: Use metadata filters to list files in an assistant that match specific criteria.
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 are not 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.
Metadata query language
Pinecone’s filtering language supports the following operators:Operator | Function | Supported types |
---|---|---|
$eq | Matches with metadata values that are equal to a specified value. Example: {"genre": {"$eq": "documentary"}} | Number, string, boolean |
$ne | Matches with metadata values that are not equal to a specified value. Example: {"genre": {"$ne": "drama"}} | Number, string, boolean |
$gt | Matches with metadata values that are greater than a specified value. Example: {"year": {"$gt": 2019}} | Number |
$gte | Matches with metadata values that are greater than or equal to a specified value. Example:{"year": {"$gte": 2020}} | Number |
$lt | Matches with metadata values that are less than a specified value. Example: {"year": {"$lt": 2020}} | Number |
$lte | Matches with metadata values that are less than or equal to a specified value. Example: {"year": {"$lte": 2020}} | Number |
$in | Matches with metadata values that are in a specified array. Example: {"genre": {"$in": ["comedy", "documentary"]}} | String, number |
$nin | Matches with metadata values that are not in a specified array. Example: {"genre": {"$nin": ["comedy", "documentary"]}} | String, number |
$exists | Matches with the specified metadata field. Example: {"genre": {"$exists": true}} | Number, string, boolean |
$and | Joins query clauses with a logical AND . Example: {"$and": [{"genre": {"$eq": "drama"}}, {"year": {"$gte": 2020}}]} | - |
$or | Joins query clauses with a logical OR . Example: {"$or": [{"genre": {"$eq": "drama"}}, {"year": {"$gte": 2020}}]} | - |
Only
$and
and $or
are allowed at the top level of the query expression."genre"
metadata field with a list of strings:
JSON
"genre"
takes on both values, and requests with the following filters will match:
JSON
JSON
JSON
JSON