Skip to content

Conversation

@NagaprasadNaik
Copy link

@NagaprasadNaik NagaprasadNaik commented Jun 20, 2025

Problem Statement:

Writing clear and detailed pull request (PR) descriptions for OpenMP in the LLVM project takes a lot of time and often lacks consistency. Developers need a simple way to automatically create good PR summaries that also follow the OpenMP specification.

Objectives:

  • Build a Clang CLI tool to automatically generate structured PR descriptions.
  • Use code diffs and OpenMP spec content to create accurate summaries.
  • Integrate Generative AI to write clear and informative descriptions.
  • Make it easy for developers to get spec-aware PR summaries with just a PR number.

Methodology

  • Fetch PR Data: Retrieve pull request title, changed files, and code diffs from GitHub using the PR number.
  • Extract Title & Patches: Separate and store the PR title and code changes for analysis.
  • Keyword Extraction: Identify key terms from the title and patch by removing stopwords and irrelevant tokens.
  • Spec Matching: Match extracted keywords to relevant sections of the OpenMP specification using text similarity.
  • AI Summary Generation: Use a GenAI model (LLaMA3-70B) to generate a structured PR description using the patch and matched spec section.

How to Run

  • Install python 3.10+
  • Create a python environment and activate
python -m venv envname
source envname/bin/activate #for mac or linux
Script/activate #for windows
  • Install the required dependencies
pip install -r requirements.txt
  • Run app.py
python app.py

Images of the Solution

Screenshot 2025-06-20 at 10 25 51 PM
Screenshot 2025-06-20 at 10 26 08 PM

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