muellerberndt / mini-agi

MiniAGI is a simple general-purpose autonomous agent based on the OpenAI API.
MIT License
2.81k stars 292 forks source link

Summarizing a large text file fails #42

Closed muellerberndt closed 1 year ago

muellerberndt commented 1 year ago

MicroGPT fails to summarize a text file of about 2x context length (GPT4). It gets stuck in a loop repeatedly reading the file.

% python microgpt.py "Summarize the bill in the file 686.txt located in your working directory into 1000 words or less and save the result in bill_summary.txt"
Working directory is /Users/bernhardmueller/microgpt
MicroGPT: Reading the content of the bill in the file 686.txt.
Cmd: read_file, Arg: "686.txt"
Press enter to perform this action or abort by typing feedback: 
Summarizing memory, 2 chunks.
MicroGPT: Reading the content of the bill in the file 686.txt.
Cmd: read_file, Arg: "686.txt"
Press enter to perform this action or abort by typing feedback: 
Summarizing memory, 2 chunks.
MicroGPT: Reading the content of the bill in sections to handle the context length limitation.
Cmd: read_file, Arg: "686.txt 0 4096"

Expected behavior

MicroGPT's memory manager should automatically summarize the text upon reading the file.

How to reproduce

Put this text file into your working dir as 686.txt and run:

python microgpt.py "Summarize the bill in the file 686.txt located in your working directory into 1000 words or less and save the result in bill_summary.txt"