Wrong Results
When results come back but look wrong, change one variable at a time. This is the order that finds the cause fastest.
Change one variable at a time
- 01Read what was returned
Print the id, tags, and score of each result. Often the “wrong” memory is a genuinely reasonable match for how the query was phrased.
- 02Remove the filters
Run the query with no tag filter. If the right record appears, your filter or your tagging is the problem.
- 03Rephrase as a user would
Queries that read like keywords behave differently from questions. Try the phrasing your product actually sends.
- 04Check the stored text
Fetch the record and read it. Vague or context-free text cannot be matched reliably later.
- 05Adjust the result count
Only after the above. A larger k surfaces more candidates but does not fix a bad query or bad input.
Usually it is the input
- Context-free text
- “He prefers that” cannot be matched later. Store the resolved fact instead.
- Whole transcripts
- One long blob competes with itself. Write one durable fact per record.
- Contradictions
- If an old preference was replaced, update or forget the old record — both will otherwise remain retrievable.
- Inconsistent tags
- Tags are the only field you filter on, so a small controlled vocabulary beats free-form tagging.
Keep a small set of questions with known correct answers and run them after changing how you write. That turns “results feel worse” into something you can measure.