Fixes random questions being answered by Tanuki Bot
What does this MR do and why?
Related to https://gitlab.com/gitlab-org/enablement-section/tanuki-bot/-/issues/36+
We are questions not related to Gitlab documentation being answered by Tanuki Bot. We only want to respond if something is within this context.
Fixes:
- Set
temperature
to0
. The API defaults to1
which is random and0
is deterministic. In the POC we used0
. - Don't return sources if the answer is "I don't know".
- Add a filter for minimum neighbor distance so that we don't include results that are dissimilar. See this discussion.
Next steps: delete the following records from staging and production (and local environments): Embedding::TanukiBotMvc.where.not("content ~ ?", '\w').pluck(:id)
. These records contain only characters which is considered a close relative to anything not to with Gitlab documentation.
Screenshots or screen recordings
N/A
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Madelein van Niekerk