diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-26 21:11:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-26 21:11:56 +0300 |
commit | ea413f31cf00268c71bfab1351b92f75e72c9a80 (patch) | |
tree | 40d55fd066fd6ef9d901d66f006bde24ee2836bb /doc/development | |
parent | 5ef8690cb95a549153572811313b1401e77cef2d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/ai_features/index.md | 29 | ||||
-rw-r--r-- | doc/development/utilities.md | 2 |
2 files changed, 2 insertions, 29 deletions
diff --git a/doc/development/ai_features/index.md b/doc/development/ai_features/index.md index 4401a7e3fb1..2c6bec530cd 100644 --- a/doc/development/ai_features/index.md +++ b/doc/development/ai_features/index.md @@ -131,36 +131,9 @@ Gitlab::CurrentSettings.update!(anthropic_api_key: <insert API key>) ### Populating embeddings and using embeddings fixture -Currently we have embeddings generate both with OpenAI and VertexAI. Bellow sections explain how to populate +Embeddings are generated through VertexAI text embeddings endpoint. The sections below explain how to populate embeddings in the DB or extract embeddings to be used in specs. -FLAG: -We are moving towards having VertexAI embeddings only, so eventually the OpenAI embeddings support will be drop -as well as the section bellow will be removed. - -#### OpenAI embeddings - -To seed your development database with the embeddings for GitLab Documentation, -you may use the pre-generated embeddings and a Rake task. - -```shell -RAILS_ENV=development bundle exec rake gitlab:llm:embeddings:seed_pre_generated -``` - -The DBCleaner gem we use clear the database tables before each test runs. -Instead of fully populating the table `tanuki_bot_mvc` where we store OpenAI embeddings for the documentations, -we can add a few selected embeddings to the table from a pre-generated fixture. - -For instance, to test that the question "How can I reset my password" is correctly -retrieving the relevant embeddings and answered, we can extract the top N closet embeddings -to the question into a fixture and only restore a small number of embeddings quickly. -To facilitate an extraction process, a Rake task been written. -You can add or remove the questions needed to be tested in the Rake task and run the task to generate a new fixture. - -```shell -RAILS_ENV=development bundle exec rake gitlab:llm:embeddings:extract_embeddings -``` - #### VertexAI embeddings To seed your development database with the embeddings for GitLab Documentation, diff --git a/doc/development/utilities.md b/doc/development/utilities.md index 343d03b9d68..83b87d6d289 100644 --- a/doc/development/utilities.md +++ b/doc/development/utilities.md @@ -206,7 +206,7 @@ Refer to [`strong_memoize.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/maste # good def expensive_method(arg) - strong_memoize_with(:expensive_method, arg) + strong_memoize_with(:expensive_method, arg) do # ... end end |