news.volyx.in

An example of LLM prompting for programming (martinfowler.com)

546 points by mpweiher · 1230 days ago · 261 comments on HN

Article summary

The article discusses how to use a large language model (LLM) like ChatGPT to generate code for a programming task. It provides an example of a prompt that primes the LLM with an implementation strategy and asks for an implementation plan rather than code. The LLM responds with a plan, which can then be refined and used to generate useful sections of code. The article highlights the importance of carefully crafting the prompt to get the desired output from the LLM.

Main themes

  • LLMs for coding
  • Prompt engineering
  • Code generation
  • Software development
  • Data privacy
  • Technical communication
  • AI limitations
  • Future of coding

What commenters say

  • Some commenters prefer to write code themselves and do not see the value in using LLMs for coding tasks.
  • Others argue that LLMs can be useful for exploring solutions or alternate implementations, but may not replace human coders.
  • The use of English as a specification language may not lower the barrier of entry for coding, as it requires a deep understanding of technical concepts.
  • LLMs may be better suited for summarizing and providing high-level overviews of concepts rather than generating precise code requirements.
  • The lack of real-world context and understanding of consequences may limit the effectiveness of LLMs in certain applications.
  • Some commenters believe that LLMs will shift the cost curve of software development, making more software possible to create, while others are skeptical.
  • The use of LLMs raises concerns about data privacy and security, particularly when sensitive information is involved.
  • The effectiveness of LLMs depends on the quality of the prompt and the ability to refine and iterate on the output.