Key takeaways
- A multilingual embedding model, arctic-embed-m-v2.0 in its int8 build, put the right note in its top 10 for 120 of 120 questions on a fresh blind set, against 108 of 120 for the English-only model we used before. On the 12 Hinglish questions it found 12, against 9. It needs about 1,068 MiB of memory at peak against 366 MiB, and 2.8 times the embedding time.
- On LongMemEval's retrieval task (120 questions, 20 Nov 2026), hybrid search put the right session in the top 10 for 118 of 120 questions. Vector search alone did about as well (117 of 120). BM25 keyword search alone found 114, and exact-text search alone found 4.
- Rank fusion did not beat vector search alone on that benchmark. Our first fusion also gave different results on fresh copies of the same data. A second version with a stable tie order, with each document embedded on its own, changed no hit-or-miss verdict across fresh copies in the Lab (0 of 227). It runs in shadow only.
- A cross-encoder reranker made the first item the right one on 49 of 70 synthetic prompts, against 45 of 70 without it and a pass line of 56. It took about 0.9 s a prompt on a CPU. We did not adopt it.
The need: why search decides what an AI agent remembers
A memory layer stores what people said and decided, then brings back the right piece when it matters. If search misses that piece, the memory might as well not exist. If search returns the wrong piece, the agent acts on it.
Two kinds of question make this hard. People write in English, Hindi and Hinglish (Hindi written in Latin letters and mixed with English), and a question asked in English next month may need a note written in Hinglish today. People also ask for exact things: a version number, an error code, a file path. Search by meaning can blur those, and search by words cannot cross languages.
It also has to run on modest hardware. Before this work, our embedding service ran under a 768 MiB memory cap.
Yukti Memory is still being built. Serving memory into an agent's prompts is switched off while we test it.
Our approach: three search arms and a fusion step
Every question goes to three searches, which we call arms:
- Vector search. An embedding model turns each text into a list of numbers, a vector. Texts with similar meaning get nearby vectors, so a question can find a note that uses different words, or another language. The vectors live in Postgres with pgvector. At our current scale we scan them exactly; our HNSW test is in Article 7.
- BM25 keyword search. BM25 scores a text by the words it shares with the question, and weights rare words more than common ones. It runs in Postgres.
- Exact-text search (grep). It finds the literal characters, such as
v5.2.1or an error code.
Fusion joins the three ranked lists into one. We use reciprocal rank fusion (RRF): an item at rank r in an arm scores 1 / (k + r), its scores from each arm are added, and items that several arms agree on rise. For a top 10, k is 40.
- Fusion v1, the current ranking, is unweighted RRF over all three arms. Its lists are logged, not served.
- Fusion v2 runs in shadow beside it. It is RRF over BM25 and vector only. An exact-text match boosts an item the other arms already found, and a rare identifier that only exact-text search found enters as its own short list. Equal scores are ordered by a stable key: how many arms found the item, the arm's own score, the time, and the event's id. A random id never decides.
Every arm reads only what the person asking may read, and the permission filter is applied before each arm takes its top 10.
The embedding model is arctic-embed-m-v2.0 (Apache-2.0, 768 dimensions), in its int8 build. Int8 stores the model's numbers as 8-bit integers, which saves memory and time. We switched to it from bge-small-en-v1.5, an English-only model, on 19 Nov 2026.
Why not vector search alone, keyword search alone, or a bigger model?
- Vector search alone. On LongMemEval it matched hybrid search. But exact identifiers are what developers ask for, and a keyword arm matches them by their characters: on a synthetic set of 60 identifier questions, BM25 alone found 60 of 60 in its top 10. We have not measured vector search alone on that set, so we keep the keyword arms until we do.
- Keyword search alone. It cannot connect an English question to a Hinglish note that shares no words with it. On LongMemEval, BM25 alone found 114 of 120, against 117 for vector search.
- Transliteration instead of a multilingual model. Transliteration re-spells one script in another, for example Devanagari in Latin letters. On a synthetic cross-language set we tried it at query time, at index time and both. It fixed none of 10 cross-language misses, and both together lost 31 probes to noise. The misses were about meaning, not spelling.
- The biggest embedding model we could find. Memory and CPU rule it out. Two larger models took about 6.6 and 14 times the baseline's embedding time. The full-precision files of our two finalists are 1.06 and 1.17 GiB, too large for the cap.
- Exact-text search with a full vote. Its results come back in storage order, so its "rank 1" says nothing about relevance. In v1 it still counts as much as the best vector hit. v2 removes that.
- A reranker. We tested one. It is in the results below.
How we tested it
-
Choosing the embedding model (16 to 19 Nov 2026). We screened ten models. The rules were written before any result: an MIT or Apache-2.0 licence, at most 768 stored dimensions, no English loss beyond 2 points, and a gain of at least 5 points over the baseline on a fresh blind set. Separate agents wrote the sets without seeing any model or result:
- set D: 158 notes (113 in romanized Hinglish, 15 in Devanagari, 30 in English) and 106 questions;
- set E: 162 notes and 112 questions, to confirm the winner;
- set F: 120 questions for the final step, checked by a second reader who disputed 0 of 120.
The finalists were then measured on the exact build that would run: the int8 file, under the real memory cap, on the CPUs we have. We also timed the vector search's p95 latency (95 of 100 searches are faster than it).
-
LongMemEval, retrieval only. LongMemEval is a public benchmark of long chat histories (MIT licence). We took 20 questions of each of its six types, 120 in all, and bound each question to its own store of about 48 sessions. We asked whether the session holding the answer is in the top 5 and the top 10. No model answers anything, so this measures search alone. The same sample ran with bge-small on 14 Nov and with arctic on 20 Nov 2026. Questions that should get no answer were left out.
-
Reproducibility. A synthetic set of 360 events and 227 probes went into 3 fresh stores, and 5 repeats ran on one store. We counted how often the top-10 order changed, and how often a probe's hit-or-miss verdict changed.
-
The reranker. bge-reranker-v2-m3, a 0.6B-parameter multilingual cross-encoder (Apache-2.0), reordered our ranked list on a synthetic serving set. The pass line, written first: the first item helps on at least 80% of the 70 tuning prompts that need memory.
-
Identifiers. A synthetic set of 60 questions in nine forms (paths, hashes, versions, error codes, Hinglish and more). Each target note has a near neighbour that differs only in the identifier.
Results
Choosing the embedding model (synthetic blind sets, 18 and 19 Nov 2026; questions with the right note in the top 10):
| Model and build | Set D (of 106) | Set E (of 112) | Set F (of 120) | Memory at peak | Outcome |
|---|---|---|---|---|---|
| bge-small-en-v1.5, English-only (before) | 81 | 102 | 108 | 366 MiB | the baseline |
| multilingual-e5-base, full precision | 90 | 109 | not run | file too large for the cap | runner-up |
| multilingual-e5-base, int8 build for AVX-512 VNNI | 81 | 106 | not run | 760.5 MiB | failed the +5-point line on E |
| arctic-embed-m-v2.0, full precision | 99 | 111 | not run | file too large for the cap | winner |
| arctic-embed-m-v2.0, int8 (adopted) | 97 | 112 | 120 | 1,068.2 MiB | passed under a 1,280 MiB cap |
The memory figures come from our laptop runs, except e5-base's int8 build, which was measured on our test server.
- On set F, by language: arctic found 108 of 108 English questions (bge-small 99) and 12 of 12 Hinglish questions (bge-small 9). Arctic hit the ceiling, so its true margin is at least 10 points and otherwise unknown.
- The costs: the vector search's p95 was 142.6 ms against bge-small's 104.7 ms (the median of three runs; the line was 150 ms). Embedding took 2.81 times as long. Each stored vector takes 3,080 bytes against 1,544.
- A search for something lighter failed. We screened seven more builds, including lighter builds of arctic and of e5-base, for one that fits 768 MiB. None passed every line. The nearest, an e5-base build made for our CPUs, found 116 of 120 on set F, but its worst batch was killed at 768 MiB.
LongMemEval, retrieval only (120 questions; the session holding the answer in the top 10 and top 5):
| Search | bge-small, top 10 | bge-small, top 5 | arctic, top 10 | arctic, top 5 |
|---|---|---|---|---|
| Hybrid (fusion v1) | 118 | 114 | 118 | 115 |
| Vector alone | 118 | 117 | 117 | 117 |
| BM25 alone | 114 | 108 | 114 | 109 |
| Exact text alone | 4 | 4 | 4 | 4 |
- The mean rank of the first right session was 1.26 with arctic and 1.31 with bge-small for hybrid search, and 1.12 against 1.29 for vector search alone.
- By type, single-session-preference was the weakest: hybrid search found 19 and 17 of 20 at top 10 and top 5 with arctic, against 18 and 15 with bge-small. Multi-session lost one (19 and 18, against 20 and 19). The other four types stayed at 20 of 20.
- Fusion cost a little at top 5: 3 questions with bge-small (114 against vector's 117) and 2 with arctic (115 against 117). In an earlier 60-question run, unweighted fusion pushed a vector hit from rank 5 to rank 9.
- BM25 does not use the embedding model, yet its top-5 count moved from 108 to 109 between the two runs. We have not traced that one question.
- With arctic, the vector search's p95 on our test server was 154 ms, and no run was killed for memory.
Reproducibility (synthetic, 227 probes, 3 fresh stores, 20 and 21 Nov 2026):
| Fusion v1 | Fusion v2 | |
|---|---|---|
| Top-10 order changed across fresh stores, batched embedding | 226 of 227 | 223 of 227 |
| Verdict changed across fresh stores, batched embedding | 9 of 227 | 9 of 227 |
| Top-10 order changed across fresh stores, each document embedded alone | 193 of 227 | 16 of 227 |
| Verdict changed across fresh stores, each document embedded alone | 4 of 227 | 0 of 227 |
- Repeats on one store never changed anything (0 of 227 in every arm). The drift came from fresh stores.
- The cause we did not expect: arctic's int8 build makes each vector depend on the other texts in its batch. The same text, embedded in different batches, scored a cosine as low as 0.886 against itself. Embedded alone twice, it was bit-identical. bge-small, a full-precision model, scored exactly 1.000.
- Embedding each document alone made every sampled stored vector identical across stores (60 of 60, against 0 of 60 batched). Ingest took about 95 s per store against about 103 s. It did not raise recall: fusion v2 found 179, 179 and 179 of 198 hit probes, against 182, 178 and 179 batched.
The reranker (synthetic serving set, 21 Nov 2026): the first item helped on 49 of 70 tuning prompts with the reranker and 45 of 70 without it. The line was 80%, 56 of 70, so we did not score the held-out share. It took a p50 of 916 ms and a p95 of 1,176 ms per prompt on lists of up to 10 items, and seconds on lists of 30.
Identifiers (synthetic, 21 Nov 2026): BM25 alone and fusion v2 each found 60 of 60 in the top 10. Fusion v2 ranked the near neighbour above the asked identifier once, on a Hinglish question about a version number, so it failed that line.
What failed along the way
- Our first selection could not choose. One set was too easy: 9 of 10 models scored a perfect recall@10 on it.
- Both finalists first failed on the builds that would run. Arctic's int8 file was killed while loading under 768 MiB. e5-base's int8 build, made for AVX-512 VNNI, lost 8.5 points on the Hinglish-heavy set; our CPUs have AVX2 only.
- One question no model reached. It says "pending"; its note says "paused". The best rank any model gave it was 76. That is a gap in meaning, not language.
- One line was changed after results. A line on a specific Hinglish miss was changed twice and then dropped for arctic's int8 build, which ranks that note 12th. We record it as a change made after the fact.
- A stable tie order in the database is not accepted yet. It removed the flips (0 of 227 across fresh stores), but slowed one vector search path by 11.81% at p95, against a 10% line. A cheaper form is being built.
What's next, and what we'd suggest
Next for Yukti Memory:
- the stable tie order at an acceptable cost, then LongMemEval again on the final build;
- a decision on embedding every stored note on its own, which costs no measurable ingest time but gains no recall;
- a query rewrite or an English gloss for gaps in meaning like "pending" and "paused";
- fusion v2 and a rule for serving nothing stay in shadow until fresh judged prompts show they help.
What we'd suggest if you are building search for AI memory:
- Choose the embedding model on your users' languages, with a fresh blind set and lines written first, not on a public English leaderboard.
- Measure the exact build you will run: the int8 file, on your CPUs, under your memory cap.
- Before adopting a quantized embedding model, embed one text alone twice, then in different batches, and compare.
- Break ties with a stable key, never a random id, and test on fresh stores, not only repeats.
- Report each arm alone beside the fused number. Fusion can cost recall as well as add it.
- Time a reranker on your own hardware before you count its gain.
Frequently asked questions
What is the best embedding model for multilingual AI agent memory?
In our tests on English, Hindi and Hinglish notes, arctic-embed-m-v2.0 (int8) found the most: 120 of 120 on a fresh blind set, against 108 for an English-only model. The best model for you depends on your languages and your memory budget, so test on a blind set of your own.
Is hybrid search better than vector search for AI memory?
On LongMemEval, only slightly: 118 of 120 in the top 10 against 117 for vector search alone, and slightly worse at the top 5. We keep keyword arms for exact identifiers such as versions and error codes.
What is reciprocal rank fusion (RRF)?
A way to merge ranked lists. Each item scores 1 / (k + rank) in every list it appears in, the scores are added, and items that several lists agree on rise to the top.
Does a reranker improve retrieval for AI memory?
In our test, a little: the first item was right on 49 of 70 prompts against 45 of 70 without it. That missed our line of 56, and it cost about 0.9 s a prompt on a CPU, so we did not adopt it.