Skip to content

Conversation

@Cuiyus
Copy link
Collaborator

@Cuiyus Cuiyus commented Feb 10, 2026

Resolves #43

doc1 = Doc(id="1", fields={"content": "Document 1"})
query_results = {"vector1": [doc1], "vector2": [doc1]}

results = reranker.rerank(query_results)
Can be list[float], list[int], or np.ndarray.
Length should match the implementation's dimension.
"""
...
SparseVectorType: Mapping from dimension index to non-zero weight.
Only dimensions with non-zero values are included.
"""
...
list[Doc]: Re-ranked list of documents (length ≤ ``topn``),
with updated ``score`` fields.
"""
...
"""Test handling of ModelScope import error."""
mock_st = Mock()

def require_module_side_effect(module_name):
@feihongxu0824
Copy link
Collaborator

Add "Resolves #43" to the pull request description to automatically close the issue when this PR is merged.

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.

[Feature]: embedding/rerank module for rag

2 participants