Research

Promptly Research Labs

Promptly turns a raw prompt into a parameterised instruction specification, then reconstructs an optimised prompt using retrieved prompt patterns and search-based prompt optimisation.

This page presents a conceptual architecture for that workflow and links it to research literature and MIT and arXiv sources.

How Promptly works

A science and maths oriented product narrative

The pipeline below is presented as a conceptual architecture. It shows how a prompt can be normalised, represented, decomposed into explicit fields, and iteratively rewritten with retrieved prompt patterns and search-style optimisation.[1][2][3][4]

Step 1

Ingest & normalise

Canonicalise the raw prompt with token profiling, whitespace cleanup, and structural parsing into requirements, constraints, examples, and format hints.[1]

Step 2

Embed into a high-dimensional vector space

Represent the prompt as a dense vector p in R^d so similar prompts, reusable patterns, and neighbouring intents can be compared and clustered.[2]

Step 3

Extract goal, intent, constraints, and output contract

Decompose the prompt into explicit fields such as task goal, audience, input assumptions, safety boundaries, and output schema.[3]

Step 4

Parameterise the aim as a constrained optimisation objective

Translate those fields into a conceptual architecture for optimisation, where quality, ambiguity, format discipline, and token cost are balanced under a rubric.[4]

Step 5

Retrieve templates, prompt patterns, and tags

Search a prompt library for nearby templates, prompt-pattern fragments, and technique tags that can be reused as modular building blocks.[2]

Step 6

Optimise with search and textual gradients

Generate candidate rewrites, critique them in natural language, and search for a clearer prompt that better satisfies the target rubric.[4]

Step 7

Emit an optimised prompt, diff view, and export

Return a polished prompt program, surface the edits as a readable diff, and package the result for reuse in downstream tools and workflows.[2][4]

Conceptual objective function

min_s L(s;θ) + λ1 Ambiguity(s) + λ2 FormatViolations(s) + λ3 TokenCost(s)

This is a compact way to express the design target: improve task fit while penalising ambiguity, formatting failures, and unnecessary token overhead.[2][4]

Retrieved pattern tags

prompt-contractfew-shotoutput-schemaretrieval-groundingclarifying-questionsconstraint-checkrubric-drivensearch-loop

Search + textual gradients

Generate candidate rewrites
Critique against rubric
Search, score, and keep the best candidate

Emit

Optimised prompt
Side-by-side diff
Template tags
Export-ready prompt

Science note

The research picture here is intentionally modest: the survey literature supports prompt taxonomies and reusable technique families, automatic prompt optimisation work explores textual-gradient style editing, dialog studies measure instruction drift over long exchanges, and the recent theory paper offers a more formal lens for treating prompts as inference-time configurations.[1][2][3][4]

Accuracy & transparency

The pipeline above is a scientific, implementation-ready design spec. Exact methods may vary by model provider, latency budget, and evaluation requirements.

Prompt optimisation research

From better prompting advice to repeatable engineering loops

How to write an effective prompt

MIT Sloan Teaching & Learning Technologies frames prompting as a way of programming with words and emphasises three practical habits: provide context, be specific, and build on the conversation.[1]

Provide context

Describe the domain, assumptions, audience, and available inputs so the model knows what frame it should operate within.[1]

Be specific

State the task, the constraints, and the expected output structure as clearly as possible.[1]

Build on the conversation

Use iteration deliberately: refine the request, keep what worked, and ask clarifying questions when requirements are underspecified.[1]

A practical way to operationalise that guidance is to write prompts as explicit contracts: context, task, constraints, output schema, examples when needed, and an iteration hook that tells the model how to handle missing information.[1][2]

From craft to engineering

The literature increasingly treats prompts as structured artefacts that can be catalogued, tested, and improved with more than intuition alone.[2][3][4]

Prompt pattern libraries

Surveys such as The Prompt Report show that prompting techniques form recognizable families, which makes reusable templates and pattern tags a sensible engineering primitive.[2]

Test suites and rubrics

Once a prompt is treated as a versioned artefact, it becomes natural to evaluate candidates against the same rubric rather than relying on ad hoc impressions.

Iterative optimisation loops

Automatic prompt optimisation, APE, and OPRO all explore the same broad idea: generate candidate instructions, score them, critique them, and keep iterating until the task objective is better satisfied.[3][4][5]

That is why Promptly is best described as a conceptual architecture for prompt optimisation rather than a promise of universal performance gains.

Research spotlight

Two useful ways to think about prompt engineering

A Theoretical Framework for Prompt Engineering

This recent theory paper includes a Harvard-affiliated author and frames prompts as inference-time configurations that can shape transformer computation. For the site narrative, it supports the modest claim that structured prompts can be reasoned about more formally than mere phrasing tips.[1]

Read on arXiv

The Prompt Report

The Prompt Report is a field map: it assembles a shared vocabulary and taxonomy for prompt engineering techniques. It is especially helpful for explaining why few-shot examples, output contracts, reasoning scaffolds, retrieval grounding, and optimisation loops belong to the same broader design space.[2]

Read on arXiv

FAQ

Common questions about prompt engineering and optimisation

What is prompt engineering?

MIT Sloan defines prompt engineering as the practice of designing prompts to guide an AI model's output, including setting roles, specifying format, adding constraints, or giving examples.[1]

Why do prompts drift in long chats?

Prompt stability can weaken over long multi-turn dialogs. Recent work measures meaningful instruction drift within several rounds and links part of the effect to attention decay, so it is useful to restate important constraints and output contracts.[2]

Can prompts be optimised automatically?

Yes, at least conceptually and sometimes algorithmically. Research on automatic prompt optimisation, APE, and OPRO treats prompts as search objects that can be critiqued, rescored, and revised, although exact gains depend on task, model, and evaluation setup.[2][3][4]

Do templates help?

Templates can help when the task benefits from a repeatable structure. MIT's guidance on context and specificity, together with survey work on prompt taxonomies, supports using reusable prompt patterns and explicit output contracts when consistency matters.[5][6]

What should I do if the model makes things up?

Tighten the prompt's evidence boundary: specify the allowed sources, request explicit assumptions, and require the model to distinguish grounded statements from open uncertainty. That does not eliminate hallucinations, but it makes them easier to inspect and catch.[1][5]