AI & RAG

Re-Index API Specs on GitLab Merge to Keep the Answer Bot Fresh

Watches GitLab merges to your API repo, detects changed OpenAPI specs and changelog files, re-chunks and re-embeds only what changed.

CategoryAI & RAG
Enginesim
Difficultyintermediate
Triggerevent
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab merge to default branchGitLabGitLab
  • ActionFetch diff and list changed spec/changelog filesGitLabGitLab
  • LogicFilter to spec and changelog paths only
  • ActionChunk per operation and embed changed filesOpenAI
  • ActionUpsert vectors and purge stale chunksPostgreSQLPostgres
  • OutputPost re-index summary to SlackSlack

What it does

On every merge to the default branch of your API repository, this pipeline finds which OpenAPI spec or changelog files changed, re-chunks and re-embeds just those files, and upserts the new vectors into Postgres while deleting stale chunks. The knowledge base stays current without a full re-index.

When to use it

Use it as the indexing backbone behind any API answer bot. Run it whenever specs change frequently and you can't afford the bot citing an endpoint that was renamed or deprecated last sprint.

How it works

  1. 1A GitLab merge event on the default branch triggers the flow.
  2. 2The diff is fetched to list changed `.yaml`/`.json` spec and changelog paths.
  3. 3A filter drops files outside the spec/changelog directories.
  4. 4Each changed file is chunked per operation and embedded with OpenAI.
  5. 5Vectors are upserted into Postgres, and chunks from deleted files are purged.
  6. 6A summary of what was re-indexed is posted to Slack for visibility.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Connect SlackChannels, DMs, threads, mentions.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.