StampyAI / stampy-ui

AI Safety Q&A web frontend
https://aisafety.info
MIT License
35 stars 9 forks source link

Search not showing answers with keywords - stale cache #228

Closed markovial closed 1 year ago

markovial commented 1 year ago

The answers show up when I type in the full phrase but not when I search keywords.

E.g. What is a subagent will not show up when I search just the word "subagent" , and What is deceptive alignment doesnt show up when I search "deceptive"

Keyword search is supposed to be working when the user searches just 1 or 2 words as per this closed issue

markovial commented 1 year ago

@mruwnik

Aprillion commented 1 year ago

@markovial as a workaround, I cleared the cache by sending DELETE https://aisafety.info/questions/cache request manually and now What is a subagent? appears in the search results: image

But I have to investigate why the cache did not refresh automatically, let me repurpose this issue for that.

Aprillion commented 1 year ago

Also, we have so much data in the cache that downloading the whole CloudFlare KV store in https://aisafety.info/questions/cache route no longer works => let's remove that feature and only show the Delete button on the page without downloading all the stuff, so other people will be able to delete the cache from that page without sending a DELETE request via API.

Aprillion commented 1 year ago

@markovial - cache updating should be more reliable now, and if you experience similar problems you can debug caching issues on https://aisafety.info/questions/cache - on the line with allQuestions key, if you click Show value, there you can check the timestamp of last update (time in UTC, don't forget to convert to local time when comparing with your clock) or you can even copy&paste the whole line to a text editor (tripple click to select whole line in most browsers) where you can search for a question title to check what UI thinks is the Coda status of that question.

Screenshot 2023-06-05 at 12 46 35
Aprillion commented 1 year ago

Hopefully no more caching issues in #246 ... but let's keep that one open to track unexpected results if there are other issues 😓