Proposal: an EvalPort/OpenEval adapter for LettuceDetect's span-level output

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

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

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
22/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
python

調査の方向性

Read predict() and predict_prompt() in lettucedetect/detectors/base.py, _filter_spans_by_confidence, and the span models in lettucedetect_api/models.py to see the span result shape. The open question is the mapping to an external schema, which the issue does not settle, so a newcomer would first need a maintainer decision on whether this lives in lettucedetect/integrations/ or in the external project. Done means an agreed mapping spec and a decision on where the adapter lives.

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

説明

design enhancement

Hi — I maintain EvalPort, an open, portable schema for LLM eval/grading results (openeval.validate.validate_suite() / validate_result_set()). It's meant to be a boring, tool-agnostic JSON shape so a result produced by one eval/grading tool can be read or compared by another.

Before opening this I read through lettucedetect/detectors/base.py and lettucedetect_api/models.py to check LettuceDetect actually has a real structured result, not just a score float:

  • BaseDetector.predict() / predict_prompt() return a "spans"-format list of span dicts (start, end, text, confidence), filterable via min_confidence (_filter_spans_by_confidence in base.py).
  • lettucedetect_api/models.py formalizes this as pydantic models — SpanDetectionItem (start: int, end: int, text: str, hallucination_score: float) and TokenDetectionItem, wrapped in SpanDetectionResponse/TokenDetectionResponse.

That's a genuine span-level grounding-verification result object — exactly the shape an OpenEval adapter is meant to sit on top of (a span/claim-level annotation with a confidence score, rather than a single aggregate number).

What I'm proposing: a small adapter (could live in lettucedetect/integrations/ alongside the existing LangChain callback integration, or in EvalPort itself) that converts a batch of SpanDetectionItem/span-dict results into an OpenEval ResultSet that passes validate_result_set() — mapping each detected span to a graded item with its confidence as the score. I'd be happy to draft a first-cut PR if that's useful, or just help spec the mapping if someone on your side wants to build it — this is meant as a low-effort invitation, not a request.

Repo/spec: https://github.com/adhabnr-ux/evalport

主要言語
Python
スター
615
フォーク
60
平均マージ
1日 8時間
マージ済み PR(30日)
10

環境構築

はじめの一歩

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

KRLabsOrg/LettuceDetect のほかの issue

KRLabsOrg/LettuceDetect の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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