My AI assistant has a memory: text files that hold what we worked out in earlier chats. When I ask a question, a program first looks for the files that fit. If it misses the right one, the assistant answers without what we had already worked out, and the answer can still sound convincing.
That is why this search matters so much to me. At the end of October I had it rebuilt and checked with 60 prepared questions. For 56 of them, the right file was among the results.
Then I had the same search checked with 60 questions I had really asked in chats, with typos and without whatever had been said earlier in the chat. This time it found the right file for only 50.
The same can happen to any company that points an AI assistant at its documents. If the project team writes the test questions, they know the documents and ask in the documents' own words. The colleagues who will use it later often don't know them. I think that is why some assistants do well in testing and disappoint in daily use.
That gets expensive when the test decides whether the assistant is rolled out. If the test was too easy, the first to notice are the colleagues who carry on working with a wrong or incomplete answer. And if that happens a few times, they will probably stop asking it.
The new search also compares meaning
The old search was simple. It took the words from my question and looked for files that contain them. If a file used a different word for the same thing, it found nothing, and it could hardly judge which file fits best.
The new one works in three steps. First it splits all files into short sections, so that a long file is not compared as a whole. Then it looks for sections in two ways, by matching words and by similar meaning. That way a question about a holiday can also match a section that only talks about a trip. Finally, a second AI model reads the best 20 sections together with the question and sorts them again.
Technically, this is a vector database on my own computer. Next to the text of each section it stores a series of numbers that describes its meaning, and similar meanings have similar numbers. The text files themselves stay as they are.
My assistant wrote the code, and I decided what went live. The rebuild was worth it: for the 60 real questions, the old search found the right file 28 times, the new one 50 times. But without the real questions I would only have seen the 56 and believed the search was almost finished.
If you know the answer, you ask easier questions
Of the 60 prepared questions, my assistant had written 50 itself, most of them starting from what is in the files. Only ten came from real chats, and those were also part of the second test. I ask differently. In one chat I typed, in German, "what kind of bike is that", and even the new search found nothing. To keep it from returning results for every message, it only responds when enough words match, however similar the meaning is. Short words like "bike" did not count, and the file says "Gravelbike". Hardly anyone with the file open in front of them would think of asking it that way.
Real questions wear out too
So the search was improved, using exactly these 60 real questions. It now takes short words into account, for example, and for the "bike" question the right file is at the very top. With the changes it found 57 of 60. That is like an exam whose questions you practised beforehand: the grade is good, but it says little about new questions.
So in November I had new questions collected from my chats for three weeks. Out of 946 messages, 24 asked for something the memory should hold. The right file for each was decided before the search ran.
For every question the search returns a list of up to 20 files, best one first. "Found" means the right file is somewhere in that list. "First place" means it is at the very top.
| Test | Found | First place |
|---|---|---|
| 60 practised questions | 57 (95%) | 39 (65%) |
| 24 new questions | 22 (92%) | 10 (42%) |
For four of the new questions, the model that sorts the results was down. Repeated with the model running, the total was 9 in first place instead of 10.
So the search still found the right file for most of the new questions. Its weak spot is the order: the right file was at the top for fewer than half of the new questions. That matters, because at first the assistant sees only the file names and three short passages from the files. The passage with the answer was among them for only 8 of the 24 questions. Otherwise the assistant has to decide for itself which file to open. If a wrong one is at the top, it may start there.
Two convincing ideas I did not build
How does the right file get to the top more often? There were two ideas, and both sounded so convincing that they were already in a draft of this post as the solution.
The first idea was to move finished topics down. Once a topic is finished, its file drops down the list, so that current files are higher up. The second idea was to show the actual file on a topic first. If I ask about the bike, the file about the bike should be at the top, not a task list that mentions it once.
Before anything was built, I had both ideas checked against the 24 new questions. The first would not have brought a single right file to first place, the second four at most. That would be 14 instead of 10 out of 24 in the best case, and for the others a wrong file would still be at the top, often one that is all about a different topic. Before I rebuild anything for that, I want to know whether the order matters for the answer at all.
The next test asks about the answer
So far I have only tested the search, not the answers. What counts for me in the end is whether the answer is right. Maybe the assistant opens the right file even when it is in fifth place, and the order matters less than I think.
So next I will have new questions collected from my chats again. The right answer to each will be fixed before the assistant replies. Every question gets asked twice, once with the right file at the top and once with it further down, and everything else stays the same. If the answers are right about equally often, I have no good reason to change the order for now.
Limits
This is one system with one user, and 60 or 24 questions are not many. The new questions may also simply have been harder. I can't say how much of the gap comes from practising.
Nobody from outside checked it either. My assistant decided which messages count as questions and which file is the right one, following a rule set in advance. Sometimes a second file might have held the answer too.
Nothing about the search was changed during the three weeks, but the files kept changing. The two ideas were only checked in December, on the files as they are today.
First ask where the test questions come from
If someone shows you an AI assistant that finds the right document 95 percent of the time, first ask who wrote the test questions. Then ask whether the system has already been improved with those same questions, and how often the right document is at the very top. I would only believe the number once I knew those answers.
For a test of your own, you can start small. Take 20 questions your colleagues really asked, with typos and half sentences, and decide on the right source for each one before the test starts. Then compare the result with the project team's test. And once these questions have been used to improve something, take new ones for the next test.
How far apart are the two results in your case? Write to me.
