Open-Source Wikis

/

GitLab

/

Packages

/

gitlab-active-context

gitlab-org/gitlab

gitlab-active-context

Backend-agnostic retrieval and embeddings framework. Powers Duo Chat, Code Review context, and search retrieval.

Source

gems/gitlab-active-context/. Used heavily from ee/lib/active_context/.

What it provides

  • A "Collection" abstraction: a logical store of documents (issues, MRs, code blobs, etc.).
  • Pluggable backends:
    • Postgres + pgvector.
    • ClickHouse with vector indexes.
    • Elasticsearch / OpenSearch.
  • A unified query API supporting both lexical and vector search.
  • Hybrid scoring (lexical + semantic).
  • Migrations for collections, similar in spirit to Elasticsearch reindexing migrations.

Why a gem

It's expected to be reused by other GitLab services (AI Gateway, Duo Workflow Service). Extracting it as a gem keeps it loosely coupled.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

gitlab-active-context – GitLab wiki | Factory