LangChain's Pinecone upsert speed increased by 5X
Sep 12, 2023Zachary Proser
Summary
This post details performance improvements in the LangChain Python client for upserting data to Pinecone. Key changes include leveraging asynchronous calls for batch processing, introducing `embeddings_chunk_size` to optimize time spent waiting on embedding models, and consolidating `from_texts` and `add_texts` methods for consistent performance. The default `pool_threads` for asynchronous requests has been set to 4, and a default `embedding_chunk_size` of 1000 is now passed to relevant methods.