Upserting and querying in .NET
When you’ve created an index, you’ll be able to rapidly add new values. Pinecone calls this course of “upserts.” Right here you’ll load the vectors created by an embedding, first offering a batch of IDs, after which the dense and sparse vectors, and at last acceptable metadata (which may embrace the unique textual content of the supply doc). This final choice permits you to prefilter knowledge when making a question. Different instructions within the SDK assist handle your vector index: deleting, updating, and itemizing vectors.
Should you’re constructing an index for a RAG software, you must first chunk your paperwork, so every embedding solely encodes a piece of textual content. This could then be included within the upsert as a part of the metadata,
An important a part of constructing the search element of a RAG software is, in fact, querying your vector index. As a part of organising an index, you’ve already outlined the space metric used to pick out related paperwork. The kind of metric is determined by the kind of outcomes you need to return. For many RAG functions you most likely need to select a cosine metric, as this finds paperwork which might be just like your question time period.