Prompt Engineering for AI Productivity

Prompt Engineering for AI Productivity

A practical guide to writing prompts that produce consistent, verifiable, and useful outputs ,  with templates for research, governance, on-chain risk, market briefings, and dev workflows. Integrates with our Prompt Libraries.


Why prompting matters

LLMs are powerful pattern matchers. Small changes in instructions, context, or examples can swing answers from vague to crisp. A solid prompting discipline delivers consistency (same task, similar output), verifiability (citations, structured formats), and speed (less back-and-forth editing). Treat prompts like mini-specs: define inputs, constraints, and success criteria.

The mental model (what LLMs do well)

  • Language transformation: summarize, classify, extract, rewrite, translate, structure.
  • Knowledge synthesis (with sources): if you supply trusted passages, the model can condense and rephrase accurately.
  • Light reasoning: ranking, pros/cons, basic planning  when you define criteria upfront.

LLMs are not databases or calculators by default. For facts, provide passages; for math/data, provide numbers and specify formats; for decisions, provide rubrics and require uncertainty notes.

Anatomy of a high-quality prompt

  1. Role & audience: “You are a compliance analyst writing for risk leads.”
  2. Goal: “Produce a one-page brief with actions for the next 24h.”
  3. Context: link to docs or paste relevant passages.
  4. Constraints: length limits, tone, risk policy, refusal rules.
  5. Output format: JSON/table/sections; define keys and examples.
  6. Quality bar: acceptance criteria, scoring rubric, “say unknown if unsure.”
  7. Examples: 2–3 mini exemplars (input → ideal output).

Prompt frameworks you can reuse

  • CRISP: Context, Role, Instructions, Scope, Process (how to solve).
  • GROQD: Goal, Rules, Output, Quality bar, Data (grounding).
  • SMART-JSON: Ask for Simple, Machine-readable JSON with a Schema you define, And include References + Tags.

Templates for crypto & finance

1) Daily market briefing

// ROLE
You are a crypto research analyst writing for a portfolio manager.
// GOAL
Produce a grounded daily brief (≤300 words) across BTC, ETH, and my watchlist.
// DATA
Use ONLY the passages provided between <docs>...</docs>.
// OUTPUT
Sections: 1) What changed, 2) Drivers (on-chain/derivatives/news), 3) Risks next 24h, 4) Links.
// RULES
- Cite sources inline as [1], [2] that map to URLs from <docs>.
- If unsure, write "Unknown".
- No price targets, no advice.
<docs>
[1] https://... (paste excerpts)
[2] https://...
</docs>

2) Governance proposal summary

Role: DAO governance analyst for delegates.
Goal: Summarize proposal threads with pros/cons, timelines, and impacted contracts.
Data: Use the provided posts only.
Output (JSON):
{
  "proposal_title": "...",
  "summary": "...",
  "pros": ["..."],
  "cons": ["..."],
  "voting_window": {"start":"YYYY-MM-DD","end":"YYYY-MM-DD"},
  "links": ["url1","url2"]
}
Rules: Include direct quotes only when necessary; otherwise paraphrase. Mark unknowns explicitly.

3) Protocol risk quick-scan

Role: Risk reviewer.
Goal: Score a protocol 0–5 on oracle risk, admin powers, upgradeability, and concentration.
Output table with scores + evidence links.
Refuse to score if no evidence is provided.

4) On-chain flow narrative

Given these transactions and labels, write a neutral narrative (≤150 words):
- Who moved what, where, and when.
- Whether flows are normal vs unusual vs risky.
- Always link the primary tx hashes.

5) Dev productivity: PR reviewer

Act as a senior engineer. Review this diff for correctness and security:
- Summarize risk areas.
- Flag reentrancy/external calls in Solidity.
- Suggest tests to fail before fix.
Output: bullet list with file:line references.

Grounding with retrieval (RAG) & citations

For factual tasks, have the model answer from retrieved passages you supply. Require inline citations and an “unknown” fallback. When evaluating, check faithfulness (does the summary match the sources?), coverage (did it include the key facts?), and calibration (does it admit uncertainty?).

Evaluate quality (rubrics & spot checks)

  • Rubrics: Define 3–5 criteria (correctness, coverage, clarity, citations, tone), 1–5 scale each.
  • Gold sets: Keep a small library of “known good” inputs/outputs; run new prompts against them.
  • Adversarial tests: Include ambiguous, noisy, or conflicting sources; expect the model to say “unknown.”
  • Human review: For anything high-impact (risk, finance, security), require sign-off.

Versioning, governance & cost control

  • Version prompts: Store with dates, owners, and change notes.
  • A/B tests: Compare variants on the same evaluation set; keep the cheaper one if quality ties.
  • Rate limits & caching: Cache deterministic outputs (e.g., daily brief on fixed sources); deduplicate requests.
  • Privacy: Redact PII and secrets before sending inputs to a model. Use retrieval to keep proprietary content local where possible.

Common pitfalls & how to avoid them

  • Vague goals: Always define audience, purpose, and format.
  • No evidence: Require citations or passage IDs for factual claims.
  • Prompt drift: Lock “production” prompts; experiment in branches.
  • Over-automation: Keep humans in the loop for consequential outputs.

Connect to our Prompt Libraries

Browse and reuse templates from our evolving collection: Prompt Libraries. Fork them, add your sources and rubrics, and contribute improvements for the community.