Skip to main content

PR Duplicate Detection

Simili Bot v0.2.0 can detect duplicate pull requests by indexing PR content in a dedicated Qdrant collection and performing semantic search at PR open time.

How it works

  1. PR content is embedded: title + body + changed file paths
  2. Qdrant is searched for similar items in both the issues collection and the PR collection
  3. Candidates are ranked by similarity score
  4. Optionally, an LLM gives a duplicate verdict on the top candidates
  5. Results are returned as JSON (or posted as a comment, when run via GitHub Actions)

Setup

1. Configure a PR collection

In .github/simili.yaml:
If pr_collection is omitted, PRs are stored alongside issues in the main collection.

2. Index existing PRs

Before the bot can find duplicates, your PRs must be indexed:
Or via GitHub Actions (bulk index workflow).

3. Create a PR triage workflow

Create .github/workflows/simili-pr.yml:

Running from the CLI

Check a specific PR for duplicates:
With custom threshold:

Example output

What gets embedded

The following content is combined for the PR embedding:
Including changed file paths improves matching accuracy for code-level duplicate detection.

Tips

  • Index PRs regularly — run simili index --include-prs=true on a schedule to keep the PR collection fresh.
  • Set a dedicated pr_collection — this keeps PR and issue search results cleanly separated.
  • Tune the threshold — for stricter duplicate detection, raise --threshold to 0.80 or higher.
  • Use LLM reasoning — the bot’s LLM verdict provides human-readable reasoning about why two PRs are considered duplicates.

Next steps

PR duplicate CLI reference

Full command options

Index command

Index issues and PRs

Configuration schema

Configure PR collection