Prima Pagina.
FR

Cosine similarity

Cosine similarity measures the angle between two embedding vectors: 1 for semantically identical texts, near 0 for unrelated ones. It is the standard tool for semantic comparison.

In practice

We use it as a production safeguard: between two adjacent generated pages — same service, different cities — the body text similarity must stay below 0.85. Above that threshold, the page gets rewritten: too close to justify an independent existence. The number is arbitrary; the discipline is not.