Skip to content

perf(embeddings): speed up and harden index builds - #79

Open
srobinson wants to merge 3 commits into
mainfrom
perf/embedding-indexing
Open

perf(embeddings): speed up and harden index builds#79
srobinson wants to merge 3 commits into
mainfrom
perf/embedding-indexing

Conversation

@srobinson

@srobinson srobinson commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Reuse unchanged semantic vectors during structural force refreshes and add --force-embed for explicit full semantic rebuilds.
  • Run embedding requests with configurable bounded concurrency, retries, delays, and timeouts.
  • Split sections above the OpenAI input limit into token safe inputs, preserve document and heading context, then pool them into one normalized section vector.
  • Keep each request below the aggregate token limit and report the affected document and heading when chunking occurs.
  • Update the API enabled semantic integration fixtures to use the current generation session contract.
  • Include the requested agent coordination additions in LESSONS.md.

Test plan

  • just test: 99 files passed, 1,778 tests passed, 11 skipped
  • pnpm typecheck
  • pnpm build
  • 50 focused CLI, config, batching, token, persistence, and manifest tests
  • Oversized section integration test confirms every API input stays within 8,000 tokens and one vector is stored
  • Production run embedded 6,072 sections in 29.7 seconds with no input length failure
  • Installed CLI exposes mdm index --force-embed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant