Skip to content

feat: add hybrid retrieval API#76

Merged
dcfocus merged 1 commit into
lance-format:mainfrom
dcfocus:codex/hybrid-retrieval-api-72
Jun 12, 2026
Merged

feat: add hybrid retrieval API#76
dcfocus merged 1 commit into
lance-format:mainfrom
dcfocus:codex/hybrid-retrieval-api-72

Conversation

@dcfocus

@dcfocus dcfocus commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a retrieve API that combines optional text and vector channels over existing context records.
  • Fuse candidate ranks with RRF and return ranking diagnostics: score, vector_distance, text_score, and matched_channels.
  • Expose retrieval through Python, Rust DTOs, remote client, and /api/v1/contexts/{name}/retrieve, while preserving existing vector-only search.
  • Move filter JSON parsing into core so Python and REST retrieval share the same metadata/lifecycle filter semantics.

Refs #72.

Testing

  • cargo-fmt --all -- --check
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • ruff format --check --no-cache python
  • ruff check --no-cache python
  • pyright
  • pytest python/tests/test_search.py python/tests/test_persistence.py::test_retrieve_fuses_text_vector_and_filters python/tests/test_persistence.py::test_retrieve_supports_text_only python/tests/test_async.py::test_retrieve
  • pytest python/tests -k "not s3"

Notes

  • Full pytest python/tests was also attempted; only the existing moto/S3 persistence tests failed locally with Bucket ... not found, while the non-S3 suite passed.
  • The bundled .codex/skills/ci-pr-helper/scripts/run_ci_checks.sh currently points to rust/lance-context/Cargo.toml, which does not exist in this repo layout, so I ran the equivalent current-layout checks directly.

@dcfocus dcfocus merged commit 1efb7a1 into lance-format:main Jun 12, 2026
13 of 14 checks 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.

1 participant