Skip to content

feat: support jina rerank for text & image#62

Merged
kemingy merged 2 commits into
tensorchord:mainfrom
kemingy:jina_rerank
Aug 6, 2025
Merged

feat: support jina rerank for text & image#62
kemingy merged 2 commits into
tensorchord:mainfrom
kemingy:jina_rerank

Conversation

@kemingy

@kemingy kemingy commented Aug 6, 2025

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Keming <kemingyang@tensorchord.ai>
@kemingy kemingy requested a review from Copilot August 6, 2025 09:53

This comment was marked as outdated.

Signed-off-by: Keming <kemingyang@tensorchord.ai>
@kemingy kemingy requested a review from Copilot August 6, 2025 09:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Jina rerank functionality for both text and image documents. It introduces a new JinaReranker class that can handle multimodal reranking and extends the existing rerank infrastructure to support both text-only and multimodal reranking scenarios.

  • Added Jina rerank provider with support for text and image document types
  • Extended the base reranker interface to include multimodal reranking capabilities
  • Updated pipeline to handle multimodal reranking when multimodal embeddings are configured

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vechord/utils.py Added rate limit constant for Jina rerank API
vechord/rerank.py Added abstract multimodal rerank method and JinaReranker implementation
vechord/provider.py Added JinaRerankProvider class and removed docstring comments
vechord/pipeline.py Updated pipeline to support multimodal reranking and removed some validation
vechord/model/jina.py Added Jina rerank request/response models with multimodal support
vechord/model/init.py Exported new Jina rerank model classes
Comments suppressed due to low confidence (1)

vechord/rerank.py:102

  • The model parameter is required in from_query_docs but has a default value in the JinaReranker constructor. This could cause confusion as the method signature doesn't match the expected usage pattern.
    def fuse(self, retrieved_chunks: list[list[T]]) -> list[T]:

Comment thread vechord/model/jina.py
Comment thread vechord/pipeline.py
Comment thread vechord/model/jina.py
@kemingy kemingy merged commit 28a7cbd into tensorchord:main Aug 6, 2025
7 checks passed
@kemingy kemingy deleted the jina_rerank branch August 6, 2025 10:02
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.

2 participants