<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://eln.excellgen.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KandiNorthern</id>
	<title>ELN - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://eln.excellgen.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KandiNorthern"/>
	<link rel="alternate" type="text/html" href="https://eln.excellgen.com/index.php?title=Special:Contributions/KandiNorthern"/>
	<updated>2026-12-06T06:34:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://eln.excellgen.com/index.php?title=Semantic_Caching_And_The_Similarity_Threshold:_Why_One_Number_Cannot_Rule_Them_All&amp;diff=64127</id>
		<title>Semantic Caching And The Similarity Threshold: Why One Number Cannot Rule Them All</title>
		<link rel="alternate" type="text/html" href="https://eln.excellgen.com/index.php?title=Semantic_Caching_And_The_Similarity_Threshold:_Why_One_Number_Cannot_Rule_Them_All&amp;diff=64127"/>
		<updated>2026-11-09T02:31:59Z</updated>

		<summary type="html">&lt;p&gt;KandiNorthern: Created page with &amp;quot;&amp;lt;br&amp;gt;Semantic caching is a practical way to make large-language-model applications faster and cheaper. Instead of asking the model to answer every new question from scratch, the system stores a previous answer and reuses it when a new query means the same thing. The tricky part is deciding what &amp;quot;means the same thing&amp;quot; means. In most deployed products, that decision is made by a single number: the similarity threshold, usually shipped as a default between 0.80 and 0.95.&amp;lt;br&amp;gt;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;Semantic caching is a practical way to make large-language-model applications faster and cheaper. Instead of asking the model to answer every new question from scratch, the system stores a previous answer and reuses it when a new query means the same thing. The tricky part is deciding what &amp;quot;means the same thing&amp;quot; means. In most deployed products, that decision is made by a single number: the similarity threshold, usually shipped as a default between 0.80 and 0.95.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;To understand how it works, imagine a customer writing &amp;quot;I want to cancel my subscription&amp;quot; and later writing &amp;quot;Please end my plan.&amp;quot; An embedding model turns each sentence into a list of numbers, a vector. The semantic closeness of two vectors is measured by cosine similarity, which calculates the angle between them. A score near 1 means the sentences point in nearly the same direction; a score near 0 means they are unrelated. If the new query&#039;s cosine similarity to a stored query is above the threshold, the cache returns the old answer. If it is below, the system calls the language model again.&amp;lt;br&amp;gt; &amp;lt;br&amp;gt;The problem is that a single threshold assumes a clean separation: genuine paraphrases are similar, and different meanings are not. Real customer traffic does not behave that way. A 2026 preprint by Guerin Green of [https://zenodo.org/records/23667256 Novel Cognition] built a labelled set of 243 English customer-support question pairs across eight domains. The set included 101 heavily reworded paraphrases, 102 near-miss pairs that differ by a word or word order but need different answers, and 40 lightly reworded paraphrases. The near-miss pairs are the dangerous ones. &amp;quot;Can I pause my subscription?&amp;quot; and &amp;quot;Can I cancel my subscription?&amp;quot; have very high cosine similarity, but the correct answers are different.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The preprint scored every pair using the open embedding model Qwen3-Embedding-0.6B. The result was counterintuitive: the near-miss pairs scored higher on cosine similarity (median 0.801) than the genuine paraphrases (median 0.691). The area under the ROC curve was 0.144, which means the two distributions were not just overlapping; they were inverted. A low threshold catches paraphrases but also returns wrong answers for near-misses. A high threshold avoids false cache hits but misses genuine rewordings.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Consider what happens at a threshold of 0.85, the default for one commercial service. That setting matched none of the 101 paraphrases, so every reworded question went to the full model, [https://en.wiktionary.org/wiki/defeating defeating] the purpose of caching. Meanwhile, it matched 29 of the 102 near-misses, meaning 28.4 percent of those queries received a confidently wrong answer. To drive false matches to zero, the threshold had to be raised to 0.985, and even then 2 of the 40 near-verbatim repeats were still missed. There is no sweet spot.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Why does this happen? The preprint found that cosine similarity correlated strongly with word-set overlap (Pearson r = 0.695), even within each label. Embedding models are sensitive to lexical surface similarity, not just meaning. A single changed word, like &amp;quot;pause&amp;quot; versus &amp;quot;cancel,&amp;quot; shifts the vector only slightly. Adding a query-instruction prefix to the input halved false matches at 0.85, down to 12.7 percent, without changing the ordering of the pairs, but it did not fix the underlying inversion.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The core argument is that a similarity threshold is a property of one embedding model on one traffic distribution. It is not a transferable constant. A threshold that works for one product&#039;s questions may fail badly for another&#039;s. Practitioners should measure their own data, using a labelled near-miss protocol like the one described in the preprint, which releases the pairs, the scores, and a script that recomputes every statistic under a permissive licence. For a non-technical stakeholder, the message is simple: a single number cannot tell the difference between &amp;quot;same question, different words&amp;quot; and &amp;quot;similar words, different question.&amp;quot; The cache needs to know what kind of similarity it is looking for, and that requires more than one number.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>KandiNorthern</name></author>
	</entry>
	<entry>
		<id>https://eln.excellgen.com/index.php?title=User:KandiNorthern&amp;diff=64126</id>
		<title>User:KandiNorthern</title>
		<link rel="alternate" type="text/html" href="https://eln.excellgen.com/index.php?title=User:KandiNorthern&amp;diff=64126"/>
		<updated>2026-11-09T02:31:54Z</updated>

		<summary type="html">&lt;p&gt;KandiNorthern: Created page with &amp;quot;Understand cache false positives in AI: when embeddings match too loosely, and how to tighten thresholds for reliable LLM answer reuse.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Also visit my blog [https://zenodo.org/records/23667256 Novel Cognition]&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Understand cache false positives in AI: when embeddings match too loosely, and how to tighten thresholds for reliable LLM answer reuse.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Also visit my blog [https://zenodo.org/records/23667256 Novel Cognition]&lt;/div&gt;</summary>
		<author><name>KandiNorthern</name></author>
	</entry>
</feed>