Run the fine-tuned generative models through GenerativeDetector
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- ai-infra-agents
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 615
- Fork
- 60
- Merge medio
- 1g 8h
- PR unite (30g)
- 10
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KRLabsOrg/LettuceDetect
-
Stop-hook --min-confidence drops every --llm-model span (missing confidence treated as 0.0), reporting hallucinated answers as cleanForse già presa @Clannad47 l’ha presa 18 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
KRLabsOrg/LettuceDetect#117 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
KRLabsOrg/LettuceDetect#108 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 Mezza giornata Idoneità per principianti 70/100
KRLabsOrg/LettuceDetect#104 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
KRLabsOrg/LettuceDetect#181 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
KRLabsOrg/LettuceDetect#180 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di KRLabsOrg/LettuceDetect
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
NVIDIA/auto-ontology#463 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
NousResearch/hermes-agent#151165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
code-health
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tinaudio/synth-setter#3750 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] vllm-sr config migrate drops providers.models[].deploymentForse già presa @Bevisy l’ha presa oggi. Apertaneeds-acceptance wg/developer-experience-ecosystem
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
vllm-project/semantic-router#5996 ·
I maintainer di solito rispondono entro 2 giorni