From 405ab39b404de1ef315262ad7ed38eec28be1016 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 18 Sep 2026 19:10:13 -0700 Subject: [PATCH] Chore: drop classifier match default threshold to 0.3 --- docs/configuration.md | 2 +- src/documents/tests/test_classifier.py | 4 ++-- src/paperless/settings/__init__.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index c7cf69366..d5ea6e96c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1200,7 +1200,7 @@ classifier to assign a correspondent, document type, or storage path to a document. Predictions below this threshold are discarded and the field is left unassigned, preventing low-confidence guesses from being applied. - Defaults to 0.6. + Defaults to 0.3. #### [`PAPERLESS_MATCH_REGEX_TIMEOUT_SECONDS=`](#PAPERLESS_MATCH_REGEX_TIMEOUT_SECONDS) {#PAPERLESS_MATCH_REGEX_TIMEOUT_SECONDS} diff --git a/src/documents/tests/test_classifier.py b/src/documents/tests/test_classifier.py index 20332bfba..69f78ca01 100644 --- a/src/documents/tests/test_classifier.py +++ b/src/documents/tests/test_classifier.py @@ -1040,9 +1040,9 @@ def test_classifier_match_threshold_default() -> None: GIVEN: - No PAPERLESS_CLASSIFIER_MATCH_THRESHOLD environment variable is set THEN: - - The classifier match threshold defaults to 0.6 + - The classifier match threshold defaults to 0.3 """ - assert settings.CLASSIFIER_MATCH_THRESHOLD == 0.6 + assert settings.CLASSIFIER_MATCH_THRESHOLD == 0.3 class TestPreprocessContent: diff --git a/src/paperless/settings/__init__.py b/src/paperless/settings/__init__.py index 79d0e65c2..01cf2380b 100644 --- a/src/paperless/settings/__init__.py +++ b/src/paperless/settings/__init__.py @@ -98,7 +98,7 @@ MODEL_FILE = get_path_from_env( # document type, or storage path. 0.0 disables the threshold. CLASSIFIER_MATCH_THRESHOLD: Final[float] = get_float_from_env( "PAPERLESS_CLASSIFIER_MATCH_THRESHOLD", - 0.6, + 0.3, ) MATCH_REGEX_TIMEOUT_SECONDS: Final[float] = get_float_from_env( "PAPERLESS_MATCH_REGEX_TIMEOUT_SECONDS",