Skip to content

Fixes random questions being answered by Tanuki Bot

Madelein van Niekerk requested to merge tanuki-bot/bugfix-36 into master

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 to 0. The API defaults to 1 which is random and 0 is deterministic. In the POC we used 0.
  • 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.

Edited by Madelein van Niekerk

Merge request reports