Skip to content

perf: reuse query embeddings in hierarchical retriever#93

Merged
qin-ctx merged 1 commit intovolcengine:mainfrom
mildred522:main
Feb 9, 2026
Merged

perf: reuse query embeddings in hierarchical retriever#93
qin-ctx merged 1 commit intovolcengine:mainfrom
mildred522:main

Conversation

@mildred522
Copy link
Contributor

@mildred522 mildred522 commented Feb 7, 2026

Description

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Test update

Changes Made

  • Preserve existing retrieval logic and output ordering.

  • I have added tests that prove my fix is effective or that my feature works

  • New and existing unit tests pass locally with my changes

  • I have tested this on the following platforms:

    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes

  • Micro-benchmark (200 runs, fake embedder with 5ms sleep):
    • embed calls per retrieve: 2.0 → 1.0
    • avg per-call time: ~10.93ms → ~5.45ms (~50% reduction)
      This indicates the expected latency/cost improvement from eliminating duplicate embeddings.

———

@CLAassistant
Copy link

CLAassistant commented Feb 7, 2026

CLA assistant check
All committers have signed the CLA.


final_metadata_filter = {"op": "and", "conds": filters_to_merge}

if not await self.storage.collection_exists(collection):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

内部默认都是 colleciton 是 context,不过这里检验下也没问题

@qin-ctx
Copy link
Collaborator

qin-ctx commented Feb 9, 2026

good job

@qin-ctx qin-ctx merged commit f555d6a into volcengine:main Feb 9, 2026
1 check passed
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.

3 participants