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
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.pyandlettucedetect_api/models.pyto 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 viamin_confidence(_filter_spans_by_confidenceinbase.py).lettucedetect_api/models.pyformalizes this as pydantic models —SpanDetectionItem(start: int,end: int,text: str,hallucination_score: float) andTokenDetectionItem, wrapped inSpanDetectionResponse/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 ofSpanDetectionItem/span-dict results into an OpenEvalResultSetthat passesvalidate_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