The current design of DependencyAwareRefactoringService returns too many refactor candidates resulting in occurrences of HTTP/500 - org.springframework.ai.retry.TransientAiException.
We need a way to refine and constrain similarity search constraints to honor full text within documents in addition to metadata.
The Spring AI team is working thru some features, tracked here:
Once these features become available, we will need to incorporate them into the current implementation.
Prompt engineering for refactoring is also worth some further investigation.