Skip to content

Refactor skill extraction and integrate semantic search for ranking - #13

Merged
MalakHisham121 merged 2 commits into
SH-code12:AI/DLfrom
MalakHisham121:AI/DL
May 17, 2026
Merged

Refactor skill extraction and integrate semantic search for ranking#13
MalakHisham121 merged 2 commits into
SH-code12:AI/DLfrom
MalakHisham121:AI/DL

Conversation

@MalakHisham121

Copy link
Copy Markdown
Collaborator

This pull request introduces major improvements to the reviewer recommendation system by integrating a semantic code search (vector database) for commit diffs, optimizing skill extraction to minimize LLM usage, and adding a batch skill extraction tool powered by a local LLM. These changes enhance both the quality and efficiency of reviewer recommendations, reduce reliance on external LLM calls, and improve the maintainability and extensibility of the codebase.

Semantic Code Search and Reviewer Boosting:

  • Integrated a new vector database pipeline using Nomic's embedding model and Chroma to index and search commit diffs, enabling semantic retrieval of historically similar code changes. This is used to identify and boost potential reviewers with relevant prior experience. (codience/src/Reviewer_Recommender/Data/commit_diff_vectordb.py, codience/src/Reviewer_Recommender/PRNew/Reviewer_Engine.py) [1] [2] [3] [4] [5]

  • Reviewer candidates found via vector DB are now included in the candidate pool and receive a scoring boost proportional to the number of matching code chunks. Their matched code diffs are also shown in the LLM prompt for transparency. (codience/src/Reviewer_Recommender/PRNew/Reviewer_Engine.py, codience/src/Reviewer_Recommender/PRNew/scorer_agent.py) [1] [2] [3]

Skill Extraction Optimization:

  • Refactored commit history skill extraction to use fast heuristics based on file extensions and keywords, eliminating most LLM calls for skill mapping and significantly reducing resource consumption. Commits are now indexed into the vector DB during this process for future semantic retrieval. (codience/src/Reviewer_Recommender/PRNew/commit_history_utils.py) [1] [2] [3] [4] [5]

Batch Skill Extraction Tool:

  • Added a new script for batch extraction of developer skills using a local Ollama LLM, allowing for rich, architectural skill profiling without external API costs. This tool fetches commit histories, summarizes diffs, and saves extracted skills to the cache. (codience/src/Reviewer_Recommender/PRNew/batch_skill_extractor.py)

Developer Experience and Codebase Cleanups:

  • Improved module imports and path handling for better portability and maintainability. (codience/src/Reviewer_Recommender/PRNew/Reviewer_Engine.py, codience/src/Reviewer_Recommender/PRNew/commit_history_utils.py, codience/src/Reviewer_Recommender/PRNew/llm.py) [1] [2] [3]
  • Updated .vscode/settings.json to set the default Python interpreter path for consistent development environments.

These changes collectively make the reviewer recommendation system more intelligent, efficient, and easier to extend for future enhancements.

…ement local LLM skill extraction, and apply performance-based candidate truncation.
@MalakHisham121
MalakHisham121 merged commit 8b0cdd3 into SH-code12:AI/DL May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant