joachim-gassen / botex

Use LLMs as participants in oTree experiments
MIT License
7 stars 1 forks source link

Added a separate history for botex_db, that is different from the con… #9

Closed fedossa closed 2 months ago

fedossa commented 2 months ago

…v_hist that is passed to the llm. Updated tests to reflect this.

Here we add a separate history for the botex_db, this is meant to ensure that all interaction with the llm make their way to the botex_db. On the other hand conv_hist which is passed to the llm remains functional, in that we try to avoid bloating the history by not passing all the error correction back and forth between the llm and botex. Additionally, the tests for the conversation being completed have to be updated so that they check the last accepted answer in botex_db, in case there has been some error handling.

joachim-gassen commented 2 months ago

Thanks! I decided to rewrite the approach a bit as I felt that the code was getting a little bit duct-tapy. While testing it I came across an error of local LLMs that our prompting did not address to well (summaries that are represented by the LLM as a json object with several keys), so I also changed some prompts. It looks OK for me now but please run some tests on your end to see whether everything works for you.