Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Rerank with an empty documents array or object documents fails with an internal tokenizer error

オープン
#4,671 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@Daksha1611 がすでに取り組んでいます。

2026年10月19日 から。

  • #4672 @Daksha1611 による — オープン

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
24/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
backend

調査の方向性

Read rerank_calculator_ov.cc where the calculator reads getDocumentsList() and calls the tokenizer, then inspect rerank_handler_test.cpp for how empty and object documents are parsed. Reproduce the request with a rerank model and trace how the empty list reaches tokenization. Done means these inputs return a clear 400 response instead of an internal tokenizer error; the report notes a rerank model is needed for end-to-end verification.

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

RerankHandler::parseRequest() accepts "documents": [] and documents given as {"title", "text"}
objects. The rerank calculator only reads getDocumentsList() (rerank_calculator_ov.cc), which is
empty in both cases: object documents are parsed into documentsMap, which is not used yet (the docs
list dictionary documents as unsupported, and parseResponse has a TODO for the map). The
calculator then calls the tokenizer with an empty list.

With a real Qwen3 tokenizer, encode() of an empty list throws:

Exception from src/inference/src/cpp/infer_request.cpp:224:
Exception from src/plugins/intel_cpu/src/graph.cpp:1626:
Node SpecialTokensSplit_122229 of type Reference
basic_string::_M_create

The calculator catches the exception and returns its message as an internal error, so the client
gets an opaque 500 instead of a message saying the documents are not supported or are missing.

Two documents given as objects with the same title also collapse into one, because the map is keyed
by title.

I checked the parsing and the tokenizer call separately; I did not run the calculator end to end,
since that needs a rerank model.

To Reproduce

curl http://localhost:8000/v3/rerank -H "Content-Type: application/json" \
  -d '{"model": "<rerank model>", "query": "hello", "documents": []}'

The same with "documents": [{"title": "a", "text": "Welcome"}].

Expected behavior

A 400 that says what is wrong: "documents array should not be empty" or "documents given as objects
are not supported, use an array of strings".

Logs

The tokenizer exception above.

Configuration

  1. OVMS version: main @ eec7daac
  2. rerank servable
  3. N/A
  4. N/A
  5. N/A

Additional context

The existing tests deliberately expect object documents to parse into the map
(rerank_handler_test.cpp), so I left the parser alone and checked after it.

I have a patch with tests and will open a PR.

主要言語
C++
スター
947
フォーク
280
平均マージ
3日 14時間
マージ済み PR(30日)
46

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openvinotoolkit/model_server のほかの issue

openvinotoolkit/model_server の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。