Add reflection pattern to `agbench lint`
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
tiktokenlibrary to the dependencies inpyproject.toml.
Enhancements to Document Class:
- Added a new
linesfield to theDocumentclass to store the document as a list of strings. - Updated the
load_log_filefunction to populate thelinesfield in theDocumentclass.
Improvements to Qualitative Coding:
- Introduced a new
MAIN_PROMPTfor generating error codes inoai_coder.py. - Implemented the
count_tokensfunction to count tokens using thetiktokenlibrary. - Enhanced the
code_documentmethod 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.
@changliu2 and @shiprajain01 fyi
Generally looks good, but it's failing the CI.
Generally looks good, but it's failing the CI.
Working with @jackgerrits to resolve it. Not sure what's causing all the uv errors.
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
@jackgerrits , I changed my uv to 0.5.18 but I am still stuck in uv.lock rabbit hole. Help!
@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 please go ahead.