# An example of LLM prompting for programming

<https://martinfowler.com/articles/2023-chatgpt-xu-hao.html>

- Host: [martinfowler.com](https://links.thingelstad.xyz/hosts/martinfowler.com/)
- Saved: April 13, 2023 (2023-04-14T02:02:55Z)
- Record: https://links.thingelstad.xyz/links/0ba634329d88/
- JSON: https://links.thingelstad.xyz/links/0ba634329d88.json

## What Jamie wrote

This is an incredible example of creating a solution using ChatGPT. I've done many examples of having ChatGPT write code, but this approach creates a solution that can be debated and improved before you just spit out code.

> A common way of interacting with an LLM is to give it a problem and ask it to generate some final product, whether than be prose or (in this case) code. With **Generated Knowledge** we split our interaction into separate steps: first ask the LLM to generate some useful information about the problem, and then we feed that information back into the LLM to generate the final product.

This is a super interesting way of working **with** another system in a pair-programming manner.

> My take away from this discussion was that using chain of thought and generated knowledge prompting approaches can be a significantly useful tool for programming. In particular it shows that to use LLMs well, we need to learn how to construct prompts to get the best results. This experience suggests that it’s useful to interact with the LLM like a junior partner, starting them with architectural guidelines, asking them to show their reasoning, and tweaking their outputs as we go.

This is whole thing is incredible. 🤯

## Facts

- Kind: [Page](https://links.thingelstad.xyz/kinds/page/)

## Appears in

- [WT250: Weekly Thing #250 / LLM, Shanghai, Wing](https://weekly.thingelstad.com/archive/250/), Featured

## Same host

- [Ship / Show / Ask](https://links.thingelstad.xyz/links/76c93d155279/) (martinfowler.com, September 9, 2021)
- [Scaling the Practice of Architecture, Conversationally](https://links.thingelstad.xyz/links/08d7f9105811/) (martinfowler.com, December 9, 2021)
- [Your organization should run its own Mastodon server](https://links.thingelstad.xyz/links/2fe7b65e8ce0/) (martinfowler.com, November 10, 2022)
- [Creating an integrated business and technology strategy](https://links.thingelstad.xyz/links/d33cb6201174/) (martinfowler.com, August 24, 2023)
- [Say Your Writing](https://links.thingelstad.xyz/links/789fa17abf00/) (martinfowler.com, May 29, 2025)

## Saved the same week

- [Free Dolly: Introducing the World's First Open and Commercially Viable Instruction-Tuned LLM - The Databricks Blog](https://links.thingelstad.xyz/links/7979fe76525f/) (databricks.com, April 13, 2023)
- [Principles for Creating with AI](https://links.thingelstad.xyz/links/2f8e01b5cabe/) (cjchilvers.com, April 13, 2023)
- [Ethereum’s Shanghai Upgrade Is Complete, Starting New Era of Staking Withdrawals](https://links.thingelstad.xyz/links/46bd50be26a5/) (coindesk.com, April 13, 2023)
- [Amazon 2022 Shareholder Letter (PDF)](https://links.thingelstad.xyz/links/36561b924cf5/) (s2.q4cdn.com, April 13, 2023)
- [Eight Things to Know about LLMS - Marginal REVOLUTION](https://links.thingelstad.xyz/links/e4e4dc8f1009/) (marginalrevolution.com, April 13, 2023)

## Elsewhere

- Wayback Machine: https://web.archive.org/web/*/https://martinfowler.com/articles/2023-chatgpt-xu-hao.html
