helpers icon indicating copy to clipboard operation
helpers copied to clipboard

Create AI reviewer script

Open gpsaggese opened this issue 7 months ago • 2 comments

We want to create a system similar to llm_transform, called ai_reviewer.py that

  1. Read the file from https://github.com/causify-ai/helpers/pull/710#discussion_r2089201962

  2. Run the checks from the file and create a file similar to the linter with the violations to the our rules from the guidelines

  3. Then we can use llm_apply.py to fix the problems automatically but this requires human supervision. The flow I use is something like:

    • Use ai_reviewer.py to find the problems as cfile
    • Jump around accepting / rejecting the suggestions
    • Use llm_apply.py to utilize LLMs to address the issues (we can apply changes in multiple commits, e.g., by type of violation). It seems that giving all the rules at once, confused the LLMs

Most of the code (if not everything) is already in llm_transform.py and llm_apply.py, we just have to stitch things together.

Let me know if you want PP to build the skeleton. Then we can start outsourcing testing and adding more stuff to the good collaborators

gpsaggese avatar May 14 '25 15:05 gpsaggese

Some notes from this AM discussion

  • The goal is to create a script ai_reviewer.py
    • Automate the usual complaints
    • People run the script, fix the code by hand (or use llm_apply to fix them, but then they won't learn)
    • Submit code that doesn't upset the reviewers too much

gpsaggese avatar May 21 '25 15:05 gpsaggese

Merged the script from @sonniki

Next steps are

  • Merge my code on top of it
    • inject_todo.py
    • Split the md files into chunks for different "targets" (e.g., linter, llm, correctness)

gpsaggese avatar May 28 '25 14:05 gpsaggese