Run the fine-tuned generative models through GenerativeDetector
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Start by reading parent issue #126 and the blocked issues #127, #140, #144, and #156, then inspect the existing LLMJudgeDetector and LLMDetector implementations and their contract tests. Implement GenerativeDetector against the listed acceptance criteria, including cache, verification, concurrency, and the LLMDetector native path. Done means the detector contract suite and existing tests pass and the golden fixtures match.
索引モデルが issue の本文から書いたものです。
説明
Parent
#126
Branch
Branch from stateless_core and open the pull request against it, not main. Close this ticket by hand once its pull request merges there: GitHub only closes issues automatically on merges into main.
What to build
A service developer serves the fine-tuned generative detectors through an OpenAI-compatible client with GenerativeDetector(client, model_id) and gets Detection results with typed spans. The detector is chosen by the class the caller builds (or by load_detector later), not by looking for substrings in the model name. Failures are visible in the same way as for the judge: an unparseable reply raises UpstreamError, and a degraded step says so in warnings.
The native path of LLMDetector delegates to GenerativeDetector from this task on.
Acceptance criteria
-
GenerativeDetector(client, model_id, *, config=None, cache=None, model_version=None)builds no client, reads no environment variable and writes no file (apart from acachethe caller passed). -
GenerativeConfighas the fields and defaults in the epic, and has nozero_shot,fewshot_pathorprompt_path: passing one raisesConfigurationError(invalid_config) with itsparam. An unknown language raises it withinvalid_language. -
detectandadetectaccept aSourcesInputand aPromptInput, use the frozen generative prompt, and return typed spans:categoryandsubcategoryfrom the reply, andreasoningfrom the reply'sexplanationwithinclude_reasoning=True. Spans are located in the answer as for the judge, andtextequals the answer between the offsets. The output matches the golden fixtures once spans carry score 1.0. - The same per-instance semaphore as in
LLMJudgeDetectorwraps each client call (the verify call included).max_concurrencybelow 1 raisesConfigurationError(invalid_config, paramconfig.max_concurrency), and a counting fake client never sees more thanmax_concurrencycalls in flight. - Every span has
score1.0 and theDetectionhas exactly onesynthetic_scorewarning. - The custom taxonomy forms (
True, a list of names, a flat dict, the nested dict) work as today. - An item that can't be located is dropped with
span_not_found, and a malformed item withitem_malformed. - A reply that is not JSON, lacks
hallucinated_spansor has it as something other than a list raisesUpstreamError(unparseable_response). - With
verify=Truethe verify pass behaves as inLLMJudgeDetector, includingverification_skipped. - With a
cache, the keys come frommake_cache_key(kinds"native"and"verify") withmodel_version; a hit makes no client call; a reply is written only after it parses, and a cached entry that doesn't parse is deleted and raisesUpstreamError(unparseable_response). -
usagehas one entry withmodel_id,model_versionand the unitsllm_calls,cache_hits,source_charsandanswer_chars. -
GenerativeDetectorpasses the detector contract suite with a fake client. - The native path of
LLMDetectordelegates toGenerativeDetectorand itspredict*output equals the golden fixtures, apart from spans that had noconfidencenow carrying 1.0. - The existing tests pass unchanged.
- The changed code follows the Errors and logging section of
CONTRIBUTING.md, and no customer text is logged outsidelettucedetect.content.
Blocked by
#127, #140, #144, #156
User stories covered
3, 4, 5, 7, 8, 17, 19, 21, 23, 24, 26, 29, 34, 40, 50, 57
- 主要言語
- Python
- スター
- 615
- フォーク
- 60
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
KRLabsOrg/LettuceDetect のほかの issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
KRLabsOrg/LettuceDetect#108 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 半日 初心者へのやさしさ 70/100
KRLabsOrg/LettuceDetect#104 ·
メンテナーはふだん 1 日以内に返信
-
Bugs: One typed detect interface for the detectors package対応中かも @hslev が 1 日前に担当しました。 オープン
KRLabsOrg/LettuceDetect#192 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
KRLabsOrg/LettuceDetect#181 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 5/5 1週間以上 初心者へのやさしさ 22/100
KRLabsOrg/LettuceDetect#180 ·
メンテナーはふだん 1 日以内に返信
KRLabsOrg/LettuceDetect の issue をすべて見る
似ている issue
-
question
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
vllm-project/vime#524 ·
メンテナーはふだん 7 日以内に返信
-
WOPI editor page is scrollable by a few pixels, which breaks scrolling in the document (Firefox)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
suitenumerique/drive#969 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
theupdateframework/python-tuf#3044 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NVIDIA/nsight-python#88 ·
メンテナーはふだん 1 日以内に返信