autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Add reflection pattern to `agbench lint`

Open gagb opened this issue 9 months ago • 7 comments

This pull request includes several changes to the agbench package, focusing on adding new functionality, improving existing code, and updating dependencies. The most important changes include adding a new dependency, modifying the Document class, enhancing the code_document method, and introducing a new prompt for qualitative coding.

Dependency Updates:

  • Added the tiktoken library to the dependencies in pyproject.toml.

Enhancements to Document Class:

  • Added a new lines field to the Document class to store the document as a list of strings.
  • Updated the load_log_file function to populate the lines field in the Document class.

Improvements to Qualitative Coding:

  • Introduced a new MAIN_PROMPT for generating error codes in oai_coder.py.
  • Implemented the count_tokens function to count tokens using the tiktoken library.
  • Enhanced the code_document method to handle long documents, generate feedback, and update codes based on feedback. [1] [2] [3]

These changes aim to improve the accuracy and efficiency of the qualitative coding process in the agbench package.

gagb avatar Mar 21 '25 02:03 gagb

@changliu2 and @shiprajain01 fyi

gagb avatar Mar 21 '25 02:03 gagb

Generally looks good, but it's failing the CI.

afourney avatar Mar 21 '25 18:03 afourney

Generally looks good, but it's failing the CI.

Working with @jackgerrits to resolve it. Not sure what's causing all the uv errors.

gagb avatar Mar 25 '25 18:03 gagb

More features to add based on Chang's feedback

  • Can you add a feature to summarize that into counts, like 3 counts for a red code "xyz", and 2 counts for a red code "abc" like in the M1 paper?
  • The LLM non-determinism is an issue. Would it be a good idea if we set into temperature to 0 and top_p to 1, or even fix seed?
  • I repeated the run twice; the red categories were quite inconsistent
  • allow switching the model
  • batch summarization

gagb avatar Mar 25 '25 18:03 gagb

@jackgerrits , I changed my uv to 0.5.18 but I am still stuck in uv.lock rabbit hole. Help!

gagb avatar Mar 26 '25 18:03 gagb

@jackgerrits , I changed my uv to 0.5.18 but I am still stuck in uv.lock rabbit hole. Help! @gagb , Nice work Sir ! CI is failing—can I help update this so it passes?

tejas-dharani avatar Aug 06 '25 11:08 tejas-dharani

@tejas-dharani please go ahead.

ekzhu avatar Aug 06 '25 21:08 ekzhu