ChatDev does not continue from where it left off
Someone else posted that ChatDev can not update existing warehouse code. That could also mean improving the existing project if the output was not good enough. This issue is only for getting ChatDev to continue where it left off if it crashes. I suppose another prompt would have to be implemented to tell the GPT model that it is reviewing a previous session for each chat bot up until all the information has been reviewed by it, and then tell it to continue where it left off.
Another idea I had to reduce the amount of information that a session must rely on, is to open isolated sessions for each chatbot without opening the terminal for the user, and all of the chatbot sessions have the conversation within a master session that is not a chatbot itself. If one of the chatbots crash, then the master session can detect it, start a new session, give all the previous information to the isolated session, and then tell it to pick up where it left off once it is that particular chatbot's turn to do processing.
I would try to contribute to doing this myself, but I'm running a small business on top of working on my own software, which is what I was hoping ChatDev would be able to come in handy with, and save me a lot of time. I will fork this off to work on a bit if I get some time, and see if you find anything I do to this as being helpful.
Anyhow; is there a forum for this software? I didn't really want to open issues just to ask questions about it. I pretty much want to know why it crashes so much. I thought maybe it has to do with the size of the program, and chatGPT just not being able to work with too much information at a certain point. But then I also tried getting it to reproduce some software that is available here that has been built by ChatDev, and it crashed on me for those too.
Maybe you all already do this, I don't know. But here's my idea:
This would potentially have the benefit of allowing a designer chatbot describe a higher level design of the program to identify inputs and outputs, and then identify all the tasks to be performed for its' processing, as well as a good label for each of the described tasks that need to be processed.
Then for the higher level processing designer: Two other chat bot sessions can take turns to identify all of the inputs and outputs for each of the processing labels of the tasks that were identified, while taking the inputs and outputs of the higher level design into consideration, and identify how different data components would best be represented, such as structs, linked lists, global variables, variables that would only be local to particular functions, etc. The reason they would take turns, and why there would be two of them, is so that they can check the work within the context that they are checking someone else's work, so that it will be more inclined to avoiding a bias that it was already correct, in order to output a more logical design. Also the reason why there would be two of them, is so that it would have two streams of prompts that could serve as the memory for each, and they may identify things in previous versions of the design that were actually useful.
Now for the lower level programming. I suppose there could be what is considered the "Dungeon Master" of the whole conversation. This could isolate each labeled task into separate and isolated conversations of three bots, one manager and two psuedocoders each. Each session, and sub-session, will have it's task noted in a file, perhaps an XML file. This could be in a nested format. Directories and files associated with each level will be logged into this file. The "Dungeon Master" writes to this main file if any of the sub-level XML files indicate an update to their nested structure. Each sub-level contains an XML file laying out the complete nested hierarchy of nested structures from from itself as a root, as well as the status of the particular session within the nest of layers. Status can be "processing" or "closed." All data within a session remain on the hosts computer.
The psuedocoders lay out the logic of each of the tasks, while identifying further sub-tasks. When identifying further sub tasks, they should use comments to briefly describe the job each need to perform, along with the inputs and outputs for the given sub-task. They would use psuedocode in order to allow for smaller prompts for the two cha tbots to work together on in order to reduce the chance of a conversation crashing, and to increase the chance of the design of the task being more logically correct.
Each manager within each of the groups has the same job as the "Dungeon Master." It can generate more sub-groups to work in isolation on the identified sub-tasks, in the same way it's group that it was spawned from did. Conceptually this would be like nested function calls, except in this scenario it would be nested job creation, unless there is a term for that already.
Once all the psuedocode is created for any given task, even for the higher levels of the nested jobs, the pseudocoder bots are swapped out with the programmers of the chosen language, and the work on translating the psuedocode into the language, on their own isolated source code files, until all of the sub-tasks are complete. So these can have a psudocode source code file saved, along with a real programming language source file saved. These could be saved for later improvement, correction, or for reference in the event of a crash of a chatbot that will need to be restarted for it to be prompted on what it needs to work on.
For each top-level task, there is a master source file. The manager also adds the file of the completed code of it's sub-tasks to a list. Once all sub-task of every every higher-level task, all the way to the root task, is complete; next-to lowest-level manager for the nests of each task copies the completed source code into it's master source-file, then closes out the sub-task conversation, thus ending the sub-session along with closing out its' bots within that session. This process takes place all the way to the very top-level, so that all of the conversations eventually come to a close, except for one.
Even though sessions become closed, the data from their session can be copied into a new session on the same level, in case an update needs to be made, or a correction needs to be made. This would allow for minimal quantity of token transactions within a session for an update of a component that needs to be made.
The inputs, outputs, and other data components that were previously identified would also be handled by a manager and two chat bots, in isolation at first, in order to design their implementation as derived from the higher-level design, but should become available for communication with the other chat bot conversations to only if any of them decide that something about that data needs to be changed, such as an int needing to really be a float. Another reason this section wold be handled a lot like the others in this way, is in the case that certain methods need to be developed in order to handle certain aspects of this data, such as methods needed in order to free memory from linked lists, change pages of linked lists, or other things that are only for accessing the data that the other tasks need to be able to do. The manager would relay this information to all other high-level managers of conversations that use that piece of information that needs to be updated, so that these managers can pass the message down to each of the sub-level managers that use the particular piece of data, so that each can make the necessary changes, or be given access to the specific methods related to the specific data that the particular tasks need to access. Due to it's job at making methods to access or modify the data, when it needs to do that, then this task group should be ran before the other top-level task groups.
This would allow for full modularity for each of the components of the software being designed. Each manager can restart a sub-session if it crashes, which would reduce the number of token transactions, in comparison to the token transactions required for the entire conversation of the whole program that is being developed, for what is needed to get that conversation back up-to-date in order for that particular dev team to get back to work from where it left off at on the particular module that it is currently working on. If the particular module that a group of two chat coders are working on crashes more than maybe twice, then perhaps the manager over them could prompt the team to redesign the piece to be composed of more than one function that will have their inputs and outputs in the comments above each of these sub-methods, which the manager will then spawn sessions for.
Each manager does not necessarily need to be a GPT chat bots themselves, since they have limited functionality. They do no designing. They simply pipe messages through chains of other managers, as well as close and open sub-sessions. So these do not need to cost in token transactions more than what they do when prompting a GPT model with a pre-defined prompt.
So if this is already what's being done, then that's cool. I just can't figure out why it crashes so much if this is the case.
Update
I thought of more stuff. All parts of the source code should have a reference ID that can be identified from within the XML file that contains the work and conversation history of that particular module.
Code Testing Process:
If the code is one that needs to be compiled:
The "Dungeon Master," or root session's non-LLM chat-bot can attempt to compile a copy of the code within an environment that will not mess up the host machine's files, once all the spawned sessions have completed their jobs. This would rely on instructions provided from prompting the designer chatbot on the command required to compile the code. (I have had GCC delete source code files due to some logical error I made in the C code itself.) Upon compilation failure, the ID number will be copied from the comment of the first section that the compiler identifies a problem with , the ID of the section before the identified failure point and/or the ID of the section(s) that call the section that the compiler identified the first problem with. All of this process can occur on a copy of the entire project. This process can repeat until the code compiles without error.
If the code is compiled, of if the code is a language that does not need to be compiled, is not doing the job it needs to do:
The program can notify the user that the program can now be tested, preferably in a VM. ChatDev can ask the user if the program works as expected. If yes, then the ChatDev program can just be closed. If no, then the user can tell it what did not work as expected, and ChatDev can respawn the designer session, ask it for the label of each task that may have errors that caused the stated problem, then spawn all of the associated high-level sessions, and ask these sessions which part of the pseudocode played a part in the stated problem, and repeat this as the sessions work all the way down to the sessions that need to redesign to address the stated problem.
Once finished, then the code testing process repeats until the user is satisfied with the software that ChatDev produced.
Thank you for your good advice. We are in the process of planning and designing incremental software development, and expect to release this feature soon (expected within a few weeks).
We think your idea is very interesting. Our understanding is a hierarchical task solution based on XML files. It is true that ChatDev currently only supports full task completion (software development), and there is no autonomous division of labor or hierarchical task organization. We'll continue to think about this idea and incorporate it into our projects if appropriate (and of course we look forward to your further ideas, comments, or pull requests if you'd like to contribute).
Thank you for your question and hope you can enjoy ChatDev! 😀
Downstream tasks are called from upstream, so once it breaks down the requirements those get passed more or less directly to the end worker. That's my simple understanding.
Perhaps instead of keeping everything local, a new chain is created to check for issues on the repo, and work those.
If it starts by decomposing an app idea into many smaller tickets, with details around what it entails, what the requirements are, etc, it doesn't need to store them locally and you can add comments better explaining how you want it done.
This way you can open your own issues or let it create new ones as it identifies bugs. At launch, it can select one, and start working through it until implemented, doing a pr for a human to accept if functional.
Might allow larger, more complex projects with ongoing human feedback?
I'm working on a system that implements progressive hierarchical organization of inputs with features for both deep memory and short-term memory Here's the project : https://github.com/Nbtguyoriginal/PyCells
In theory this system in its current state Pycells.py specificly could easily be used to store and retrieve information for a progress based implementation of chatdev
Alternatively I have also started a repository for my project : https://github.com/Nbtguyoriginal/Pybonce
Wich in essence does what is being suggested here but in a bit of a diffrent way
Simply put it allows a user to specify how big standard functions are in there code base and iterate over the whole code base and look for modifications or other specific criteria It uses advanced logging techniques to construct multiple types of txt files that can lead a new instance of an llm threw modifications to the codebase (warp function) (wip)
In totality I'm loving chatdev and would like the chatdev team to take a look these to projects and consider making them a standard part of the (CD) environment
On Tue, Sep 26, 2023, 1:48 PM Sean Connelly @.***> wrote:
Downstream tasks are called from upstream, so once it breaks down the requirements those get passed more or less directly to the end worker. That's my simple understanding.
Perhaps instead of keeping everything local, a new chain is created to check for issues on the repo, and work those.
If it starts by decomposing an app idea into many smaller tickets, with details around what it entails, what the requirements are, etc, it doesn't need to store them locally and you can add comments better explaining how you want it done.
This way you can open your own issues or let it create new ones as it identifies bugs. At launch, it can select one, and start working through it until implemented, doing a pr for a human to accept if functional.
Might allow larger, more complex projects with ongoing human feedback?
— Reply to this email directly, view it on GitHub https://github.com/OpenBMB/ChatDev/issues/94#issuecomment-1736009390, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJCVUCZSFQJUXKW7NLHZ2TX4MIOXANCNFSM6AAAAAA5GJYGGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I'm very grateful for your suggestions and your attention to the development of ChatDev. We are also considering incorporating a memory feature into our product. If needed, we will proactively reach out to you. Please stay tuned for our updates.😊
I'm working on a system that implements progressive hierarchical organization of inputs with features for both deep memory and short-term memory Here's the project : https://github.com/Nbtguyoriginal/PyCells In theory this system in its current state Pycells.py specificly could easily be used to store and retrieve information for a progress based implementation of chatdev Alternatively I have also started a repository for my project : https://github.com/Nbtguyoriginal/Pybonce Wich in essence does what is being suggested here but in a bit of a diffrent way Simply put it allows a user to specify how big standard functions are in there code base and iterate over the whole code base and look for modifications or other specific criteria It uses advanced logging techniques to construct multiple types of txt files that can lead a new instance of an llm threw modifications to the codebase (warp function) (wip) In totality I'm loving chatdev and would like the chatdev team to take a look these to projects and consider making them a standard part of the (CD) environment … On Tue, Sep 26, 2023, 1:48 PM Sean Connelly @.> wrote: Downstream tasks are called from upstream, so once it breaks down the requirements those get passed more or less directly to the end worker. That's my simple understanding. Perhaps instead of keeping everything local, a new chain is created to check for issues on the repo, and work those. If it starts by decomposing an app idea into many smaller tickets, with details around what it entails, what the requirements are, etc, it doesn't need to store them locally and you can add comments better explaining how you want it done. This way you can open your own issues or let it create new ones as it identifies bugs. At launch, it can select one, and start working through it until implemented, doing a pr for a human to accept if functional. Might allow larger, more complex projects with ongoing human feedback? — Reply to this email directly, view it on GitHub <#94 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJCVUCZSFQJUXKW7NLHZ2TX4MIOXANCNFSM6AAAAAA5GJYGGI . You are receiving this because you are subscribed to this thread.Message ID: @.>
so can it continue to work on a warehouse after the initial completion as yet? for instance - 'continue on xyz but now incorporate this feature abc'