Conversation
andresmor-ms
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the document loading process for several vector store backends to support batch operations, improving efficiency and consistency. The main change replaces the single-document
insertmethod with a batch-orientedload_documentsmethod across all relevant classes, and updates the embedding operation and its tests to use this new batching logic.Batch document loading refactor:
insertmethod with aload_documentsmethod inazure_ai_search.py,cosmosdb.py, andlancedb.py, enabling batch uploads for Azure AI Search and LanceDB, and iterative uploads for CosmosDB [1] [2] [3].vector_store.pyto defineload_documentsas the primary method for document insertion, withinsertnow delegating to it for single documents.Embedding operation and test updates:
embed_text.pyto flush the buffer when it exceedsbatch_size * 4instead of justbatch_size, increasing batch efficiency [1] [2].test_embed_text.pyto reflect the new batching behavior, verifying that documents are processed in larger batches and adjusting assertions accordingly [1] [2] [3].