Run the fine-tuned generative models through GenerativeDetector
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- ai-infra-agents
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 615
- Forks
- 60
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de KRLabsOrg/LettuceDetect
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
KRLabsOrg/LettuceDetect#108 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 Medio día Aptitud para principiantes 70/100
KRLabsOrg/LettuceDetect#104 ·
Los mantenedores suelen responder en 1 día
-
Bugs: One typed detect interface for the detectors packagePosiblemente ocupada @hslev la tomó hace 1 día. Abierto
KRLabsOrg/LettuceDetect#192 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
KRLabsOrg/LettuceDetect#181 ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 5/5 Más de una semana Aptitud para principiantes 22/100
KRLabsOrg/LettuceDetect#180 ·
Los mantenedores suelen responder en 1 día
Todos los issues de KRLabsOrg/LettuceDetect
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
NVIDIA/nsight-python#88 ·
Los mantenedores suelen responder en 1 día
-
Criteria can pass when the deliverable is missingPosiblemente ocupada @clementtisseau la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
harveyai/harvey-labs#217 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
databrickslabs/ontos#1420 ·
Los mantenedores suelen responder en 3 días