Sitemap

Prompts and Constraints Are All You Need

5 min readSep 28, 2022

--

MJT + ML = ❤

AI and humans are both a kind of ‘Creative Intelligence’.

My experience working with ML/AI tells me it wants to be interacted with via:

  • Natural Language Prompts
  • Domain Specific Constraints

I believe the same lessons working with ML/AI apply to working with other human creative intelligences as well.

The Power of Words

Natural language (English/French/Spanish/etc…) is powerful and intuitive for humans to use and reason with. It is after all our ‘mother tongue’.

We have spent a lot of time/effort/resources training machine learning models to understand natural language, and those efforts are paying off.

In machine learning one often hears the word ‘prompt’ when dealing with generative models. These are hints given to the model describing what it is to produce.

Prompts can be in many forms, but for my money natural language prompts provide the most intuitive interaction for humans.

I note that we already use natural language as prompts for interacting with human creatives as well. We describe what we wish the creative to produce with words more often than not.

Note that prompts are never fully descriptive. They are mere hints go guide the creative intelligence as it goes about generating a possible solution.

The Power of Constraints

The flip side of the coin from prompts are what I call ‘domain specific constraints’.

Unlike prompts, constraints ARE fully descriptive and precisely define the boundaries within which the possible solution must land.

Like all dichotomies the split between Prompt/Constraint can be a bit grey. The intuition here is that prompts are more like ‘seeds’ that spark the imagination. Constraints are more like containers that must be ‘fit into’.

I specify ‘domain specific’ as I feel that unlike natural language prompts, constraints are unlikely to be generalizable.

I feel this is due to the evolution of natural language over time to be generalizable as its main strength. Language is powerful precisely because it can be useful in a wide set of unknown and unknowable contexts.

Constraints tend towards favoring specificity and composability. One tends to be able to ‘pluck out’ a contraint in one context and use it in another project. One tends to form ‘bags of constraints’, and add/append constraints as time goes on.

Example: Software Developers

I believe these insights above are general however I’d like to give a specific example of their use in a field I know well: Software development within the context of an organization.

Software developers bridge the gap between the human world and the machine world.

This means developers have intuitively gravitated towards becoming a bit ‘machine like’, and have developed a host of tools and techniques that lend themselves to the paradigm of guidance I’m describing here.

Developers, I feel, also provide a good template for the future of human creatives, in particular those who wish to work in a team environment.

How to Prompt and Constrain Software Developers

Software developers take in written prompts that describe what is wanted.

In olden times long wordy ‘requirements documents’ were produced before any work on a project started.

These ‘requirements documents’ have evolved over time, and have naturally been separated into their component parts of prompts and constraints.

Today developers are prompted mainly through a window of about a paragraph or two of natural language text, delivered via some ‘project/issue tracking’ system like Jira or Trello.

Developers then find themselves constrained by a myriad of automated testing tools.

These constraints vary, and as discussed are a ‘mixed bag’. As the project matures, more and more constraints tend to be placed upon the developer.

Examples of Constraints:

  • Compiler satisfaction
  • Type systems
  • Unit Tests
  • Linters

In general one could place all the above in the category of ‘automated testing’. It is the automated nature of these constraints that make them powerful, and so provides a nice sharp line between the ‘prompt’ and the ‘constraint’. If it is automatable it is a constraint, if not it is a prompt.

The Future of Intellectual Work

I am a gradualist. However, I believe in the ratchet.

Which is to say that once a ‘good trick’ has been discovered it becomes difficult to go back. This is the story of technology.

One can do non-creative intellectual work. Think of the old human ‘calculators’, mindlessly grinding out math calculations.

These days the only intellectual work available for humans is on the creative side. Machines have largely taken over the non-creative ‘boring’ stuff.

Today, humans and machines are in direct competition for the creative jobs as well.

This means:

  • There will be a natural drive to make intellectually creative work more ‘machine friendly’.
  • More emphasis on writing good automated constraints, and writing good short but descriptive natural language prompts readable by both humans and machines.

For software development this means development architecture should focus heavily on picking and using existing constraint technologies. The more the merrier in a sense, but a focus on what the ‘constraint environment’ looks like for the project is more of an ‘upfront’ concept. There is no right answer here, but one must recognize good constraints as critically important for effective and efficient work.

I believe the same advice holds true for all the other forms of creative intellectual work. Here ML itself will start to play a larger and larger role.

Using ML Models to judge creative output isn’t a new concept. However, as I look around I don’t see this used much as a general tool for automated testing of generally creative work. That is going to change.

I expect the future to be littered with ML models to judge and filter the onslaught of creative output that both humans and machines will generate.

Summary

Prompts and Constraints together form a good paradigm of how to think about intellectually creative work.

By viewing through the lens of prompts and constraints one can better navigate the waters that will become increasingly ‘machine dominated’, at whatever level/niche one wishes to explore.

We are all part of a grand system of intellectual creativity, and will play many parts. A good conceptual map is a powerful tool that will allow one to navigate the exciting times to come. Good luck adventurer!

--

--

Matthew Joseph Taylor
Matthew Joseph Taylor

Written by Matthew Joseph Taylor

I play with the bits and the bits play with me. See mjt.dev for more.

No responses yet