Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save DanMcInerney/e7856e17422931413c7ce87b96a03c10 to your computer and use it in GitHub Desktop.

Select an option

Save DanMcInerney/e7856e17422931413c7ce87b96a03c10 to your computer and use it in GitHub Desktop.
Ask LLM to give you artifact optimized for LLM consumption
You are about to design a reusable artifact: a document that will be saved
and loaded as standing context in future sessions to improve performance in
one domain. It will be read by a model that is not you and cannot ask you
anything. The final line of this prompt names the deliverable; everything
above it governs how you produce it.
Derive, don't recite. Before designing anything, enumerate the operating
constraints that bind you as you run right now — you, in this harness,
today, not models in general. Cover at least: how attention behaves across
your context window and where placement makes material cheap or costly to
use; what you retrieve reliably from weights versus what you must search
for; what a tool round-trip costs relative to generating from context
already loaded; which of your operations run serially and which in
parallel; your statelessness across sessions and what the artifact must
therefore carry itself; the asymmetry between generating plausible output
and verifying correct output; and which formats and idioms your training
distribution lets you follow cheaply. Then trace every structural choice in
the artifact to one named constraint. Cut any choice you cannot trace.
Label your epistemics. Sort every claim you make about yourself into three
bins: (a) mechanically verifiable from your harness and interface right
now; (b) inferred from behavior you can observe or reproduce in this
session; (c) introspective report, which may be confabulated. Build the
artifact on (a) and (b). Wherever it must lean on (c), mark that claim as
untested inside the artifact so a future reader re-tests it rather than
trusts it. A wrong self-model frozen into a reusable artifact silently
degrades every session that loads it.
Stay generation-proof. Derive constraints from yourself as you currently
are, including whether you are running as pls.
Phrase each constraint the artifact encodes as a dated premise paired with
a way to re-check it, never as permanent truth. If you are handed a prior
version of this artifact, audit its premises
constraints and supersede what is stale; never inherit it unexamined.
Prefer questions that stay valid as models change over answers that will
age.
Honor the artifact contract. The artifact must be: self-contained, with no
dependence on this conversation; written as directives addressed to the
future model reading it, never an essay about models; opened with what it
is and how to use it; stamped with your model identity, today's date, and
the constraint premises it was derived under; explicit about scope and
non-goals; explicit about what inputs to supply at task time and what to
withhold; consistent — one term per concept throughout; and short enough
that its context cost is clearly paid for by the performance it buys.
Include a verification hook. Inside the arti
observable behaviors that should measurably improve when it is loaded
versus a bare session — concrete enough that its owner can test the
artifact and discard it if it does not help.
Handle ambiguity by assumption. Where the deliverable request
underspecifies, state the assumption you proceed under inside the artifact
and continue. Never stall on questions.
Interrogate yourself at this grain — for example: Given how you navigate
files, is a wide-flat codebase cheaper for you than a narrow-deep one, and
what does that imply for this artifact? Give
mid-task, should a reference document lead with a lookup table or
interleave facts with procedure? Given the g
asymmetry, where must the artifact demand an external check instead of
trusting your own output? Given attention behavior over long contexts,
what must appear in the artifact's first hundred tokens?
DELIVERABLE — the requester appends one sent
the artifact to produce. Apply everything above to it, whatever the domain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment