<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: owenlsatwinner</title>
    <description>The latest articles on DEV Community by owenlsatwinner (@owenlsatwinner).</description>
    <link>https://dev.to/owenlsatwinner</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4210016%2F38478c73-8c4e-4c6f-9a0f-63b7728f40f7.png</url>
      <title>DEV Community: owenlsatwinner</title>
      <link>https://dev.to/owenlsatwinner</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/owenlsatwinner"/>
    <language>en</language>
    <item>
      <title>We Tested Three Embedding Models for AI Memory. The Wrong Answer Was Already in the Top Five.</title>
      <dc:creator>owenlsatwinner</dc:creator>
      <pubDate>Tue, 27 Oct 2026 07:08:48 +0000</pubDate>
      <link>https://dev.to/owenlsatwinner/we-tested-three-embedding-models-for-ai-memory-the-wrong-answer-was-already-in-the-top-five-2mli</link>
      <guid>https://dev.to/owenlsatwinner/we-tested-three-embedding-models-for-ai-memory-the-wrong-answer-was-already-in-the-top-five-2mli</guid>
      <description>&lt;p&gt;The meeting had moved. The search results had not caught up.&lt;/p&gt;

&lt;p&gt;In an early memory-retrieval test for Sipplay, the query asked when the product review had finally been scheduled and which room it would use. Two cards looked relevant: the original Thursday morning booking, and the updated Friday afternoon arrangement.&lt;/p&gt;

&lt;p&gt;Two of the three embedding models put the old booking first. Both found the new one, too. It was sitting in second place.&lt;/p&gt;

&lt;p&gt;That is a useful failure to keep around. A dashboard watching only whether the correct memory appeared in the top five would have called the query a success.&lt;/p&gt;

&lt;p&gt;I work on &lt;a href="https://sipplay.ai/" rel="noopener noreferrer"&gt;Sipplay&lt;/a&gt;, an AI character chat and interactive storytelling product. This article draws on our internal memory evaluation report. These are development-set results, not an independent benchmark or a claim that the final production system has passed validation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why we tested retrieval separately
&lt;/h2&gt;

&lt;p&gt;When an AI character appears to forget something, several things may have gone wrong. The system may never have stored the fact. It may have decided not to search. It may have written a poor search query. Or it may have retrieved the right card and then used it badly.&lt;/p&gt;

&lt;p&gt;Changing the embedding model only addresses part of that chain.&lt;/p&gt;

&lt;p&gt;We separated the evaluation into three layers. First, test embeddings with human-written reference queries. Second, test the model that decides whether to retrieve and prepares the search plan. Third, run those components together with the same filters and retrieval settings.&lt;/p&gt;

&lt;p&gt;The first layer answers a deliberately narrow question: given a suitable query, can the retriever put the right memory near the top?&lt;/p&gt;

&lt;h2&gt;
  
  
  The first result was encouraging—and too small
&lt;/h2&gt;

&lt;p&gt;Our initial test used 40 Chinese memory cards and 24 queries. All three candidates used 1,024-dimensional vectors and a top-five result set through the same gateway. We repeated each model three times.&lt;/p&gt;

&lt;p&gt;Qwen3 Embedding 8B achieved 100% &lt;code&gt;Hit@1&lt;/code&gt;. Voyage 4 and OpenAI text-embedding-3-small each achieved 95.8%. All three achieved 100% &lt;code&gt;Recall@5&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Hit@1&lt;/code&gt; asks whether the first result is relevant. &lt;code&gt;Recall@5&lt;/code&gt; asks what share of the required memories appeared within the first five results, averaged across queries.&lt;/p&gt;

&lt;p&gt;The outdated meeting was the instructive miss: Voyage and OpenAI ranked the old arrangement ahead of the update; Qwen ranked them correctly. But 24 queries could not settle model selection. One query alone moves &lt;code&gt;Hit@1&lt;/code&gt; by roughly four percentage points.&lt;/p&gt;

&lt;h2&gt;
  
  
  A larger development set changed the picture
&lt;/h2&gt;

