StampyAI / stampy-ui

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

Chatbot: human-written responses #376

Closed melissasamworth closed 4 months ago

melissasamworth commented 8 months ago

Acceptance criteria

Everything besides CSS (Nemo, Buddy)

CSS (Melissa, Archana)

Links https://www.figma.com/file/qqfeYAh6Z7QdyJXsQjIUfh/Stampy?type=design&node-id=1156%3A19268&mode=dev&t=9lrQdhpZsKoF1qGs-1

melissasamworth commented 6 months ago

Update: Still need to

melissasamworth commented 6 months ago

Status: available to work on CSS right now

melissasamworth commented 5 months ago

@mruwnik human written responses currently never show, it's always just a bot still!

varchanaiyer commented 5 months ago

Feedback from Nemo:

the problem with that first click is that it needs to know what articles are available. So the way it works is:
- if the question asked (or clicked) is a known article, then just show that
- if the question is similar to a known article (0.9 similarity, I think), then show that
- otherwise, just call the chatbot

The issue here is that the second step only works when there is a set of known articles available (option 1 uses direct page ids, so is fine).
When the page is loaded, it fetches a list of article titles as well as an embedding matrix. For smaller queries (<= 2 words) or until the embedding matrix has been downloaded, articles are searched with a regex. For longer phrases (assuming the embeddings are available), the embedding is used. This works fine, as long as the embedding and/or list of article titles are available. The problem with this is that it can take a while for them to download. So if you open the chatbot, for the first second or two, you won't have search initialised. Which is why when you click on one of the suggested questions, the chatbot starts running
This isn't a problem with the followup questions, as they use the first mechanism, and contain ids to the articles they're pointing at, which allows them to be direct links
So the problem here is that Coda takes too long to respond
2 things that come to mind are checking whether the response from Coda is compressed, and limiting the amount of data returned from Coda - it's possible that it also returns the actual article contents along with the `titles`

This means that we need to figure out a way to improve the load time from coda. Potentially do some kind of pre-fetch?

varchanaiyer commented 5 months ago

https://github.com/StampyAI/stampy-ui/pull/634

Human Written Responses UI changes done and responses turn after the first quuestion

melissasamworth commented 4 months ago

Update: there are still issues with styling. I imagine Bryce has found it all so let's try to find his tickets

varchanaiyer commented 4 months ago

Sure. Let me know if you need me to fix any particular styling issue

melissasamworth commented 4 months ago

I'm getting obsessed with putting my feedback in videos. @zarSou9 let me know if you feel like doing this one https://www.loom.com/share/113f934107ee45f7b88768c7d61c42d2

zarSou9 commented 4 months ago

Yeah, that sounds good, I'll start it now. Big fan of the videos too. Writing is much yucky