refactor: comentarii strict functionale, fara referinte PRD/stories
Curatare globala a comentariilor si docstring-urilor (app, tools, teste, scripturi): eliminate referintele la PRD-uri, US-xxx, task-uri istorice si review-uri; pastrata doar informatia functionala, formulata scurt. Regula adaugata in CLAUDE.md (sectiunea Stil). Fara modificari de cod sau comportament. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
"""Etichetator batch offline OpenRouter (Layer 1) — L14-S1.
|
||||
"""Etichetator batch offline OpenRouter (Layer 1).
|
||||
|
||||
Clasifica denumirile de operatii service in cele 18 coduri RAR + NUL.
|
||||
|
||||
Cerinte implementate (PRD 5.14 / Decision Audit Trail):
|
||||
Cerinte implementate:
|
||||
1. Prioritizare pe FRECVENTA (desc): corpus_by_freq() din or_common
|
||||
2. Grupare pe similaritate (rapidfuzz token_sort_ratio, threshold conservator
|
||||
Eng-F7): LLM eticheteaza doar reprezentantul, codul se propaga la grup
|
||||
3. Ensemble NVIDIA (super-120b + nano-9b, PRD #9): acord unanim -> high;
|
||||
2. Grupare pe similaritate (rapidfuzz token_sort_ratio, threshold conservator):
|
||||
LLM eticheteaza doar reprezentantul, codul se propaga la grup
|
||||
3. Ensemble NVIDIA (super-120b + nano-9b): acord unanim -> high;
|
||||
dezacord (orice divergenta) -> needs_mapping. Vot pe coduri, nu pe
|
||||
self-confidence. ultra-550b EXCLUS (4-5x mai lent, zero castig)
|
||||
4. Scrub PII (F3): integrat in or_common.call() (regex nr inmatriculare/VIN)
|
||||
4. Scrub PII: integrat in or_common.call() (regex nr inmatriculare/VIN)
|
||||
5. Resumabil: scrie *-partial.json incremental, reia de unde a ramas;
|
||||
retry/backoff pe 429 gestionat de or_common.call()
|
||||
6. Output: {denumire, cod, sursa, confidence, grup_rep}
|
||||
NUL = ancore negativa + supresie, NU promovat la cod RAR (#4)
|
||||
NUL = ancore negativa + supresie, NU promovat la cod RAR
|
||||
|
||||
CLI: python3 tools/mapare-llm/or_label.py [N] [--out path] [--partial path]
|
||||
[--threshold 85] [--batch 20] [--pace 4.0]
|
||||
@@ -28,7 +28,7 @@ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
import or_common as oc
|
||||
from rapidfuzz import fuzz
|
||||
|
||||
# Modele NVIDIA (decizie PRD #9: pastram super-120b + nano-9b; aruncam ultra-550b)
|
||||
# Modele NVIDIA: pastram super-120b + nano-9b; aruncam ultra-550b
|
||||
MODELS = [
|
||||
"nvidia/nemotron-3-super-120b-a12b:free",
|
||||
"nvidia/nemotron-nano-9b-v2:free",
|
||||
@@ -85,8 +85,8 @@ def ensemble_vote(votes):
|
||||
- Toate N modele cu acelasi cod valid -> (cod, "high", "ensemble-unanim")
|
||||
- Toate N modele cu "NUL" -> ("NUL", "high", "ensemble-unanim-nul")
|
||||
- Orice divergenta / parse-fail partial -> ("?", "needs_mapping", "ensemble-dezacord")
|
||||
Vot pe coduri, NU pe self-confidence (PRD #10, Eng-F7).
|
||||
NUL tratat SEPARAT: ancore negativa, nu e cod RAR (#4).
|
||||
Vot pe coduri, NU pe self-confidence.
|
||||
NUL tratat SEPARAT: ancore negativa, nu e cod RAR.
|
||||
|
||||
Intoarce: (cod_final, confidence, sursa)
|
||||
cod_final: cod RAR valid | "NUL" | "?" (needs human review)
|
||||
|
||||
Reference in New Issue
Block a user