diff --git a/src/Admin/Admin.php b/src/Admin/Admin.php index e24037f..7d80b15 100644 --- a/src/Admin/Admin.php +++ b/src/Admin/Admin.php @@ -914,7 +914,7 @@ public function handle_save_settings(): void { 'ai_categorize' => isset( $_POST['ai_categorize'] ), 'hub_review' => isset( $_POST['hub_review'] ), 'strategic_mode' => isset( $_POST['strategic_mode'] ), - 'similarity_threshold' => min( 1, max( 0, (float) ( $_POST['similarity_threshold'] ?? 0.82 ) ) ), + 'similarity_threshold' => min( 1, max( 0, (float) ( $_POST['similarity_threshold'] ?? 0.72 ) ) ), 'cluster_window_days' => max( 1, (int) ( $_POST['cluster_window_days'] ?? 7 ) ), 'import_interval_minutes' => max( 1, (int) ( $_POST['import_interval_minutes'] ?? 30 ) ), 'processing_enabled' => isset( $_POST['processing_enabled'] ), diff --git a/src/Admin/views/settings.php b/src/Admin/views/settings.php index 236fe7b..4b1d802 100644 --- a/src/Admin/views/settings.php +++ b/src/Admin/views/settings.php @@ -175,7 +175,8 @@
| - | + | + |
|---|---|---|
| diff --git a/src/Cluster/Clusterer.php b/src/Cluster/Clusterer.php index 84845a3..ccd7630 100644 --- a/src/Cluster/Clusterer.php +++ b/src/Cluster/Clusterer.php @@ -41,6 +41,14 @@ public function match( array $vector, string $content ): ?int { foreach ( $candidates as $candidate ) { if ( $candidate['score'] < $threshold ) { + EventLog::info( + sprintf( + 'Nearest existing story #%d scored %.3f, under the %.2f duplicate threshold, so this published as a new story. Lower "Duplicate sensitivity" to merge stories like this.', + $candidate['owner_id'], + $candidate['score'], + $threshold + ) + ); return null; // sorted desc — nothing below the top will clear it either } diff --git a/src/Settings.php b/src/Settings.php index af273c8..18aee0f 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -117,7 +117,7 @@ public function strategic_mode(): bool { } public function similarity_threshold(): float { - return (float) $this->get( 'similarity_threshold', 0.82 ); + return (float) $this->get( 'similarity_threshold', 0.72 ); } public function cluster_window_days(): int { |