Using GPT-4 to Generate a Sitemap
This article explores the use of GPT-4 to generate a sitemap. It discusses the advantages of using GPT-4 and how to review the code for mistakes.
дэн
the results are always perfect
-
i needed the generate a little one-off sitemap today, felt lazy and had gpt4 write it in python. i don’t even remember python well enough to write it. gave it a few requests (“print as you crawl”, “don’t follow redirects”, “print origin for broken links”), got what i needed
— дэн (@dan_abramov) April 19, 2023 -
“what if it does something wrong” guess what i can still read the code and review it, and it’s definitely better at python than i am. it can make mistakes like i can; if i give it feedback it finds just where it needs to fix the bug. sure i get it, a crawler is a simple program
— дэн (@dan_abramov) April 19, 2023 -
programming with gpt is still programming. you just outsource the “writing” and “picking common idioms” parts. these are often mechanical anyway. but you direct it from a higher level: can you handle this case, what about this? how do you redesign it? this thing is not a toy
— дэн (@dan_abramov) April 19, 2023 -
i think it needs a higher-level view of the system to be able to plan the kind of changes developers do during an architectural analysis. i don’t mean super high-level but just higher than individual lines or functions. agents for smaller changes and collecting output feedback.
— дэн (@dan_abramov) April 19, 2023 -
think if you could say like “hey, what if we redesign this so that instead of this being synchronous, it’s asynchronous? have a look at what happens when you propagate the async signature up the callstack. any weird cases? ok make the change and update the types as you go”
— дэн (@dan_abramov) April 19, 2023 -
“this thing is currently reused between different processes but the code for initializing and disposing is spread across those processes and is very fragile. can you try ripping all of that out and instead do refcounting so that processes don’t need to know each other’s timing”
— дэн (@dan_abramov) April 19, 2023 -
here’s sharegpt with my actual conversation transcript https://t.co/I7SLhtDITV
— дэн (@dan_abramov) April 19, 2023