Skip to content

Convert documentation tool for Claude 3

Gosia Ksionek requested to merge mk-claude-3-gitlab-documentation-tool into master

What does this MR do and why?

The code changes are related to a feature called "Tanuki Bot" and its integration with GitLab's AI features. The main change is switching the underlying AI model used by Tanuki Bot from Claude 2.1 to Claude 3 (specifically, Claude 3 Sonnet). Those changes are behind ai_claude_3_for_docs feature flag.

Additionally, there are updates to the logic for extracting content from documents as previous method was not effective.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. In rails console enable the experiment fully
    Feature.enable(:ai_claude_3_for_docs)
    Feature.enable(:ai_gateway_docs_search)
  2. Ask chat question related to documentation
  3. See results

Important: both feature flags need to be on to display the sources for questions. Otherwise source search is not working. Since ai_gateway_docs_search is now default enabled, I decided to optimize for this path.

Edited by Gosia Ksionek

Merge request reports