feat: support deferred embedding via update/RecordPatch (#88)#93
Open
dcfocus wants to merge 1 commit into
Open
feat: support deferred embedding via update/RecordPatch (#88)#93dcfocus wants to merge 1 commit into
dcfocus wants to merge 1 commit into
Conversation
) Append raw records first and enrich them with embeddings later. Adds an `embedding` field to the record patch path so a vector can be attached or replaced by id or external_id after the original write. - core: RecordPatch.embedding, applied in update_visible_record - api: RecordPatchDto.embedding; copied in core + server patch_from_dto - python: embedding param on PyO3 update and Context.update() - Rust client inherits the field via the UpdateRecordRequest JSON body A record without an embedding is durably stored but excluded from vector search until enriched, since search skips null-embedding records. Tests: Rust core round-trip (by id + external_id) and Python e2e (raw-first -> enrich, incl. add_many bulk). README documents the pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Lets callers append raw records first and enrich them with embeddings later — the common pattern for bulk ingestion where source chunks must be persisted immediately but embeddings are computed asynchronously (large documents, rate-limited or remote embedding providers).
Adds an
embeddingfield to the record patch path so a vector can be attached or replaced byidorexternal_idafter the original write. A record without an embedding is durably stored but excluded from vector search until enriched (searchskips null-embedding records).Closes #88.
What changed
RecordPatch.embedding, applied inupdate_visible_record.RecordPatchDto.embedding; copied through in both the core and serverpatch_from_dto.embeddingparameter on the PyO3updateandContext.update().UpdateRecordRequestJSON body.Tests
idand byexternal_id).add_manybulk ingestion.🤖 Generated with Claude Code