{ random memes }

The human–LLM loop

The cycle of interaction between human and LLM is simple at base. The human presents "prompts" (requests in prose) and the LLM then chains through all of human knowledge to generate answers.

Figure 1 — Cycle between Human and LLM at simplest.

Virtuous cycle between human and LLM

Looked at in more detail, both human and LLM draw on knowledge, to make this a virtuous cycle.

  1. Human reflects on domain knowledge (deeply understood).
  2. Human writes prose as prompt for the LLM.
  3. LLM takes the prompt.
  4. LLM chains through all human knowledge.
  5. LLM generates a response for the human (product).
  6. Human reads response from LLM, and reflects (1).

This cycle repeats until the desired objective is reached.

A ring of six numbered steps joined by arrows so the last leads back to the first: reflect, write, take, chain, generate, read. 
            The human's three sit on a light panel down the left; the model's three on a differently tinted panel down the right. 
            The arc from write to take is labelled prompts and the one from generate to read is labelled products. 
            Under the ring are the two sources of judgement: 
            domain knowledge, deeply understood, feeds the human's reflect; 
            all human knowledge, only slightly understood, feeds the model's chain.
Figure 2 — the virtuous cycle.

Project guidance as prompt library

As you learn to use an LLM, you run across many unwanted behaviors. Over time you learn how to constrain behavior by providing guidance through a library of prompts. You use that library of prompts across projects.

With a project library you can:

  • Ensure the use of consistent naming conventions.
  • Constrain the LLM to measured iterations.
  • Require documentation for each step.
  • Require tests built and passed for each step.
  • Avoid common patterns of LLM-failure.

Proper use of a project library greatly improves the products generated by the LLM. Building a project library for use with an LLM is something like training an auxiliary brain.

Ring of six numbered steps: 
            1. (human) reflect
            2. (human) write
            3. (model) take
            4. (model) chain
            5. (model) generate
            6. (human) read
            Note there is an arc between each numbered step, in sequence.
            Arc labelled 'prompts' from 'write' to 'take'.
            Arc labelled 'products' from 'generate' to 'read'.
            With a further step zero, prime, inside the model panel below chain;
            an arrow runs from zero prime into the left side of chain.
            Under the ring sit three stores: 
            * domain knowledge feeds reflect, 
            * the project library feeds zero prime,
            * and all human knowledge feeds chain.
            The human's steps sit on the light panel at the left, the model's on the tinted panel at the right.
Figure 3 — project library primes the model, and priming guides the chain.

Once trained, an LLM can do work much like you might have done, but in less time.

Slightly non-deterministic

Note that "reasoning" in an LLM is slightly non-deterministic. Different models might come to different result. Different versions of the same model might come to different result. Different runs with the same model might come to different result.

While not often encountered, the slight non-determinism of LLMs is an occasional problem. This is an as-yet unsolved problem with use of LLMs.

We can reduce the scope of occasional misbehavior by requiring the LLM to work in measured iterations.

Printable sheet — one landscape US-Letter page: SVG, 254 × 190.5 mm