diff --git a/apps/geocoder/src/worker.py b/apps/geocoder/src/worker.py index 640dc6c..bec2e80 100644 --- a/apps/geocoder/src/worker.py +++ b/apps/geocoder/src/worker.py @@ -48,10 +48,13 @@ def _polite_sleep(): def is_reliable(confidence, granularity, is_country_only) -> bool: - """Un géocodage est fiable s'il est assez confiant ET assez précis.""" + """Un géocodage est fiable s'il est assez confiant ET assez précis. + + On exige STRICTEMENT plus que le seuil : 0.7 et en-dessous → rejeté (LLM). + """ if is_country_only: return True # résolu par centroïde à l'enqueue, granularité pays assumée - if confidence is None or confidence < MIN_CONFIDENCE: + if confidence is None or confidence <= MIN_CONFIDENCE: return False if granularity and granularity.lower() in COARSE_TYPES: return False