Skip to content
Snippets Groups Projects

fix: vertex ai search datastore is not working

Merged Shinya Maeda requested to merge fix-vertex-ai-search-datastore-not-working into main
All threads resolved!

What does this merge request do and why?

This MR fixes the issue that the newly created search app & data store for GitLab documentation semantic search is not working. After the investigation, it turned out that the solution_types=[SolutionType.SOLUTION_TYPE_SEARCH] must be set to the DataStore.

This MR also improves the data store quality by explicitly specifying the schema. This is documented in https://cloud.google.com/generative-ai-app-builder/docs/provide-schema as "Provide the schema as a JSON object". More specifically, setting keyPropertyMapping gains the search performance as it's described in the doc. You can see the evaluation result in !1990 (comment 2367572640).

We'll create v17.9 and 17.10 search app & data store after this fix has been merged via the regular ingestion process.

Related to https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/797+

How to set up and validate locally

  1. Check out this feature branch.

  2. Run the ingestion locally. Example:

    export GCP_PROJECT_NAME="ai-enablement-dev-69497ba7"
    export SEARCH_APP_NAME="sm-gitlab-docs-test"
    export GITLAB_DOCS_REPO="https://gitlab.com/gitlab-org/gitlab.git"
    export GITLAB_DOCS_REPO_REF="master"
    export GITLAB_DOCS_CLONE_DIR="/tmp/gitlab-org/gitlab"
    export GITLAB_DOCS_JSONL_EXPORT_PATH="/tmp/gitlab-org/gitlab/docs.jsonl"
    export GITLAB_DOCS_WEB_ROOT_URL="https://gitlab.com/help"
    
    make ingest > ingest.log 2>&1
  3. Test the newly created search app in GCP console.

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Shinya Maeda

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Mark Chao left review comments without approving or requesting changes

    left review comments without approving or requesting changes

  • Mark Chao requested review from @brytannia

    requested review from @brytannia

  • Mark Chao removed review request for @lulalala

    removed review request for @lulalala

  • Tetiana Chupryna approved this merge request

    approved this merge request

  • Tetiana Chupryna resolved all threads

    resolved all threads

  • Tetiana Chupryna enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • Tetiana Chupryna mentioned in commit 2304d9b3

    mentioned in commit 2304d9b3

  • Please register or sign in to reply
    Loading