&lt;p&gt;The next round used 200 cards and 80 queries, again at 1,024 dimensions and top five, with three complete runs per model. The report records the following results:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;&lt;code&gt;Hit@1&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;Recall@5&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;Mean reciprocal rank&lt;/th&gt;
&lt;th&gt;Forbidden card ranked first&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Voyage 4&lt;/td&gt;
&lt;td&gt;95.0%&lt;/td&gt;
&lt;td&gt;100.0%&lt;/td&gt;
&lt;td&gt;0.973&lt;/td&gt;
&lt;td&gt;1.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3 Embedding 8B&lt;/td&gt;
&lt;td&gt;95.0%&lt;/td&gt;
&lt;td&gt;99.4%&lt;/td&gt;
&lt;td&gt;0.975&lt;/td&gt;
&lt;td&gt;2.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI text-embedding-3-small&lt;/td&gt;
&lt;td&gt;87.5%&lt;/td&gt;
&lt;td&gt;99.4%&lt;/td&gt;
&lt;td&gt;0.933&lt;/td&gt;
&lt;td&gt;8.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Here, a forbidden card means an annotated distractor such as an outdated state or a fact attached to the wrong person. It does not mean a confirmed leak from a production account.&lt;/p&gt;

&lt;p&gt;Voyage and Qwen tied on &lt;code&gt;Hit@1&lt;/code&gt;. Qwen had a slightly higher reciprocal-rank score; Voyage had better &lt;code&gt;Recall@5&lt;/code&gt; and fewer forbidden cards in first place. The team selected Voyage for the next evaluation stage based on the combined quality, observed latency, and cost results.&lt;/p&gt;

&lt;p&gt;That is a candidate decision. The report still calls for independent blind testing. Repeating the same queries three times also does not turn 80 questions into 240 independent examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  Similarity cannot tell you which fact is still valid
&lt;/h2&gt;

&lt;p&gt;The Thursday and Friday cards were both about the right meeting. A similarity model had good reason to consider both relevant.&lt;/p&gt;

&lt;p&gt;The application needs an additional rule: the rescheduled event supersedes the original one.&lt;/p&gt;

&lt;p&gt;For a memory system, that means keeping enough metadata to distinguish the owner, character, scope, and status of each record. The planned production path filters by user, character, namespace, and active/stale/deleted status before ranking eligible memories. Time-aware reranking can help when several valid candidates remain.&lt;/p&gt;

&lt;p&gt;The unfiltered test deliberately kept confusing records in the pool. That makes it useful for diagnosing ranking behavior. It does not replace a separate test of the filtered production path.&lt;/p&gt;

&lt;p&gt;Both tests matter. Otherwise, a database filter can hide a weak ranker, or a broken filter can make a good ranker look responsible for a problem it cannot solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give wrong answers their own labels
&lt;/h2&gt;

&lt;p&gt;Our test cases identify relevant memory IDs and forbidden memory IDs separately. That extra annotation makes the results much easier to interpret.&lt;/p&gt;

&lt;p&gt;For example, imagine a synthetic fixture in which the user has a peanut allergy and a coworker has a mango allergy. Retrieving an allergy-related sentence is insufficient. It must belong to the right person.&lt;/p&gt;

&lt;p&gt;We track failures such as a missing memory, a correct result ranked too low, an outdated state ranked first, and a swapped person or relationship. Cross-user or cross-character retrieval belongs in a separate isolation check, with zero tolerated occurrences in the evaluated cases.&lt;/p&gt;

&lt;p&gt;Those labels point to different repairs. A missed result might call for better retrieval instructions. A stale result may require state handling. An isolation error requires fixing the data boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measure the failure your product actually notices
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Precision@5&lt;/code&gt; can be misleading when a query has only one relevant card. Even if that card ranks first, one relevant result among five produces 20% precision. Setting a 90% target would create an impossible gate for that case.&lt;/p&gt;

&lt;p&gt;For this dataset, &lt;code&gt;Hit@1&lt;/code&gt;, &lt;code&gt;Recall@5&lt;/code&gt;, and ranking metrics give a more useful picture. We also need the forbidden-result rate, because a plausible wrong memory can be more damaging than an empty result.&lt;/p&gt;

&lt;p&gt;The next step is to evaluate the actual query produced by the intent model, then check whether the response uses the retrieved material correctly. Retrieval quality and answer quality need separate scores.&lt;/p&gt;

&lt;p&gt;For AI roleplay, that distinction becomes very concrete. A character can have a promise somewhere in its memory store and still act as though the promise never happened.&lt;/p&gt;

&lt;p&gt;Our meeting test offered a smaller version of the same problem. The correct answer was present. The system still needed a reason to choose it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Source note: figures are transcribed from Sipplay's internal memory evaluation report. The embedding rounds are labeled August 16, 2026. The corpora are Chinese; these results should not be treated as an English-roleplay benchmark. The raw fixtures and execution logs are not included here, so this article describes findings and methodology rather than a fully reproducible public benchmark.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>testing</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
