Similarity Search is an automated part of the code review process that finds the patterns, implementations and definations to verify the code implemented is correct
Similarity Search is only available on PRO plan.
Similarity Search is an automatic review step that compares every new or modified function call in your pull request with existing definitions across the repository.
It then checks whether the way the engineer is using that function matches the original implementation’s contract (required parameters, return value, side-effects, etc.).
When a mismatch is detected, the reviewer leaves an inline suggestion that pin-points:
Example The screenshot below shows
isValidUrl
being invoked with two parameters even though its definition only accepts one. Similarity Search detected the mismatch and suggested the one-line fix.
We use ast-grep for syntax-aware matching between new or modified call-sites and existing symbol definitions across the repository.
Similarity Search is on by default for all repositories. You can use the setting Enable Similarity Search
option in the Matter AI configurations to enable or disable it.