Return triplets via include_detail and route predict* through detect
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- machine-learning, testing
Direzione di ricerca
Start with lettucedetect/detectors/rag_fact_checker.py and run the two pytest files listed under “Start here.” Then read the detector contract and the #130 fixtures, along with the dependency issues #169 and #170. Done means detect exposes the specified detail structure, legacy predict methods preserve fixture behavior, and the contract and existing tests pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent: #169 · Epic: #126 · Blocked by: #170
Branch from stateless_core; open the PR against it.
Problem
The triplets and fact-check results are reachable only through the "detailed" output format. The predict* methods carry their own copy of the logic, which can drift from detect.
Current behavior
lettucedetect/detectors/rag_fact_checker.py:41-89predictbuilds"detailed"as a dict;:133_convert_to_tokensbuilds fixed tokens (0.9 / 0.1); spans carry atripletkey;:90predict_prompt;:102predict_prompt_batch.
Steps
- Set
supports_detail = True.include_detail=TruereturnsDetection.detailasDetailedResult:triplets(answer,context,hallucinated),fact_check_results, andspan_triplets(each span's source triplet orNone, parallel tospans). Without itdetailisNone. predict("spans","tokens","detailed") andpredict_promptcalldetectand convert back: thetripletkey on each span, tokens built from the triplets as today,"detailed"dict built fromdetail.- Old methods raise
InvalidInputError(unsupported_output_format,length_mismatch,invalid_min_score).predict_prompt_batchunchanged until #178.
Acceptance criteria
-
predict*equals the #130 fixtures (apart from the merge-text fix from #170). -
detailstructure tested against a fake fact checker;include_tokens=Truestill raises. - Contract suite passes; existing tests pass; follows CONTRIBUTING "Errors and logging".
Start here
uv run --extra dev pytest tests/test_golden_rag_fact_checker_pytest.py tests/test_benchmark_detectors_pytest.py -q
- 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 91/100
marimo-team/marimo#11768 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
btclib-org/btclib-node#2358 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
I maintainer di solito rispondono entro 7 giorni
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MTSWebServices/RecTools#330 ·