What are good ways to rerank results after I’ve done cosine similarity searches on…
- User
What are good ways to rerank results after I’ve done cosine similarity searches on embeddings of summaries of bugs, when building a bug report duplicate/similarity detection system?
Assistant
For reranking bug report similarity results after initial cosine similarity searches, I'd recommend:
-
Cross-encoder models - Apply a transformer that processes bug pairs together to capture nuanced relationships beyond what vector similarity can detect
-
Domain-specific features - Incorporate error codes, stack traces, component tags, and affected versions as additional signals
-
BM25/lexical similarity fusion - Combine semantic similarity with keyword matching since duplicates often share specific error messages or technical terms
-
Temporal weighting - Consider recency of bugs, as duplicates typically cluster in time
-
Classification features - Train on known duplicate pairs using features like comment overlap, developer assignments, and priority levels
-
Contextual boosting - Prioritize bugs from the same product area or with similar user impact
Cross-encoders are particularly effective despite being computationally heavier than the initial embedding search, as they produce much higher quality reranking when applied to your top candidates.
Would you like me to elaborate on any of these approaches?
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.