AI Usage

For information on Analog Devices Inc. stance on AI usage, please see Responsible AI @ ADI

Pull request reviewer

The PR Agent is an AI-assisted pull request reviewer integrated into our CI/CD pipeline. It uses the same tooling already present in the workflow to provide contextual feedback on pull requests. It combines build checks, static analysis, style validation, and any other tool that is meaningful for the code base. It supports models from multiple vendors, cloud-hosted or self-hosted. The tool does not approve or merge code; final decisions remain with our reviewers, there is always a human-in-the-loop.

How it works

On dispatch, the agent runs in a read-only environment, compiles the code base, and validates issues and fixes against the actual build output. It then posts annotated feedback as a GitHub Summary with downloadable git patches and the agent session.

../_images/llm-run.svg

Figure 1 LLM run example.

Usage

Access is available to any user with write access to the analogdevicesinc GitHub organization. For third-party pull requests, an ADI developer can request a review on your behalf.

The workflow is included in each repository. Go to github.com/analogdevicesinc/<repository>/actions/workflows/llm.yml (for example, actions/workflows/llm.yml for this repository), click Run workflow, and enter the pull request number, branch, or Git SHA to review.

LLM Agent llm.yml 44 workflow runs Apr 7, 4:11 PM GMT+2 18m 54s Apr 7, 10:39 AM GMT+2 13m 1s Apr 2, 12:38 AM GMT+2 1m 13s Apr 2, 12:37 AM GMT+2 26s Apr 2, 12:13 AM GMT+2 3m 49s Apr 2, 12:02 AM GMT+2 51s Apr 1, 11:58 PM GMT+2 8s Apr 1, 11:09 PM GMT+2 57s Apr 1, 6:41 PM GMT+2 Actions Management New workflow All workflows LLM Agent Top Level Checks Runners Usage metrics Performance metrics Filter workflow runs Event Status Branch Actor This workflow has a workflow_dispatch event trigger. Run workflow LLM run 212 LLM Agent #64: Manually run by user main LLM run 411 LLM Agent #61: Manually run by user main LLM run 83 LLM Agent #58: Manually run by user pi LLM run 83 LLM Agent #57: Manually run by user pi LLM run 83 LLM Agent #54: Manually run by user pi LLM run 404 LLM Agent #53: Manually run by user pi LLM run 404 LLM Agent #52: Manually run by user pi LLM Agent LLM Agent #51: Manually run by user pi LLM Agent Use workflow from The branch, tag, PR number, or SHA tocheckout 1234 Prompt to use, overwrites the default Extra prompt to concatenate Model size. medium Branch: main Run workflow Run it 3 2 1 Go to ... analogdevicesinc/linux/actions/workflows analogdevicesinc/documentation/actions/workflows Set the referenceto review

How to dispatch a LLM run.

Optional inputs include additional prompt instructions and model size selection. The default prompt is defined in .github/workflows/llm.yml of each repository, for example .github/workflows/llm.yml. The LLM front-end used is pi.dev.

Once finished, the GitHub Summary contains the review, and the run artifacts include git patches with suggested changes and a session file to continue locally. An example run is available here.

You can download the patches as apply in one go with apply-patches.sh:

~$
apply-patches --repo=documentation 123456789

One liner to install:

~$
grep "/apply-patches.sh" ~/.bashrc || \
 { curl "https://raw.githubusercontent.com/analogdevicesinc/doctools/refs/heads/main/ci/scripts/apply-patches.sh" \
   -o ~/.local/bin/apply-patches.sh && \
 echo "source ~/.local/bin/apply-patches.sh" >> ~/.bashrc ; }