Adding metadata to a whole-file upload

Beginner question here. I’m moving from Pinecone to Vectara because Vectara is a better fit for my company.

When using Pinecone via Langchain I could send metadata with every chunk extracted from a document, say, a PDF. This, of course, required me to do the embedding myself, which was standard practice for vector stores until I found Vectara.

Of course, Vectara has built-in embedding. Is it possible to send the metadata for a whole PDF and have Vectara attach that metadata to every chunk it creates from the PDF? If that’s not possible and I have to do the same as I was doing with Pinecone, I lose the advantage that Vectara offers with its built-in embedding.

It is! The way you can add additional metadata via the file upload API is to use the doc_metadata field. We have an example on the docs here if you search for doc_metadata. This gets attached to the document metadata as opposed to the section metadata (both/either can have their own)

2 Likes