4 ms·
> In the planning phase, GPT-4 receives a tree of tasks and a summary of code base (list of files and their descriptions). It replies with updated tasks (i.e. i
by cloudking 4y ago
> In the planning phase, GPT-4 receives a tree of tasks and a summary of code base (list of files and their descriptions). It replies with updated tasks (i.e. it is able to create sub-tasks as needed), the task it wants to work on in the next step and a list of relevant code fragments for that task.
Are you passing the original task in each prompt? If not I think that it's going to lose context of what it's trying to build overall.
How are you deciding what are relevant code snippets to send?
- killerstorm 4y ago> Are you passing the original task in each prompt? Currently yes. Planning: Prompt + Code base summary + All tasks Code gen: Prompt + All tasks + Current task + Existing code All tasks include the original task. > If not I think that it's going to lose context of what it's trying to build overall. It can be a problem but there's a lot of room for improvement. An obvious optimization would be to hide subtasks of completed tasks. Then, perhaps hide subtasks until model decides to focus on a particular part of the tree. Summarization is also a possible strategy, e.g. LangChain uses that approach extensively. But I think once 32k GPT-4 it might be able to do quite a lot without these tricks. > How are you deciding what are relevant code snippets to send? Model receives a full list of files as well as fragments in each file. It can then select which fragments are needed for a selected task (in the generated output task_id is before the list of relevant files). E.g.: https://gist.github.com/killerstorm/dd6e26dc80064b7fc731d583f8d740c1#file-ktor_reddit-txt-L136 https://gist.github.com/killerstorm/dd6e26dc80064b7fc731d583... selected_task_id: t_0_2_3_2 required_code_fragments: src/models/Comment.ts: - class_definition