Convert documentation tool for Claude 3
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
- In rails console enable the experiment fully
Feature.enable(:ai_claude_3_for_docs) Feature.enable(:ai_gateway_docs_search)
- Ask chat question related to documentation
- 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.