From 23385eb1874f746ec50de07c7ee45bdf3a66e71d Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Sun, 21 May 2023 22:13:31 -0700 Subject: [PATCH 1/7] Update ctags.md --- docs/ctags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ctags.md b/docs/ctags.md index cdad9e718..2f4e3dfd9 100644 --- a/docs/ctags.md +++ b/docs/ctags.md @@ -31,7 +31,7 @@ Most real code is not pure and self-contained. And many common code changes require you to understand related code from many different files in a repo. If you want GPT to "switch all the print statements in Foo to use the logging system", it needs to see the code in the Foo class -with the prints, and it also needs to understand how the logging +with the prints, and it also needs to understand how the project's logging system works. A simple solution is to **send the entire codebase** to GPT along with From 2bee941ff94ef4d3bb3e32ce56e43282defd6bf4 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Sun, 21 May 2023 22:14:02 -0700 Subject: [PATCH 2/7] Update ctags.md --- docs/ctags.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ctags.md b/docs/ctags.md index 2f4e3dfd9..c3aa580f6 100644 --- a/docs/ctags.md +++ b/docs/ctags.md @@ -22,8 +22,8 @@ GPT-4 is great at "self contained" coding tasks, like writing or modifying a pure function with no external dependencies. These work well because you can send GPT a self-contained request ("write a Fibonacci function") and it can create new code from whole cloth. Or -you can send it an existing function implementation and ask for self -contained changes ("rewrite the loop using list +you can send it an existing function implementation and ask for self-contained +changes ("rewrite the loop using list comprehensions"). These require no context beyond the code being discussed. From 85cd9e833a69f2a345b310afd7ef241667e31ec7 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Sun, 21 May 2023 22:16:43 -0700 Subject: [PATCH 3/7] Update ctags.md --- docs/ctags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ctags.md b/docs/ctags.md index c3aa580f6..a653950ad 100644 --- a/docs/ctags.md +++ b/docs/ctags.md @@ -71,7 +71,7 @@ aider/ Mapping out the repo like this provides some benefits: - - GPT can see variables, classes, methods and function signatures from everywhere in the repo. This alone may give it enough context to solve many tasks. For example, it can probably figure out how to use the API exported from a module based on the details shown in the map. + - GPT can see variables, classes, methods and function signatures from everywhere in the repo. This alone may give it enough context to solve many tasks. For example, it can probably figure out how to use the API exported from a module just based on the details shown in the map. - If it needs to see more code, GPT can use the map to figure out by itself which files it needs to look at. GPT will then ask to see these specific files, and `aider` will automatically add them to the chat context (with user approval). Of course, for large repositories, even just their map might be too large From 09ddb795b6fdc4501621236d1fcc879fe08b4761 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Sun, 21 May 2023 22:19:33 -0700 Subject: [PATCH 4/7] Update ctags.md --- docs/ctags.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ctags.md b/docs/ctags.md index a653950ad..94c32c83b 100644 --- a/docs/ctags.md +++ b/docs/ctags.md @@ -112,9 +112,9 @@ For example, here is the `ctags --fields=+S --output-format=json` output for the The repo map is built using the `name`, `path`, `scope`, `kind` and `signature` data from `ctags`. -Rather then sending that chatty json data to GPT, `aider` +Rather then sending the data to GPT in that chatty json format, `aider` formats the map as a sorted, -hierarchical tree. This is a format that is easy to understand and which efficiently conveys the map data to GPT-4 using a +hierarchical tree. This is a format that GPT can easily understand and which efficiently conveys the map data to GPT-4 using a minimal number of tokens. ## Example chat transcript From 5a1a7e27e1cba6fc87cc058bad01d929e1dc4d99 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Sun, 21 May 2023 22:20:15 -0700 Subject: [PATCH 5/7] Update ctags.md --- docs/ctags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ctags.md b/docs/ctags.md index 94c32c83b..d0c34d368 100644 --- a/docs/ctags.md +++ b/docs/ctags.md @@ -114,7 +114,7 @@ The repo map is built using the `name`, `path`, `scope`, `kind` and `signature` data from `ctags`. Rather then sending the data to GPT in that chatty json format, `aider` formats the map as a sorted, -hierarchical tree. This is a format that GPT can easily understand and which efficiently conveys the map data to GPT-4 using a +hierarchical tree. This is a format that GPT can easily understand and which efficiently conveys the map data using a minimal number of tokens. ## Example chat transcript From fdf2faf5b675e559f795532159c6fa5b30141b38 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Sun, 21 May 2023 22:21:28 -0700 Subject: [PATCH 6/7] Update ctags.md --- docs/ctags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ctags.md b/docs/ctags.md index d0c34d368..34c490fe0 100644 --- a/docs/ctags.md +++ b/docs/ctags.md @@ -136,7 +136,7 @@ Using only the meta-data in the map, GPT is able to: - Decide that the `Coder` class looks complex enough to use a `MagickMock`. -It makes one reasonable mistake in the first version of the test, but is +GPT makes one reasonable mistake in the first version of the test, but is able to quickly fix the issue after being shown the `pytest` error output. ## Try it out From a2a7433f2824ad54169a6b47fdf427f0ddf4a9e1 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Sun, 21 May 2023 22:52:11 -0700 Subject: [PATCH 7/7] Update ctags.md --- docs/ctags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ctags.md b/docs/ctags.md index 34c490fe0..f483035d1 100644 --- a/docs/ctags.md +++ b/docs/ctags.md @@ -136,7 +136,7 @@ Using only the meta-data in the map, GPT is able to: - Decide that the `Coder` class looks complex enough to use a `MagickMock`. -GPT makes one reasonable mistake in the first version of the test, but is +GPT makes one reasonable mistake writing the first version of the test, but is able to quickly fix the issue after being shown the `pytest` error output. ## Try it out