Retrieving "Adjacent" Chunks for Better Context

In my RAG application I use Flowise to upsert a text file which is then chunked into documents of fixed chunk size. The embeddings for these chunks are stored in my Pinecone serverless index. I ask a question via Flowise, which sends the question’s embeddings to Pinecone as a query. Pinecone retrieves the text chunk with the closest vector similarity to my question. All good. But how can I then query the Pinecone index to also retrieve the two text chunks which are located before and after that chunk in the original file? The idea is to use small chunks in the VDB for precision, but to bring (selectably) wider context back into the LLM for better reasoning.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.