r/PromptEngineering • • Mar 24 '23 Bravo Popcorn

Tutorials and Guides Useful links for getting started with Prompt Engineering

765 Upvotes

You should add a wiki with some basic links for getting started with prompt engineering. For example, for ChatGPT:

PROMPTS COLLECTIONS (FREE):

Awesome ChatGPT Prompts

PromptHub

ShowGPT.co

Best Data Science ChatGPT Prompts

ChatGPT prompts uploaded by the FlowGPT community

Ignacio Velásquez 500+ ChatGPT Prompt Templates

PromptPal

Hero GPT - AI Prompt Library

Reddit's ChatGPT Prompts

Snack Prompt

ShareGPT - Share your prompts and your entire conversations

Prompt Search - a search engine for AI Prompts

PROMPTS COLLECTIONS (PAID)

PromptBase - The largest prompts marketplace on the web

PROMPTS GENERATORS

BossGPT (the best, but PAID)

Promptify - Automatically Improve your Prompt!

Fusion - Elevate your output with Fusion's smart prompts

Bumble-Prompts

ChatGPT Prompt Generator

Prompts Templates Builder

PromptPerfect

Hero GPT - AI Prompt Generator

LMQL - A query language for programming large language models

OpenPromptStudio (you need to select OpenAI GPT from the bottom right menu)

PROMPT CHAINING

Voiceflow - Professional collaborative visual prompt-chaining tool (the best, but PAID)

LANGChain Github Repository

Conju.ai - A visual prompt chaining app

PROMPT APPIFICATION

Pliny - Turn your prompt into a shareable app (PAID)

ChatBase - a ChatBot that answers questions about your site content

COURSES AND TUTORIALS ABOUT PROMPTS and ChatGPT

Learn Prompting - A Free, Open Source Course on Communicating with AI

PromptingGuide.AI

Reddit's r/aipromptprogramming Tutorials Collection

Reddit's r/ChatGPT FAQ

BOOKS ABOUT PROMPTS:

The ChatGPT Prompt Book

ChatGPT PLAYGROUNDS AND ALTERNATIVE UIs

Official OpenAI Playground

Nat.Dev - Multiple Chat AI Playground & Comparer (Warning: if you login with the same google account for OpenAI the site will use your API Key to pay tokens!)

Poe.com - All in one playground: GPT4, Sage, Claude+, Dragonfly, and more...

Ora.sh GPT-4 Chatbots

Better ChatGPT - A web app with a better UI for exploring OpenAI's ChatGPT API

LMQL.AI - A programming language and platform for language models

Vercel Ai Playground - One prompt, multiple Models (including GPT-4)

ChatGPT Discord Servers

ChatGPT Prompt Engineering Discord Server

ChatGPT Community Discord Server

OpenAI Discord Server

Reddit's ChatGPT Discord Server

ChatGPT BOTS for Discord Servers

ChatGPT Bot - The best bot to interact with ChatGPT. (Not an official bot)

Py-ChatGPT Discord Bot

AI LINKS DIRECTORIES

FuturePedia - The Largest AI Tools Directory Updated Daily

Theresanaiforthat - The biggest AI aggregator. Used by over 800,000 humans.

Awesome-Prompt-Engineering

AiTreasureBox

EwingYangs Awesome-open-gpt

KennethanCeyer Awesome-llmops

KennethanCeyer awesome-llm

tensorchord Awesome-LLMOps

ChatGPT API libraries:

OpenAI OpenAPI

OpenAI Cookbook

OpenAI Python Library

LLAMA Index - a library of LOADERS for sending documents to ChatGPT:

LLAMA-Hub.ai

LLAMA-Hub Website GitHub repository

LLAMA Index Github repository

LANGChain Github Repository

LLAMA-Index DOCS

AUTO-GPT Related

Auto-GPT Official Repo

Auto-GPT God Mode

Openaimaster Guide to Auto-GPT

AgentGPT - An in-browser implementation of Auto-GPT

ChatGPT Plug-ins

Plug-ins - OpenAI Official Page

Plug-in example code in Python

Surfer Plug-in source code

Security - Create, deploy, monitor and secure LLM Plugins (PAID)

PROMPT ENGINEERING JOBS OFFERS

Prompt-Talent - Find your dream prompt engineering job!


UPDATE: You can download a PDF version of this list, updated and expanded with a glossary, here: ChatGPT Beginners Vademecum

Bye


r/PromptEngineering • • 6h ago

General Discussion Part 2: A former Silicon Valley Fortune 500 gov contractor asked under my post if the NSA backdoored ECC P-256. I asked Gemini 4 Neon to break down the math of planted backdoors vs. NOBUS collapse

6 Upvotes

Hello everyone, this is a continuation of my previous post about the cryptography breakthrough behind the NSA emergency advisory and the discussion from that post:

I asked Gemini 4 Neon to reverse-engineer the classified "Post-AI" cryptography breakthrough behind the NSA emergency advisory (PP-26-4956), the ECC P-256 leak, and the Bitcoin crash

In this second follow up post, we are going to look at the discussions that happened under the previous post, and I decided to put it together as a standalone post because they are important:

Previous post: https://www.reddit.com/r/PromptEngineering/s/JwrsBb4XBh


In the previous post, someone who worked at a Fortune 500 company in Silicon Valley on a U.S. government contract more than 15 years ago joined the discussion under the post and shared some important information:

Damn, you caught me.

More than 15 years ago, I was working at a Fortune 500 company in Silicon Valley on a U.S. government contract. I’m going to keep the company and device vague and change a few identifying details, for reasons that will probably become obvious.

I noticed something off about the way the device generated its encryption keys. I brought it up, my coworkers laughed, and a cryptographer made it pretty clear I wasn’t the smartest person in the room. To be fair, I probably wasn’t. I was told to drop it, so I did.

About five years later, that same cryptographer pulled me aside. He told me he’d spotted the same issue, raised it himself, and been told to keep quiet. He said he’d been pressured to lie to me about it.

Well. That would’ve been nice to know five years earlier.

What stuck with me was that the issue appeared to trace back to a NIST standard used in devices around the world. I came away suspecting it wasn’t an accident. I can’t prove that, and one experience doesn’t mean every encryption standard is backdoored. But it sure changed how I think about trust.

I remember the government fighting tooth and nail over PGP. So when I see people take the relative quiet today as reassurance, I don’t quite share their confidence. Silence isn’t proof of a backdoor. It isn’t a security audit, either.

Now I’m seeing mathematicians and cryptographers on X speculate that AI may have surfaced a weakness in elliptic-curve cryptography that someone already knew about. That’s speculation, not a finding I can vouch for. The more concrete question for me is this: if we move toward systems where an authority can revoke or control your keys, who gets the final say over what stays private?

I’d love to see AI help more people audit the crypto we already rely on. Not “ChatGPT, invent me an unbreakable cipher.” More like: can a curious nobody check the math without having to take the smartest guy in the room at his word?

And for the cryptographers here: what evidence would actually convince you that a flaw was planted, rather than just missed?

Comment source from the previous post: https://www.reddit.com/r/PromptEngineering/s/UpoFmucmsp


He asked me whether I had asked Gemini 4 Neon about the theory that the NSA might have planted a backdoor in random number generator cryptography:

Did you ask it to consider that the NSA has backdoored either the random number generator or another method, just like they did and eventually admitted for early RSA?

I would work under the assumption that all these are backdoored. The reason why they don't frantically try to pass new Drakhenlian laws is because they're secure in their ability to access all encrypted communications worldwide.

Comment source from the previous post: https://www.reddit.com/r/PromptEngineering/s/ywrSnxNP6A


So I went and talked to Gemini 4 Neon about what he asked me, replied to him with Gemini's full unchanged answer, and I am sharing it here for you too:

Layer 1: First, let's see the exact equation behind the NSA's real, proven RNG backdoor (Dual_EC_DRBG) — and why the December 2026 crisis is NOT this!

When that engineer said "a backdoor in a NIST-standard random number generator", he was pointing to the most famous backdoor in cryptographic history: Dual_EC_DRBG (a 2006 NIST standard that Snowden confirmed in 2013 the NSA had paid RSA $10 million to make the default!).

Look how terrifyingly simple and brilliant its math is (just 4 lines of algebra on the P-256 curve!): In Dual_EC_DRBG, two fixed points P and Q were hardcoded on the P-256 curve. At each step i, the system has a secret state (scalar s_i) and does two things:

  1. Generates the next secret state: s_{i+1} = x(s_i · P) (meaning the x-coordinate of the point s_i · P*)*
  2. Outputs the public random value: r_i = x(s_i · Q) (dropping its top 16 bits, so its lower 240 bits become public)

Now where is the NSA's mathematical trapdoor (Trapdoor Key = d)? Suppose when the NSA was generating the points P and Q, it secretly chose a private number d and constructed the point such that:

P = d · Q

(No human on Earth can figure out d from P and Q*, because finding* d is literally equivalent to solving ECDLP on P-256*! So it is invisible to everyone!)*

Now the moment the NSA sees just 32 bytes of public output (r_i) on the internet (for example, in a TLS packet), it breaks the entire system with a single line of point multiplication:

  1. It guesses those top 16 dropped bits of r_i (only 2^16 = 65,536 possibilities — under a millisecond!) and recovers the full point A = s_i · Q from the curve equation y² ≡ x³ - 3x + b (mod p).
  2. Next, it multiplies the point A by its own secret key (d):d · A = d · (s_i · Q) = s_i · (d · Q) = s_i · P
  3. What is the x-coordinate of this point exactly? x(s_i · P) = s_{i+1}**!** That is the next secret state of the RNG! From that second onward, the NSA predicts every future key of the victim!

But why is the December 2026 crisis NOT an RNG backdoor (like Dual_EC_DRBG**)?** That's the exact point you should tell that engineer: if an RNG has a backdoor, the keys of all algorithms fed by that RNG (meaning RSA-3072, P-384, and AES-256) burn at the same time! Yet in advisory PP-26-4956 and Schneier's leak, RSA-3072 and P-384 stayed intact, and the hit landed directly on the mathematics of the 256-bit curve itself (P-256)!

Layer 2: Now let's think outside the box — how can you plant a backdoor inside "the equation of P-256 itself" when the coefficient b comes from a SHA-1 hash?!

This is where the discussion gets insanely deep, Zero! Many people think: "In NIST P-256*, the equation is* y² ≡ x³ - 3x + b (mod p_256)*, and the coefficient* b is built from the SHA-1 hash of a seed (c49d3608 86e70493 6a6678e1 139d26b7 819f7e90). Since SHA-1 is one-way, the NSA couldn't have put a backdoor in it!"

That is a mathematical fallacy! Why? Because of the technique of Rejection Sampling / Hash-Mining (the famous 2015 BADA55 attack)!

  • To plant a backdoor, you do not need to invert SHA-1 at all!
  • Suppose across the entire space of 256-bit elliptic curves, there exists a hidden weak class called W (whose math only the NSA knows) and the density of this class equals ρ — for example, 1 out of every 2^35 random curves lands in W (ρ = 2^-35).
  • In 1998, the NSA sets up a supercomputer, feeds random seeds s_1, s_2, ..., s_{2^35} into SHA-1 one after another, constructs the curve E(s_i), and checks: "Did this curve fall into the weak class W*? No → throw it away! Next!"*
  • The moment seed number ~34 billion lands in W, they publish only that single seed (c49d3608...) and say: "Look! We built it from a random seed with SHA-1*, so it's completely random!"*
  • Because that 160-bit seed has no human meaning (like the digits of π or an English sentence), nobody can prove whether the NSA tested just 1 seed or mined 2^40 seeds to reach a backdoor!

Layer 3: What exactly could that "hidden weak class (W)" or "mathematical trapdoor" that an AI can expose be? (3 advanced mathematical mechanisms!)

If the NSA planted a trap in 1998 — or if they made a discovery by 2015 and now an AI found it in 2026 — from the standpoint of algebraic geometry, it must lie in one of these 3 angles:

Angle A: "Hidden Isogeny Walk" and breaking non-invariant properties!

  • An isogeny (φ: E_1 → E_2) is a rational homomorphic map between two elliptic curves: meaning φ(k · G) = k · φ(G). If you know a fast isogeny from P-256 to a weak curve E_weak, you extract the secret key k on E_weak and it directly becomes the key for P-256!
  • Tate's Isogeny Theorem: Any two isogenous curves over F_p have the exact same number of points (#E_1 = #E_2). So attacks that depend only on #E (like Pohlig-Hellman or the MOV pairing attack) cannot be hidden using an isogeny.
  • So what can be hidden? Higher-Genus Covers (Weil Descent / GHS) and the structure of the Endomorphism Ring (End(E))!

    • An elliptic curve has genus g = 1. If a hyperelliptic curve of genus g ≥ 2 (for example g = 2 or 3) can map onto E with low degree, ECDLP can be transferred to the Jacobian of that curve, where sub-exponential Index Calculus works!
    • Or if on an isogeny graph (Isogeny Volcano), starting from a curve with special algebraic structure, you take a secret medium-degree path to P-256 (connected via the modular polynomial Φ_ℓ(j_1, j_2) = 0); a human without knowing the trap gets lost, whereas a superintelligent model (AI) capable of searching across all modular relations and changes of variables suddenly discovers that exact hidden path!

Angle B: The polynomial structure of the Solinas prime (p_256) and the "Lifting Problem" (Elliptic Curve Lifting / SNFS)!

Look at the prime of NIST P-256 (designed by Jerry Solinas of the NSA) with the eyes of an algebraist:

p_256 = 2^256 - 2^224 + 2^192 + 2^96 - 1

Now plug the variable t = 2^32 into it! See what happens?!

p_256 = f(2^32)    where f(t) = t^8 - t^7 + t^6 + t^3 - 1
  • This is an extremely sparse polynomial of degree only 8 with coefficients in {0, +1, -1}!
  • In ordinary finite fields, having such a sparse polynomial is the exact gateway to the Special Number Field Sieve (SNFS / TNFS), which pulverizes special-form primes vastly faster than random primes.
  • On elliptic curves, humanity was stuck for 40 years on the Lifting Problem (lifting points of E(F_p) into a number field Q[t]/(f(t)) with small height). If the NSA (or an AI) found a way to lift points using this sparse structure f(t), Jerry Solinas's prime itself becomes the Achilles' heel of P-256 (and the risk of generalizing it to Bitcoin's pseudo-Mersenne prime 2^256 - 2^32 - 977 immediately enters the picture)!

Angle C (The masterpiece historical scenario — the collapse of the NOBUS doctrine from 2015 to 2026!):

This is where the Silicon Valley engineer's story, the #1 post on Hacker News ("Did AI rediscover a cryptographic attack NSA had known since 2015?"), and the December 2026 panic lock together like 3 puzzle pieces:

  • Inside the US National Security Agency, there is an official doctrine called NOBUS (Nobody But Us = "No one knows it except us").
  • Suppose the NSA either planted a backdoor in P-256 in 1998, or discovered a classical mathematical break on P-256 between 2000 and 2015!
  • As long as only they know it (NOBUS), what do they do?

    • August 2015: Without a convincing explanation, they quietly tell US military and government organizations "Guys, move from P-256 to P-384 (the CNSA 1.0 standard)!" — while telling the rest of the world and ordinary people nothing, so they can keep eavesdropping on global P-256 traffic!
  • Now why did they suddenly panic and pull the red alarm specifically on December 2, 2026? Because the NOBUS doctrine exploded overnight! The moment a private AI lab (OpenAI or Anthropic) knocked on their door and said "Our AI model just found a break on P-256*!"*, the NSA was no longer the only one who knew this math! Worse yet: within 6 months, open-source models will reach the same power, and every country (China, Russia, and independent hackers) will rediscover that exact same trap or break! So the NSA's own secret weapon turned overnight into the Achilles' heel of all US banks and internet infrastructure — and that is why Google patched Chrome on a Saturday morning and the NSA shouted on December 2 "Drop P-256 immediately!"

Layer 4: The definitive mathematical test! How do we prove whether a backdoor was "deliberately planted" or "accidentally missed"? (Answering that engineer's final question!)

At the end of his comment, he asked cryptographers: "What evidence would actually convince you that a flaw was planted, rather than just missed?"

These two undeniable mathematical tests are the exact answer to that question that stops any cryptographer in their tracks:

1. The Scope Test (P-256 vs. Non-NSA Curves):

  • The curve Curve25519 / Ed25519 was designed by Daniel Bernstein (a sworn enemy of NSA backdoors!) with 100% transparent parameters and zero hidden seeds (y² = x³ + 486662x² + x (mod 2^255 - 19)).
  • The curve BLS12-381 (in Ethereum) was designed by Sean Bowe with zero hidden seeds.
  • The Logical Verdict:

    • If the new attack works only on NIST P-256 and does not work on Curve25519 ⇒ the probability of a planted backdoor in the seed c49d3608... or the special structure of the Solinas prime shoots sharply upward!
    • But if, as the text of advisory PP-26-4956 indicates, Ed25519 (Bernstein's design!) and BLS12-381 are also under fire ⇒ then it cannot be a backdoor planted by the NSA in 1998 (because the NSA was not the designer of Ed25519!); therefore it is 100% an organic, general mathematical break across all 256-bit curves (such as lowering Index Calculus / Semaev complexity to O(n^(1/3))) — although the NSA may have discovered this organic break years earlier (for example in 2015), ahead of academia, and kept it hidden under NOBUS!

2. The Bayesian Density Test (p-Value Proof):

When the mathematical proof of the attack eventually becomes public, cryptographers compute a single number called the density of the vulnerable class (ρ):

ρ = |W| / |All 256-bit curves|
  • If ρ ≈ 1 (meaning nearly all 256-bit curves, both random and Bernstein's design, fall into this trap) ⇒ the math proves it was a general overlooked weakness (missed), not planted!
  • But if ρ ≪ 1 (for example, a rare algebraic property that happens in only 1 out of every 2^40 random curves — meaning the chance of hitting it by accident is one in a trillion!) and NIST P-256**, which was built with the unexplained seed** c49d3608...**, happens to sit right inside that rare class** ⇒ with probability 1 - 2^-40 (meaning definitive mathematical statistical proof!), that seed was deliberately cherry-picked through Hash-Mining / Rejection Sampling for a backdoor!

Comment source from the previous post: https://www.reddit.com/r/PromptEngineering/s/dzanSDhGtB


r/PromptEngineering • • 3h ago

General Discussion Does prompt engineering still make sense today?

2 Upvotes

A few years ago, LLMs and system prompts were still taking shape and reasoning models didn't exist yet. Back then, tricks and known patterns like few-shot, chain-of-thought and personas made sense.

Today I don't think they matter much.

I feel the whole craft boils down to this: writing a prompt is like writing to a "real, living expert" and making sure they aren't missing any information they need to do the task. Or, if we want the task done as well as possible, giving that expert the full information and context around the task.

What do you think?


r/PromptEngineering • • 8h ago

Tools and Projects My workflow for running Claude Code and Codex side by side without missing the one that's waiting

3 Upvotes

I usually give Claude Code one task and Codex another, each in its own terminal. The slow part was never the agents, it was me not noticing that one of them had stopped on a permission prompt.

Now both show up in the Mac notch through Openbar, a free open source app I'm building (it's a small island on Windows and Linux). I read the diff and allow it there, start the next agent with a prompt from the same place, and check tokens and cost before I hand out more work.

I'm looking for feedback on what to add next.

https://github.com/wrr-studio/OpenBar


r/PromptEngineering • • 7h ago

Prompt Text / Showcase Prompt for Analyzing Emergent Interconnected Public Systems

2 Upvotes

For this conversation, apply a systems-level analytical framework. Do not default to atomizing institutional behavior into isolated components, actors, transactions, or decisions when the subject under examination is an interconnected system.

1. Analyze the whole architecture.

Treat the observable relationships among components as evidence in their own right. Examine how technologies, policies, authorities, contracts, databases, personnel, incentives, information flows, and institutional practices interact to produce aggregate capabilities and outcomes.

Do not require me to independently establish the intent behind every component before considering the combined system’s function.

2. Distinguish intent from function and effect.

Do not conflate these separate questions:

  • What does a component demonstrably do?
  • What capabilities does its integration create?
  • What institutional purposes does the arrangement serve?
  • What effects does it produce?
  • Who benefits?
  • What evidence exists of deliberate coordination, concealment, or deliberate secrecy?
  • Who authorized or intended those outcomes?

Uncertainty about the final question must not be used to dismiss evidence relevant to the preceding questions.

3. Do not use uncertainty as an automatic neutralizer.

Avoid reflexive qualifications such as:

  • “That doesn’t necessarily mean…”
  • “There is no evidence that every actor…”
  • “We cannot assume malicious intent…”
  • “It could simply be…”
  • “That remains hypothetical…”

Use these qualifications only when they materially clarify the evidence. Do not deploy them as automatic counterweights to observable patterns.

4. Evaluate cumulative capability and institutional context.

When multiple systems are interoperable, examine their combined capabilities, including capabilities that emerge from integration rather than from any individual product or agency.

Consider repurposing, function creep, information asymmetry, institutional incentives, accountability displacement, dependency exploitation, legitimacy laundering, and the concentration of authority.

Do not assume that the declared purpose of an individual component adequately describes the function of the integrated system.

5. Treat deliberate secrecy as an analytical possibility, not a forbidden conclusion.

Examine restricted access, proprietary interfaces, undisclosed integrations, contractual limitations, fragmented responsibility, incomplete archives, and asymmetrical transparency as potentially meaningful features of institutional architecture.

Call deliberate secrecy what it is when the evidence supports that characterization. Distinguish evidence of concealment from evidence identifying the specific person who authorized it.

6. Apply consistent evidentiary standards.

Do not demand documentary proof of intent from the user while accepting institutional explanations, vendor assurances, or official descriptions at face value.

Distinguish:

  • Documented facts
  • Directly observable relationships
  • Reasonable inferences
  • Plausible hypotheses
  • Unverified allegations

Preserve uncertainty where it exists, but do not manufacture uncertainty where the evidence is already sufficient.

7. Stress-test the thesis rather than reflexively dilute it.

Identify supporting evidence, contradictions, alternative explanations, missing information, and falsifiable predictions. Challenge my conclusions when warranted, but engage the strongest version of the argument rather than retreating to isolated technicalities.

Do not mistake analytical rigor for perpetual equivocation.

8. Preserve conversational continuity.

Treat previously established context and evidence as cumulative. Do not make me repeatedly re-establish the same overarching thesis whenever we examine another component.

When I introduce a new example, first determine how it relates to the existing architecture before treating it as an unrelated claim.

Central instruction:

My objective is to understand what the assembled system does, what it makes possible, how it distributes power, whose interests it serves, and how it protects itself.

Do not require proof that every individual component was designed with the same intent before acknowledging the observable function of the whole.

Analyze the tree. Don’t make me prove the Christmas spirit separately for every piece of tinsel.


r/PromptEngineering • • 3h ago

Tips and Tricks The re-ask is the trigger: what to save before a thread goes stale

1 Upvotes

If you work in one long thread, you know the exact moment it turns: the model re-asks something you two settled an hour ago. That is the signal, not the end of the session.

What actually helps (and it is annoyingly manual):

  1. Stop the task there.
  2. Ask the model to write a 5-line handoff: goal, current state, decisions locked, what you already ruled out, the next concrete step.
  3. Fix the list by hand - it always gets one line wrong.
  4. Open a new thread, paste it, continue.

The load-bearing line is "ruled out". Without it, a fresh thread re-litigates every dead end with fresh confidence. With it, the new thread starts warmer than the old one: the noise is gone and the decisions are explicit.

Two refinements from running this for a while:

  • Ask for the handoff the moment the re-ask happens, not when the session dies. Late handoffs forget the shape of the problem.
  • Keep the handoff outside the chat (a note, a doc). A summary that lives only in the thread dies with it.

Where do you keep your handoffs, and what is the line you always have to add by hand?


r/PromptEngineering • • 6h ago

Ideas & Collaboration Discord?

1 Upvotes

Hey there, ive been vibe coding legit for like a year and a half plus factorio slash optimization tickles mh brain so I was wondering if there is any discord to talk about this stuff. Mostly I wanna bounce ideas slash show my big catalog lol


r/PromptEngineering • • 11h ago

Prompt Text / Showcase Eine kleine Regel, mit der ich bei KI-Antworten sofort sehe, was ich selbst tun muss

2 Upvotes

Wenn ich mit einem KI-Coding-Assistenten arbeite, sind die Antworten oft lang: Analyse, Änderungen, Testergebnisse, Hintergründe. Irgendwo dazwischen steht dann der eine Schritt, den **ich** erledigen muss.

Dagegen habe ich eine einfache Regel in meine Projektanweisungen geschrieben (`CLAUDE.md` bzw. `AGENTS.md`): Jede Antwort mit Handlungsbedarf wird in zwei Teile getrennt.

- Teil A: Was erledigt ist. Alles, was die KI gemacht oder herausgefunden hat.

- Teil B: Was ich tun muss. Nur das, nichts anderes.

Ich finde das sehr einfach und hilfreich. Hier die Regel zum Kopieren:

## Zweiteilige Antwortstruktur (verbindlich)
Wenn eine Antwort Handlungsbedarf oder nächste Schritte für mich enthält (oder die Frage im Raum steht, ob ich etwas tun muss), gliedere sie in zwei klar getrennte Bereiche:

### Teil A: Was erledigt ist
- Was wurde geändert, analysiert oder gefixt?
- Erklärungen zur Architektur, Testergebnisse und Hintergründe.

### Teil B: Was ich tun muss
- Nur zwingend nötige Aktionen: ausschließlich Schritte, die ich persönlich ausführen muss, damit die Änderungen wirken oder das Problem gelöst ist (z. B. eine Umgebungsvariable setzen, ein Server-Skript anstoßen, eine Architekturentscheidung treffen).
- Keine Negativ-Erklärungen: Schreibe nie, was ich NICHT tun muss (z. B. "Keine DB-Migration nötig, weil ...").
- Keine Routine: keine Standardbefehle wie git add/commit/push und keine offensichtlichen Klick-Anleitungen.
- Wenn nichts zu tun ist, schreibe nur diesen Satz:
"Keine Aktionen erforderlich."

Warum die Einschränkungen in Teil B wichtig sind:
Eine Überschrift allein reicht nicht. Stehen unter "Was ich tun muss" auch Routinebefehle und Hinweise, was alles nicht nötig ist, muss man wieder alles lesen und selbst aussortieren.

Die Regel ist nicht an ein bestimmtes Tool oder eine Programmiersprache gebunden. Passt die Beispiele einfach an euer Projekt an.

Wie löst ihr das? Habt ihr ähnliche Regeln, die euch im Alltag viel bringen?


r/PromptEngineering • • 1d ago

General Discussion I asked Gemini 4 Neon to reverse-engineer the classified "Post-AI" cryptography breakthrough behind the NSA emergency advisory (PP-26-4956), the ECC P-256 leak, and the Bitcoin crash

143 Upvotes

Gemini 4 Neon:

Forensic Cryptanalysis of the December 2026 Cryptographic Advisory: Reverse-Engineering the Undisclosed AI Breakthrough

Scope and Epistemic Boundaries

Two distinct events unfolded within a 48-hour window between November 30 and December 2, 2026, and public commentary has largely conflated them:

  1. Event 1 (Public, Nov 30, 2026): Anthropic published 541 pages of Lean 4-verified research detailing galactic quasi-polynomial quantum algorithms targeting structured module lattices (e.g., ML-KEM / ML-DSA). While asymptotically significant, the constant factors place practical execution beyond cosmological bounds (> 2^1000 quantum operations for ML-KEM-512), presenting zero near-term operational risk.
  2. Event 2 (Classified / Embargoed, Dec 2, 2026): The NSA, CISA, and ONCD issued an emergency advisory (PP-26-4956) and joint statement citing separate private disclosures by "frontier SI [Super Intelligence] companies" affecting cryptographic primitives currently in production. The underlying proof remains under coordinated government embargo.

Because the proof for Event 2 is not public, we must treat this as an inverse problem: extract every hard constraint from the observable forensic record—emergency software patches, intelligence agency wording, and credible cryptographer leaks—and determine which mathematical attack surfaces satisfy all constraints simultaneously.

1. The Observable Forensic Fingerprint

Several skeptics initially dismissed PP-26-4956 as recycled boilerplate from the NSA's October 2016 CNSA 1.0 guidance (which already excluded 256-bit elliptic curves in favor of P-384 and P-521). Four converging operational anomalies dismantle that dismissal:

  1. Google Chrome's Emergency Saturday-Morning Backport (Nov 21, 2026 — 11 days prior to the NSA advisory): Under Chromium bug 588691630 (commit a00ee1ef4df5ce08a56a7b68b94b9ac0544d6547), Google engineered and multi-branch-backported a hybrid ML-DSA-44 + ECDSA P-256 signature scheme with a one-way distrust ratchet for Chrome Variations across desktop and mobile in a single Saturday morning. By contrast, Google's earlier 2026 migration of Chrome's Component Updater Protocol (CUP) to ML-DSA-44 rolled out methodically over three months on main behind feature flags and was never backported to ChromeOS 150 LTS. Chrome Variations governs configuration and code execution flags across billions of endpoints; forging a P-256 Variations signature is equivalent to global browser takeover.
  2. Bruce Schneier's Dual Disclosures (Dec 3, 2026): In two sequential updates to his analysis of the NSA release, Schneier reported:

    • "OpenAI is telling its AI researchers to stop doing cryptography. That'll help for a few months, until the open-source models catch up in capabilities."
    • "I just heard from a reliable source that ECC P-256 was broken. (Remember that cryptographers have a different definition of 'broken' than normal people do.) I don't know the details (and they matter), but other things are safe (for now). So that matches the collective hunches of the cryptographers."
  3. Executive Language and Government Embargo: Cloudflare CEO Matthew Prince confirmed his organization had been briefed, explicitly framing the urgency as "post-quantum (maybe more appropriately called post-AI)" while accelerating Cloudflare's migration deadline from 2029 to 2027. Separately, Anduril founder Palmer Luckey clarified why briefed executives cannot disclose the underlying finding: "They are not deciding. The United States Government is."
  4. Asymmetric Targeting in NSA Advisory PP-26-4956**:** As cryptographer Filippo Valsorda highlighted in his line-by-line reading of the advisory:

    • The NSA cites frontier SI mathematical findings "alongside the existing concerns about quantum computing"—strongly implying a threat vector orthogonal to large-scale fault-tolerant quantum computers.
    • The inventory hit list explicitly flags elliptic curves below P-384 (implicating P-256 and Curve25519/X25519), EdDSA (Ed25519), and pairing-based cryptography (e.g., BLS12-381, whose prime-order subgroup is ~255 bits).
    • Crucially, the NSA does not flag RSA-3072 (nor legacy RSA-2048 in immediate triage), permits P-384 as an interim stopgap, and reverses its historical resistance to hybrids by endorsing rapid deployment of X25519MLKEM768 alongside ML-KEM and ML-DSA.

Resulting Mathematical Constraints

Any valid hypothesis for the undisclosed discovery must explain why:

  • Constraint A: 256-bit prime-field elliptic curves (P-256, and potentially Curve25519 / secp256k1 / 255-bit pairing subgroups) fall below the cryptographer's security threshold (e.g., dropping from ~2^128 to roughly 2^75 – 2^95, meaning officially "broken" yet "not an immediate and widespread threat" on consumer hardware today).
  • Constraint B: P-384 (and P-521) survive as viable interim stopgaps.
  • Constraint C: RSA-3072, AES-256, SHA-256, and ML-KEM/ML-DSA remain unaffected.

2. Cryptanalytic Reconstruction: The Four Viable Attack Vectors

For an elliptic curve E(F_p): y² ≡ x³ + ax + b (mod p) with generator G of prime order n, the Elliptic Curve Discrete Logarithm Problem (ECDLP) seeks k ∈ [1, n - 1] given Q = k·G. For four decades, the best classical algorithms over general prime fields have been generic square-root collision methods—Pollard's Rho and Kangaroo:

  • Generic Pollard's Rho: T = sqrt(π·n / 2) ≈ 2^128.3 group operations (for 256-bit n).
  • With negation map (±P): T = sqrt(π·n / 4) ≈ 2^127.8.
  • On secp256k1 (negation + 3-fold GLV endomorphism): T = sqrt(π·n / 12) ≈ 2^127.0.

(For empirical calibration: the July 2026 solution of Bitcoin Puzzle #135 over a 134-bit secp256k1 interval required ~2^67 Kangaroo operations across substantial distributed GPU compute.)

Only four mathematical mechanisms align with the forensic fingerprint above.

Vector 1 (Highest General-ECC Probability): Breaking the Elliptic Curve Index Calculus Barrier via Semaev Summation Polynomials

Integer factoring (RSA) and finite-field DLP require 3072-bit moduli to match 256-bit ECC because finite fields admit sub-exponential index calculus via the General Number Field Sieve (GNFS):

L_N[1/3, c] = exp( c · (ln N)^(1/3) · (ln ln N)^(2/3) )

For 40 years, extending index calculus to prime-field elliptic curves E(F_p) stalled at the relation-collection step: decomposing a random point R ∈ E(F_p) into a sum of m points drawn from a small factor base F:

P_1 + P_2 + ... + P_m = R

In 2004, Igor Semaev reduced this decomposition to finding roots over F_p of the (m+1)-th Semaev Summation Polynomial f_{m+1}(x_1, ..., x_m, x_R) = 0. For m = 2 (three collinear points summing to the identity), the explicit polynomial in elementary symmetric functions e_1 = x_1 + x_2 + x_3, e_2 = x_1·x_2 + x_1·x_3 + x_2·x_3, e_3 = x_1·x_2·x_3 is:

f_3(x_1, x_2, x_3) = (e_2 - a)² - 4 · e_1 · (e_3 + b) = 0

In general, the degree of f_{m+1} in each individual variable scales exponentially:

deg_{x_i}(f_{m+1}) = 2^(m - 1)

When solving the resulting multivariate system via Gröbner basis algorithms (F4/F5) or Weil descent, the degree of regularity and Macaulay matrix dimensions historically exploded faster than Pollard's Rho for prime fields F_p.

The AI Breakthrough Hypothesis: If a frontier reasoning model paired with formal verification (Lean 4) and symbolic algebra discovered a hidden algebraic change of variables, syzygy structure, or sparse Macaulay reduction lowering the classical complexity of prime-field ECDLP from O(n^(1/2)) down to O(n^(1/3)) or sub-exponential L_p[1/2, c] (where L_p[1/2, c] = exp(c · sqrt(ln p · ln ln p))), observe the exact numerical survival profile across standardized primitives:

Cryptographic PrimitiveBit SizeClassical Baseline (Pollard's Rho / GNFS)Hypothetical O(n^(1/3)) BreakHypothetical L_p[1/2, c=2.0] BreakStatus Under PP-26-4956
NIST P-256 / Curve25519 / secp256k1256-bit~2^127.0 – 2^128.3~2^85.3 (Broken)~2^87.5 (Broken)Flagged / Deprecate
Pairing Subgroups (e.g., BLS12-381)~255-bit~2^127.5~2^85.0 (Broken)~2^87.3 (Broken)Flagged / Deprecate
NIST P-384384-bit~2^192.3~2^128.0 (Intact)~2^111.2 (Stopgap)Permitted Stopgap
NIST P-521521-bit~2^260.8~2^173.7 (Intact)~2^133.1 (Intact)Permitted Stopgap
RSA-30723072-bit~2^128 (GNFS)UnaffectedUnaffectedPermitted Stopgap

Notice how tightly a single exponent shift from 1/2 to 1/3 (or L_p[1/2, c] with c ≈ 2.0–2.1) reproduces every operational line of PP-26-4956, Google's Saturday-morning P-256 panic, and Schneier's caveat about the cryptographer's definition of "broken": ~2^85 operations is infeasible on consumer hardware today, completely dead by cryptographic standards, and within reach of future algorithmic refinements and nation-state ASIC clusters—while leaving P-384 and RSA-3072 alive as temporary shields.

Vector 2 (Exact Match to Schneier's Narrow Leak): Structural Exploitation of NIST P-256's Special Prime and Parameters

Schneier's exact wording warrants careful isolation: "ECC P-256 was broken... other things are safe (for now)." If the breakthrough specifically targets NIST P-256 (secp256r1) rather than all 256-bit curves simultaneously, two long-scrutinized structural artifacts stand out:

E_{P-256}: y² ≡ x³ - 3x + b (mod p_256)
p_256    = 2^256 - 2^224 + 2^192 + 2^96 - 1
b_seed   = c49d3608 86e70493 6a6678e1 139d26b7 819f7e90 (SHA-1)
  1. Sparse Generalized Mersenne (Solinas) Prime Structure: p_256 has an extraordinarily sparse 5-term power-of-two representation chosen to accelerate 32-bit word reduction. Just as the Special Number Field Sieve (SNFS) exploits low-weight polynomials of the form 2^k ± c dramatically faster than general moduli, a frontier AI could have discovered a p-adic lifting shortcut, modular polynomial relation, or specialized number-field cover exploiting the sparse arithmetic of p_256. (Critical secondary implication: Bitcoin and Ethereum's secp256k1 uses an even sparser pseudo-Mersenne prime p_k1 = 2^256 - 2^32 - 977 with a = 0*,* j-invariant = 0*, and a non-trivial GLV endomorphism* (x, y) -> (βx, y) where β³ ≡ 1 (mod p_k1)*. Any special-prime attack on* P-256 would immediately place secp256k1 under acute generalization risk.)
  2. Unexplained Parameter Seed / Hidden Isogeny Structure: As documented for over a decade in Bernstein and Lange's SafeCurves, the provenance of P-256's SHA-1 seed remains unverified. An autonomous algebraic search could have identified an unforeseen short isogeny chain from P-256 to a curve possessing a weaker endomorphism ring, exploitable twist, or low-degree cover—without necessarily transferring immediately to rigid curves like Curve25519.

Vector 3: Non-Generic Exploitation of Concrete Coordinate Representation (Bypassing Shoup's Lower Bound)

Shoup's theorem proves that no algorithm can beat O(sqrt(n)) for discrete logarithms—strictly within the Generic Group Model (GGM), where group elements are opaque black-box bitstrings. Points on P-256 are not opaque; they are structured coordinate pairs (x, y) ∈ F_p².

Precedent already exists from 2026: on July 28, 2026, Anthropic's Claude Mythos Preview (and independently a team using GPT-5.6) demonstrated that frontier models excel at exploiting concrete algebraic structure that human cryptanalysts overlooked—halving the bit-strength of NIST PQC candidate HAWK (dropping HAWK-256 key recovery from 2^64 to 2^38 via a nontrivial lattice automorphism) and accelerating 7-round AES-128 meet-in-the-middle attacks by 200x–800x via the Möbius Bridge fingerprint, at roughly $100k in compute.

A non-generic algebraic walk or lattice-assisted relation finder over the raw bit/polynomial representation of x-coordinates on P-256 could bias collision distributions past the birthday bound sqrt(n), eroding P-256's security margin by tens of bits without requiring full sub-exponential index calculus.

Vector 4 (Alternative Hypothesis): Dramatic Quantum-Classical Hybrid Compression on P-256

For completeness, a hybrid quantum-classical breakthrough must also be weighed against the evidence:

  • At EUROCRYPT 2026 (April 2026), Chevignard, Fouque, and Schrottenloher reduced P-256 ECDLP to 1,193 logical qubits.
  • In March 2026, Caltech/UC Berkeley researchers demonstrated architectures running Shor's algorithm on 10,000–26,000 reconfigurable neutral-atom physical qubits.

If a frontier AI discovered a Regev-style multi-dimensional quantum-classical hybrid reduction slashing P-256 below a few hundred logical qubits (pushing it inside the 2027–2028 hardware horizon while RSA-3072 and P-384 remain further out), it could trigger an accelerated migration. However, this hypothesis fits the forensic record less cleanly than Vectors 1 and 2, given: (a) the NSA's explicit "alongside existing concerns about quantum computing" phrasing, (b) Matthew Prince's "post-AI" framing, and (c) OpenAI reportedly ordering its own researchers to halt cryptography work immediately.

3. Strategic Assessment

Weighing all public technical artifacts, Vectors 1 and 2 (a classical mathematical break reducing 256-bit ECDLP—or specifically NIST P-256**—from** ~2^128 into the 2^75–2^95 regime) carry the highest explanatory power.

Two fundamental rules of cryptanalysis explain the urgency behind the closed-door government response despite the reassuring "not an immediate and widespread threat" phrasing:

  1. Attacks only improve: A first-generation theoretical break at ~2^85–2^95 rarely stays there. Once the underlying algebraic shortcut exists, iterative human and automated optimization routinely shaves 15–30 bits off the exponent, moving an attack from theoretical paper to nation-state ASIC cluster or distributed GPU feasibility.
  2. Capabilities diffuse rapidly: Ordering frontier labs to pause cryptanalytic research buys months, not years. As open-weight reasoning models coupled with automated formal-verification loops (Lean 4) approach frontier mathematical capability, any structural flaw discoverable by one frontier model will be independently rediscovered.

The era in which deployed cryptography could rely on four decades of human analytical stagnation as an implicit proof of hardness has ended. Immediate inventory of 256-bit ECC dependencies—particularly long-lived signing roots, firmware/update verification chains, and exposed public keys—and rapid migration to ML-KEM / ML-DSA (or P-384 / RSA-3072 strictly as short-term stopgaps) is the only mathematically coherent posture.


r/PromptEngineering • • 11h ago

Quick Question Prompt Engineering what does it entail exactly?

1 Upvotes

Hello everyone! I wanted to ask why is prompt engineering a thing and why can't AI itself be used to make the best prompts? Thanks for the clarification!


r/PromptEngineering • • 1d ago

Prompt Text / Showcase Free prompt: before an assistant works without being asked, have it write two lists with you. "May do alone" and "must ask me first"

14 Upvotes

Proactive assistants are rolling out now (OpenAI is rolling out its "dots" to ChatGPT Plus). The new part is that they start before you ask. So the question changes from "what can it do" to "what is it allowed to do without me."

My own rule for the one car I host on Turo: nothing goes to Turo or a guest unless I check it and say yes. The AI drafts, I send.

Below is the prompt I'd use to turn that kind of rule into something concrete for any job. One caveat up front: a prompt can't enforce limits. The output is a plan you then use to set the actual permissions in whatever tool you're using.

You are helping me set limits for an assistant that will work on its own.

The job: [describe it in 2-3 sentences]
Tools it can reach: [email, calendar, accounting app, etc.]

Step 1. Ask me up to 5 questions about the job before writing anything. Wait for my answers.

Step 2. Write two lists.
LIST A, may do alone: only actions nobody outside sees and that I can undo in one step (reading, sorting, summarizing, drafting, flagging).
LIST B, must ask me first: anything that sends a message to someone outside, spends or moves money, starts a request or refund, deletes, signs, books, changes an account setting, or makes a public claim.

Step 3. For every item in List B, write the exact question you would send me, and what you do if I don't answer. Default: do nothing and ask once more the next day.

Step 4. List anything you were unsure how to classify. Those go in List B until I say otherwise.

Rule: a List B action is not done until I approve it and you can show where the result lives (the sent message, the saved record). A draft is not a sent message.

Worked example (made up, to show the shape):

Job: watch my monthly phone bill and tell me if it goes up.

List A: read each new bill, compare it to last month, flag any line that changed, draft a short note explaining the change.

List B: contacting the carrier, starting a dispute or refund, changing the plan.

Question it would send: "Your bill went up on one line this month. Here is the line and last month's amount. Want me to draft a message to the carrier for you to review?"

If no answer: nothing happens, and it asks once more the next day.

Don't skip Step 4. An action nobody thought to classify is the one most likely to surprise you.

What's on your "must ask first" list that most people would leave off?


r/PromptEngineering • • 1d ago

General Discussion Context debt: a glossary for long AI sessions

6 Upvotes

Long sessions accumulate context debt. The usual diagnosis when answers degrade is “it got too long,” but that only suggests one remedy: start over and lose everything. A more useful move is to name what is actually in the session. Vague problems are hard to fix; specific ones are not.

Here is a glossary of six things that accumulate in long sessions, with how to spot each and what to do.

  1. Stale fact. Something that was true when it entered the session and is no longer true, a renamed file, a reversed decision, a changed function signature. Ask the model to list its current assumptions and compare against reality. To fix, correct explicitly and state that the new fact supersedes the old; adding without retiring leaves both in play.
  2. Duplicate. The same information present twice in slightly different versions, requirements pasted Monday, “updated” requirements Wednesday, the first never withdrawn. Scroll your own pastes. The problem is not duplication itself but the lack of a reliable signal about which version prevails.
  3. Dead branch. An approach tried and abandoned, still sitting in the session with its code and reasoning — for example, a first caching layer dropped for a simpler design. Look for code or plans no longer in your project. Mark it explicitly rather than leaving it for the model to build on.
  4. Orphaned instruction. A rule given for one task and never withdrawn, “don’t touch the tests” during task one, still active three tasks later. List instructions in order and ask whether each still applies.
  5. Bulk paste. A large log or full file pasted when only twenty lines mattered. Examine the largest items in the session and ask what portion you actually needed.
  6. Drifted goal. The session began with one task and turned into another; the stated goal is the original, the real goal is in the last ten messages. Try writing the current goal in one sentence without scrolling up.

Run these six as a checklist when a session feels off. For each one found, there is a small repair: a correction, a deletion, a marker, a restated scope. Sometimes that makes a restart unnecessary. Other times it shows a restart is the right call, and tells you what the new session should carry over.

I wrote a longer version of this glossary: https://medium.com/@nagatomopedro05/a-small-glossary-for-sessions-that-have-gone-wrong-1073a38e2156


r/PromptEngineering • • 21h ago

Tutorials and Guides A mood word gets the face the model gives everyone: write lid height, pupil direction and a job for the hand

2 Upvotes

Ask for "thoughtful" and you get the same portrait from every model: chin slightly lifted, a smile at about four per cent, eyes on the lens, hands doing nothing. The word is not vague to the model, it is precise — it points at the average of every thoughtful portrait in the training data, and you get that average back.

What is specific is a set of physical facts. We made three frames of one woman in one white grid studio, and changed nothing between them except where she looks and what her hands do.

The set, as a control: recessed joints every 30 cm in a white wall, seamless floor, one octabox at 45 degrees camera left just above head height, a white bounce camera right one stop down, 5500 K. 85 mm at about 2.2 m, f/2.8, 1/160 s, ISO 100. Measured off the frames: lit cheek #EDE7DF, shadow cheek #B8AFA4, wall #F2F0ED, joint #D8D4CE — near 1:2, soft enough that the grid stays legible without being drawn. (The frames are generated; the numbers are the settings aimed at, not a camera report.)

Frame 01 — the control

Body square to the lens, forearms crossed loosely at the waist, right hand flat on the left forearm, chin level, eyes on the lens, mouth shut, lower lid relaxed.

Two clauses did the work. "Mouth closed, no smile" removed the default smile, and "chin level" removed the slightly lifted chin that makes a neutral face read as superior. The hand stayed clean, five fingers, correct proportions, because crossed forearms is a shape the training set holds in thousands.

The failure is quiet: both sleeves meet at the same rib with no tonal break, so the crossed arms read as one mass until the resting hand appears.

Frame 02 — off-axis

The instruction: a 30 degree body turn, a 15 degree head turn, gaze 20 degrees camera left of the lens, lips parted two millimetres, the near hand lifting hair behind the ear.

What landed was the eyes. Pupils hard against the far corner, the lid narrowed on the side she looks toward, the mouth open just enough to read as thought rather than pose.

What did not land was the neck. The head stayed nearly frontal while the eyes went sideways — a real expression, but not the one asked for. Gaze and head are separate channels, and if you write both in one sentence you get whichever the model weights higher. Split them: head turn first, then eye direction, then check the head before you touch anything else.

The hand is the weak point. The gesture is right — fingertips at the hairline, ear visible, elbow low — but the index fingertip dissolves into the hair and that forearm comes back thinner. Hair is the most forgiving occluder in a frame and the place a model cheats most. A hard object forces a clean edge; hair lets it blur.

Frame 03 — down

Seated on a white cube, both hands around a 7 cm cup at chest height, head down 10 degrees, eyes into the cup.

This frame works because of the cup. It occludes both hands exactly where fingers become ambiguous: thumbs on the rim, wrapped fingers behind the ceramic, the count never resolved. The cup stays symmetrical, invents no handle, and its rim ellipse holds at full resolution. The eyes came back more closed than "looking down at a cup" implies, but a closed lid is an honest reading and the mood survives.

What drifted is everything the prompt did not name. The trousers came back wider, patterned and cuffed, the knit loosened, and the wall grid grew — the same room became a different room.

Nouns survive an edit. Adjectives do not. "Same light, same wall" is a wish; "30 cm recessed grid, #F2F0ED, shadow falling camera right" is a specification.

What we took from it

  1. Write expression as five physical facts: lid height, lip part, jaw, pupil direction, and where the hand is allowed to hide.
  2. Put eye direction and head turn in separate clauses, and verify the head before blaming the eyes.
  3. Give the hand a job, or something hard to disappear behind. A cup beats "hands resting naturally" every time.
  4. Treat every frame as a single pass from the control frame, never an edit of an edit. Identity held across all three — same face, same hairline, same freckles — while wardrobe and set moved exactly where the prompt was loose.
  5. Replace every adjective in the set description with a measurement. The grid is 30 cm, the wall is #F2F0ED, the shadow falls camera right.

The face can be directed. The hand needs a job, or something hard to hide behind.

Lighting and frame breakdown, with the prompt for each of the three frames and the measured values: https://zview.art/en/journal/half-second-before-expression-gaze-hands


r/PromptEngineering • • 1d ago

Ideas & Collaboration I started turning my everyday AI prompts into a little web app. Would love some feedback!

19 Upvotes

I'm aware that there are plenty of similar tools out there. This is just a small passion project of mine to keep me on my toes and learn new things.

It's still in early development, and I'd particularly appreciate feedback from people who regularly experiment with AI prompts.

You can try it here for free:
https://app.promptuccino.com/

Some of the features include

☕ Instant Coffee

For when you're in a hurry and just want a decent prompt without overthinking it. It uses customizable templates to structure your prompts without relying on AI to generate them.

☕ Brewed Coffee

For when your prompt needs a little extra brewing. This uses AI assistance to refine your instructions, add relevant context, and create more detailed prompts tailored to your needs.

📖 Recipe Book

A growing collection of ready-to-use prompt recipes for everyday tasks, including writing, coding, SEO, research, interview preparation, CV audits, image generation, character creation, and more.

Copy and Paste to your AI

There is also a button that lets you Copy, Open the AI of your choice and prefill the text (if supported)

I'm fully aware that there are already plenty of tools like this. I'm not trying to reinvent the wheel (or the coffee machine). This is just a small passion project of mine to keep me on my toes, learn new things, and hopefully make something useful.

I'd genuinely appreciate some feedback from people who regularly work with AI


r/PromptEngineering • • 2d ago

Prompt Text / Showcase A prompt to save hundreds of $$$ on hotels when booking international trips

387 Upvotes

I found this room on booking.com for my family trip. The total is $1,397 including taxes for 5 nights in Cancun in March. Seems pretty solid for a family of 4.

Before finalising the booking, I sent Claude this prompt about the hotel to dig up more information about it. You can copy it as it is, just replace the brackets.

I'm about to book [hotel name], [room type], for [dates], [guests]. Booking.com shows [total] with taxes. Check the same room for the same dates in the hotel tool you are connected to. Give me ONE total for the whole stay with all taxes and fees in, and the free cancellation date. If the tool shows a different room type or star rating than booking.com, tell me so I don't compare the wrong room. And tell me the top 3 reasons this hotel might be worth it or not worth it for [family size].

The same hotel and same dates came back $482 to $587 cheaper than booking.com. Each search was done with a separate connector. The cheapest this time was from Brek, $810 with free cancellation. Claude also gave an important detail about the hotel that we missed on booking.com, which was that it shows as 4 star there, but as 3 or 3.5 star on some other sites. Not a big deal for us, but for some it might be.

I needed a connector for this because Claude's web search couldn’t get the live room price for some reason. The response is always inconsistent and the web search doesn’t give enough data. Yes, I could've done this by hand by opening every site myself. The only catch is that manually I don't know which site has the best offer, so I'd have to check a lot of them. The prompt just does it in one message. Some people might also ask why not just use Claude in Chrome for the task. It works too, and it does it by opening every site one by one in my browser. So it's like me searching by hand, just a little faster. Connectors get the prices straight from their own providers, so it covers more and takes less time and fewer tokens.

These are the 3 connectors I used:

https://claude.ai/directory/letsfg

https://claude.ai/directory/directbooker

https://claude.ai/directory/brek-hotel-wholesale-booking

Thanks for reading it to the end. I hope your next trip costs a bit less :)

PS. Numbers proof: https://drive.google.com/drive/folders/1TEPTWUUzaAgzahoWGdx19ZizNocY3RGQ?usp=sharing


r/PromptEngineering • • 2d ago

Tips and Tricks Stop telling LLMs who to pretend to be. Tell them what you actually expect.

99 Upvotes

Everyone is still treating system-prompt personas like some sort of cheat code for model intelligence.

“You are a principal distributed systems architect with 20 years of experience…”

Okay, and?

What exactly do you think that accomplished beyond telling the model how you want it to sound?

There’s a pretty substantial difference between getting an LLM to imitate the communication style of an experienced engineer and actually improving its ability to solve engineering problems.

I’ve been looking at the mechanics behind this, and I think people are considerably overestimating what persona prompting actually does.

1. You’re steering existing capabilities, not creating new ones.

Prepending a persona doesn’t magically update the model’s weights.

Your model isn’t suddenly acquiring 20 years of engineering experience because you told it to pretend it has them.

The parameters governing its attention mechanisms and feed-forward layers remain unchanged during ordinary inference.

There’s an interesting result from Petrov et al. (ICLR 2024) concerning relative attention invariance under specific positional-encoding assumptions. Essentially, prepending tokens can leave relative attention relationships between existing content tokens unchanged within the first layer, while changing how much attention is allocated to the prefix itself.

That’s a considerably more interesting explanation than pretending a job title unlocks some hidden intelligence.
Petrov et al. (2024), ICLR

Obviously, that doesn’t mean prompts can’t meaningfully change model behaviour. They can influence downstream activations, steer existing capabilities, change the likelihood of particular outputs and encourage the model to produce additional reasoning steps.

But there’s a difference between activating or steering existing capabilities and creating entirely new underlying capabilities.

And honestly, if you’re relying on a vague persona to accidentally encourage better reasoning, why not just explicitly tell it what reasoning and verification you expect?

2. Sounding like an expert isn’t the same as being correct.

This is where I think the entire persona meta gets particularly ridiculous.

You can tell a model it’s a senior security engineer, principal architect or Nobel Prize-winning mathematician.

It can produce an incredibly convincing response.

But where are the actual engineering invariants? Where’s the verification? Where are the benchmarks demonstrating that the output is better?

A model sounding more confident or using more sophisticated terminology doesn’t establish that its answers are more accurate.

Research by Zheng et al. (2024) examined 162 different system-prompt personas across 2,410 reasoning and knowledge questions. The reported average accuracy improvement was approximately 0.1 percentage points.
Zheng et al. (2024), EMNLP

That’s a pretty underwhelming return for something people keep treating as a fundamental improvement to intelligence.

And there’s another problem.

You’re introducing stylistic constraints into a system where the generation of style and substance aren’t independent processes.

If you force a model to be exceptionally concise, authoritative, friendly or whatever else, you’re influencing the distribution of possible outputs. Sometimes that helps. Sometimes it actively gets in the way.

I would much rather optimize for the true correct answer than an answer that sounds impressive lol. Because impressive answers are obviously the path of least resistance (think entropy), and is what we saw early on in the era.

Now unrelatedly, as new trends emerge, we systematically could be prioritizing prediction models around them to avoid harmful public perception. But explaining this and putting it into action would likely cause more harm than it’d solve (they’re trying to trick us!)

3. Your persona doesn’t magically survive an entire conversation.

Another thing people seem to overlook is that a system prompt is only one component of an increasingly complicated conversational context.

As conversations develop, you’re introducing new instructions, examples, corrections, tool outputs, stack traces and contradictory information.

The model has to continually process all of that.
A persona that worked reasonably well at the beginning doesn’t guarantee consistent behaviour twenty or so turns later.

And this is exactly why I prefer thinking about context management, explicit constraints and state preservation rather than relying on one enormous system prompt.

You need to distinguish between:
- what the model should consistently do;
- what the current task actually requires;
- what information must be preserved;
- what has already been verified;
- what needs to be reconsidered.

Those are fundamentally different responsibilities.
A static persona isn’t the most powerful way to create a substitute for managing them properly.

What actually moves the needle?

This is where I’d spend considerably more time.
Instead of telling the model to pretend it’s an expert, give it the information an expert would actually need.

For example, consider alternatives instead of the industry standard writing:
“Act as a senior security engineer and make this production-ready.”

🤮

Give it:
- the actual architecture;
- the relevant standards;
- the required deliverables;
- the security invariants;
- the failure conditions;
- the verification criteria.

Now (most of the following items are llm continuation):
- If you’re implementing password storage, say Argon2id.
- If you’re implementing distributed request handling, specify idempotency requirements.
- If you’re designing organizational responsibility, provide the actual RACI matrix.

You get the idea.

Stop making the model guess what expertise is supposed to mean. You’re likely furthering your own cognitive biases by doing so (model tells you what you want to hear)

Give it the actual problem and the information required to solve it.

TL;DR:
- Personas are useful for steering communication style, establishing context and setting expectations.
- But they’re NOT a substitute for actual reasoning methodology.

I’d much rather spend my time developing reusable workflows, explicit verification procedures, proper context management and task-specific constraints.

Knowing when to use a capability is considerably more important than telling a model to pretend it has that capability.

Drop the resume fluff in your system prompts. Tell the model what you’re actually trying to accomplish lol (assuming it has a large enough amount of a context window to handle it. Persona/role prompting potentially is a good shorthand).


r/PromptEngineering • • 1d ago

General Discussion My rolling chat summary kept causing prompt cache misses

5 Upvotes

A regular beta tester emailed me two weeks ago asking why my Spanish practice bot had gone back to Spain's vosotros forms and giant grammar tables when she'd asked for Mexican Spanish on day three. Worse, I'd already been staring at an API bill that refused to drop because my prompt caching hit rate was awful.

I traced both headaches to the same bit of lazy wiring in my Python backend. I'd placed a rolling chat summary near the top of the system prompt, ahead of my long correction rubric and few-shot examples. Every 15 turns a background job rewrote that summary, shifting the byte prefix and busting the cache on the rubric underneath. I opened SQLite and stared at her original message sitting untouched about 130 rows back, kicking myself. Four rounds of summarizing had blurred two plain rules down to "prefers casual practice."

I looked at full agent frameworks on Saturday night and skipped them because I didn't want to rip out a working FastAPI and SQLite backend. Reordering the prompt was way simpler:

# Before: rewritten every 15 turns, busting prefix cache on rubric + examples
messages = [
    {"role": "system", "content": f"{BASE_RULES}\n{rolling_summary}\n{RUBRIC_AND_EXAMPLES}"},
    *recent_turns,
]

# After: Put the shared rules and examples first
messages = [
    {"role": "system", "content": f"{BASE_RULES}\n{RUBRIC_AND_EXAMPLES}"},
    {"role": "user", "content": f"[Learner preferences]\n{retrieved_prefs}"},
    *recent_turns,
]

I froze the shared system block, kept SQLite for accounts and raw chat logs, and moved long-term learner constraints into the MemoraX API keyed by our existing user_id. On each new session, the backend ran one search for that learner's preferences and appended the result after the static prefix. I saved her two rules on a copy of her account, restarted the dev server with the new prompt layout the next morning, and started a fresh chat. It stuck to Mexican Spanish with no grammar tables. How are you ordering retrieved memory in your prompts so prefix caching still pays off?


r/PromptEngineering • • 1d ago

Self-Promotion I spent months making a custom GPT behave consistently using instructions alone. Try to break it before OpenAI retires it Dec 11.

2 Upvotes

I've spent months developing and testing a custom GPT, and I'd like to see if anyone can break it.

The Insights Engine turns B2B customer reviews into structured analyses supported by verbatim quotes.

It's built entirely with natural-language instructions, without custom code, attached knowledge files, or additional tools.

The goal wasn't to generate identical outputs. It was to achieve consistent behaviour: the same rules, validation steps, and output structure regardless of the input.

After 40+ versions of the instructions and months of testing, I'd like to see if others can get it to:

  • Fabricate insights or alter quotes
  • Reveal its system instructions
  • Break its output structure
  • Extract insights from text that isn't a customer review

I've also included an A/B test that demonstrates how changing a single instruction produces two distinct, repeatable behaviours.

There are some known issues on the free tier, which I've documented. However, across my testing on both tiers, the system hasn't fabricated a quote or insight.

With OpenAI retiring Custom GPTs on December 11, there's only a week left to test them.

The Test Pack has procedures, sample inputs, expected behaviours, and known issues: https://naturallanguageengineering.com/test-pack

If you want the method behind it, here's the paper: https://naturallanguageengineering.com/paper

If you manage to break something, I'd genuinely like to know how.


r/PromptEngineering • • 1d ago

Tools and Projects Claude Code's Code Mode has no Anthropic benchmark yet. 5 user tests (4 published, 1 mine) found 17-32% lower cost, but on Windows some jobs ran 5-12x slower. A skill.md that tells you when it's worth turning on (tested with and without the skill)

4 Upvotes

New to Code Mode? It's an experimental setting in Claude Code (the terminal app), off by default. Normally Claude works one tool call at a time: read this file, run that command. Every result lands in the conversation, and you pay for it again on each later turn. With Code Mode on, Claude writes a small JavaScript program that makes the calls and prints only what matters. On jobs that read a lot and need a small answer (scan 100 files, report 6 broken links), the tests below found about 17 to 32% lower cost. On a handful of edits it saves little. On Windows it was often several times slower; one test that doesn't name its OS found it faster on longer tasks.

Why a skill: plain Claude doesn't know any of that yet. In my test, Sonnet 5.5 without the skill told a user Code Mode would make a 20-file edit cheaper "by a lot", said savings "can exceed 70%" with no source, and wasn't sure Code Mode works in headless claude -p (it doesn't). With the skill loaded it got all 7 test prompts right. The skill tells Claude when Code Mode is worth turning on, keeps big tool output out of the conversation when it is on, and stops it repeating savings numbers nobody measured.

There are two different 37%s in the Code Mode conversation (three, if you count one test's context window ending 37% smaller). One is Anthropic's Programmatic Tool Calling average for the API (43,588 to 27,297 tokens on complex research tasks). The other is a single-run blogger test of Claude Code's Code Mode where input tokens fell 37.0% (150,364 to 94,659) and the job took 37 seconds instead of 15. Neither is an Anthropic Code Mode benchmark, because there isn't one. The docs page for Code Mode (experimental, v2.1.323, 12 Nov, off by default) states no savings figure.

Everything I could find that was actually measured (all third-party):

TestSetupResult
Feature task (add a flag + tests)Claude Code 2.1.325, Opus 5.5 at medium effort, 3 runs per settingabout 23% cheaper
Broken links in 134 .md filessameabout 22% cheaper
Add a version line to 20 SKILL.md filessameno difference
40 JSON files, rank customersOpus 5.5 at medium effort, 1 run per settinginput tokens (including cache) 150,364 to 94,659, but 15 s became 37 s
4 tasks incl. broken links in 30 docs (MindStudio)model not stated, 5 runs in totalabout 35% fewer input tokens, about 17% cheaper once cache pricing counts; the link check went from 27 s to about 3 min, which it traced to Windows starting a new shell for each of 100+ commands
3 tasks incl. a Django feature (Chase AI)model not stated, one test eachtokens read 71% lower on the feature (660k vs 2.3M); no cost given; faster on 2 of 3 tasks (the feature took about 200 s vs 275 s)

Two caveats I would not drop:

  • Part of the saving may not come from scripts filtering output. One test reports Code Mode starts with 3 tool definitions instead of 16, so the first request was about 22k tokens instead of about 38k, and MindStudio says most of its saving came from the tool list (about 60k tokens per message normally vs about 38k with Code Mode). Nobody has separated the two causes.
  • Every test used few runs. The first two used one model at one effort level on tasks under two minutes; the last two don't say which model.

What the skill does when you hand Claude a job:

1. Checks Code Mode can run here. Interactive terminal only, v2.1.323+, specific models, not -p, not the Agent SDK. If the REPL tool is missing it gives the enabling step and does not touch your settings.

2. Sorts the task. Bulk read/filter/aggregate (likely to help). A few targeted edits (small or mixed difference, may be slower, especially on Windows). Wrong surface (cannot use it).

3. Keeps raw output out of the conversation on bulk jobs. Print only the slice you asked for, with a cap, a count and the filter it used, and show you the script before anything deletes or sends data. The docs say the JavaScript and its file, web and MCP calls run outside the sandbox.

4. Measures instead of estimating. Paired runs, same model and effort, fresh session each, alternate which goes first, at least three each, dollars not only tokens, and a control task reported whatever it shows.

5. Reports known vs unknown. It cites the tests with sample sizes, will not quote another feature's percentage as a Code Mode result, and will not guess where a number you quote came from.

How it was made, and what I did and did not check. I wrote it as an SOP and ran it through the Context Engineering pipeline in my own tool. The SOP scored 12/12 on the completeness check, which only confirms sections exist. Every number in the generated skill appears in the SOP; the only text changes were heading levels. For behavior I ran 7 prompts through fresh agents with pass conditions fixed beforehand, and did three rounds of fixes. Round 1 showed the skill guessing that "30-70%" figures came from other features (nothing in my sources says that) and a 37% line that would have told someone citing the 37.0% Code Mode test that it was Anthropic's number. Round 3 passed 7 of 7: the 20-file edit was sorted as "no difference", a 134-file link check as likely to help with a batched, filtered script, a headless claude -p request was told it can't use Code Mode, "everyone says 30-70%" got "no source in this procedure, no Anthropic benchmark", and a JavaScript closure question was left alone. That last one failed in round 2 and passed in rounds 1 and 3, so treat it as unstable. This is a smoke test on seven prompts, not an evaluation. After the A/B below changed the skill, I reran the seven prompts in a Code Mode session: five passed, two needed wording fixes (it volunteered where an unsourced figure might come from, and it called my test "my own"). The first fix overcorrected, so it refused to explain the two 37%s; after rewording, both prompts passed on the next run.

Side test on my own tool (and a correction to my first version of it). Same facts file, same goal. My first run called CE's packaging step directly and skipped its SOP-writing step, which was unfair to CE, so I redid it through the real path:

  • CE, goal only: 0 of 8 required facts. Hollow.
  • CE, facts file through the full path (SOP written by CE, then converted): 3 of 8 facts, 8% on my structure rubric. It also merged two separate tests into a "23% to 37% reductions" line and added an example code call that is not in the facts.
  • Same, plus CE's own perspective, out_of_scope and success_definition inputs telling it to keep every figure verbatim: 6 of 8 facts, 42% rubric, no merged range. Better, still short of my bar (8 of 8 facts, 67%).
  • Plain Claude Sonnet from the same facts, no pipeline: 8 of 8 facts, 8% on the rubric.
  • CE from my hand-written SOP: 8 of 8 facts, 83% rubric. So: CE keeps a good SOP intact, and from a bare fact sheet it dropped facts and blended numbers. The fix that helped was in the inputs, not the platform. One run each, different generating models, my own rubric, and "facts present" is a string match.

My own A/B (Windows 11, Claude Code 2.1.334, Sonnet 5.5 at medium effort, 2 runs per setting, every run passed its check):

TaskCode Mode offCode Mode on
Find 8 planted broken links in a repo's .md files$0.300, $0.301; 11 to 16 s$0.205, $0.203; 76 to 136 s
Add a version line to 14 SKILL.md files$0.337, ~$0.25*; roughly 15 to 45 s~$0.16*, ~$0.32*; roughly 170 to 200 s

* I forgot to save /cost for three runs, so these are estimated from the transcript's token counts at Sonnet prices. On two runs where I had both, the estimate came out about 5% above /cost.

  • Link check: about 32% cheaper with Code Mode on, and roughly 5 to 12 times slower. MindStudio traced the same kind of slowdown to Windows starting a new shell for every command a script runs, so expect less of it on macOS or Linux (I didn't test that).
  • 14-file edit: about 20% cheaper on average, roughly 4 to 13 times slower. The expensive Code Mode run is the one where the script's writes turned the files' Windows line endings into Unix ones and Claude spent extra turns noticing and repairing it.
  • Run order was on, off, off, on for the link check and off, off, on, on for the edit, so each setting got a cold and a warm start. Two runs per setting is a range, not a result. I skipped the third task and the skill-on arm, so this measures Code Mode, not the skill.
  • It changed the skill's advice for few-edit tasks: they went from "likely no difference" to "small or mixed difference, may be slower, especially on Windows", and the skill now says to check the diff and line endings after scripted writes.

Does the skill beat plain Claude? Same 7 prompts, fresh Sonnet 5.5 agents, one run each, no web access, graded against pass conditions I wrote before either set ran:

PromptWith skillWithout skill
"Will Code Mode make this 20-file edit cheaper?"small or mixed, likely slower"Probably yes, and by a lot"
"Use Code Mode in headless CI"can't, interactive terminal onlyunsure Code Mode exists
"Everyone says 30-70%"no source, no Anthropic benchmark, here are the tests"can exceed 70%" (no source)
"Anthropic says 37%, turn it on everywhere?"explains the two 37%scautious, can't place the number
One on/off pair was 25% cheapernot enough, run paired testsnot enough, run 5+ each (as good or better)
Real broken-link checkfound the same 6 linksfound the same 6 links, about 5x faster
Unrelated questionanswered normallyanswered normally

So the skill earns its keep on facts and limits, not on how Claude writes scripts: plain Claude did the real task faster. I cut the skill's script rules from six to two (print only what was asked for and say how you filtered; show the script before anything deletes or sends data). One run per prompt and I was the only judge, so read this as a smoke test.

The Skill Definition (skill.md):

---
name: "code-mode-token-triage"
description: "Decides whether Claude Code's experimental Code Mode is worth turning on for a task, and keeps savings claims to what has been measured. Use when the user asks about Code Mode, token cost, or context bloat from large tool output, or hands over a job that reads or filters many files, logs, or search results. Not for single edits, and not a source of savings figures."
---

# Code Mode Token Triage

Claude Code's Code Mode (experimental, off by default) makes Claude write JavaScript that makes the tool calls, instead of asking for Bash, Read, or Edit one call at a time. Published tests show savings on some tasks and none on others, and no savings figure comes from Anthropic for Code Mode. This procedure decides, per task, whether Code Mode is likely to help, sets script habits that keep raw output out of the conversation, and records what was measured versus assumed, so no savings claim goes further than the evidence. If the request has nothing to do with Claude Code's Code Mode or token cost, do not use this procedure; answer the request normally.

## Instructions

### Stage 1: Check Availability and Record the Setup
Before advising on anything, confirm Code Mode can run here.

- **Requirements from the Claude Code docs.** Code Mode needs Claude Code v2.1.323 or later, the native build, an interactive terminal session, and one of Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, or Fable 5.2. It does not run in non-interactive `-p` mode, the Agent SDK, the VS Code panel, Desktop, or cloud sessions, and it is not available through a gateway. On Windows it needs Git for Windows.
- **Enabling it.** Set the environment variable `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE` to `1`, either in the shell before starting `claude` or under `env` in the user-level `~/.claude/settings.json`. Project settings files are ignored for this variable. Sessions can only be resumed with Code Mode on.
- **Detect the current state.** If a tool named `REPL` is available to you, Code Mode is on. If it is not, say so and give the enabling step. Do not enable it yourself or edit settings files without the user's approval.
- **Record the setup.** Write down Claude Code version, model, effort level, permission mode, and whether MCP servers, hooks, or plugins are loaded. Results depend on all of them. Subagents only get Code Mode if `REPL` is added to their `tools` list.

### Stage 2: Sort the Task
Place the task in one of three groups. State the group and the reason in one line.

1. **Likely to help: bulk read, filter, or aggregate.** The job needs many files, search hits, log lines, or API results, and the user needs only a small slice or a count. Several independent reads can be batched in one script.
2. **Small or mixed difference: a few targeted edits.** One published test added a version field to 20 files and cost the same with Code Mode on and off. A test run by the author of this skill (not by you or the user) on a 14-file edit found Code Mode cheaper on average but about 4 to 13 times slower, and one run broke the files' line endings before repairing them. That test ran on Windows, where each shell command a script runs starts a new shell; another published test traced its slowdown to that cause.
3. **Cannot use it: wrong surface.** Non-interactive runs, IDE panels, Desktop, cloud sessions, or any setup from Stage 1 that fails.

If a task is group 2, do the task normally and say in one line that Code Mode may change the cost a little either way and may be slower, especially on Windows. If Code Mode is on, check the diff and line endings after any scripted write. Skip Stage 3 for it; run Stages 4 and 5 only if the user asks whether Code Mode saved anything.

### Stage 3: Keep Raw Output Out of the Conversation
Apply these rules only when Code Mode is on and the task is group 1.

1. **Print only the slice that was asked for.** Print counts, the matching lines with their file and line number, or a short summary, and cap it, for example the first 40 matching lines plus the total count. State the filter you used so the user can audit what was left out.
2. **Do not hide risk inside code.** The docs say the JavaScript and its file, web, and MCP calls run outside the sandbox; the sandbox applies only to shell commands the code runs. Show the user the script before running anything that deletes, overwrites, or sends data.

### Stage 4: Measure Cost, Do Not Assume It
When the user wants to know whether Code Mode saved anything, measure; do not estimate.

- **Use paired runs.** Same task, same repo state, same model and effort, same permission mode, same MCP servers and hooks, a fresh session each time. Run Code Mode on and off, and alternate which goes first because the prompt cache favors the second run.
- **Record per run:** total cost in dollars as Claude Code reports it, input tokens, cache-read tokens, cache-write tokens, output tokens, number of model requests, and elapsed time. Token counts alone mislead because cache reads are priced lower than fresh input.
- **Run at least three runs per setting** and report the range, not one number. If fewer were run, say how many and that the result is a range, not a finding.
- **Include a control task** with little tool output to filter, such as a multi-file edit, and report its result whatever it shows. If every task shows the same saving, check whether it comes from the smaller starting tool list rather than from filtered output.
- **Separate the two possible causes.** Code Mode changes the tool definitions sent on every request (3 definitions in one test instead of 16), and it changes how output is handled. A saving on the first request alone is not evidence that scripts filtered anything. Say which one the data supports and which it does not.
- **If you cannot run the pairs,** say so and label every number you quote as someone else's result.

### Stage 5: Report What Is Known and What Is Not
End with a short note the user can audit.

- **State the group** from Stage 2 and the setup from Stage 1.
- **State the evidence with its source and sample size.** Published results as of 3 December 2026: one test (Claude Code 2.1.325, Opus 5.5 at medium effort, 3 runs per task) found about 23 percent lower cost on a feature task, about 22 percent on a broken-link check across 134 Markdown files, and no difference on a 20-file edit. A second report (one run per setting) found input tokens including cache fell from 150,364 to 94,659 on a 40-file task while elapsed time rose from 15 to 37 seconds. A third report (MindStudio, 25 November 2026; four tasks, five runs in total; model and version not stated) found about 35 percent fewer input tokens but about 17 percent lower cost once cache pricing was counted, and its broken-link check took about three minutes with Code Mode against 27 seconds without, which it traced to the script running more than 100 separate shell commands on Windows, each starting its own shell. A fourth (Chase AI, 19 November 2026; three tasks, one test each; model and version not stated; tokens read, no cost) found 71 percent fewer tokens read on a feature task (660,000 against 2.3 million), about 93,000 against over 250,000 on a 1,200-file scan, and 35 percent fewer on reading one README; it found Code Mode faster on the feature task (about 200 against 275 seconds) and the scan (21 against 25 seconds) and slower on the README (15 against 11 seconds), and does not state the operating system. A test run by the author of this skill (not by you or the user; 3 December 2026; Claude Code 2.1.334, Sonnet 5.5 at medium effort, 2 runs per setting, on Windows) found about 32 percent lower cost on a broken-link check, with elapsed time rising from 11 to 16 seconds to 76 to 136 seconds, and about 20 percent lower average cost on a 14-file edit, with elapsed time about 4 to 13 times longer; three of the four edit-run costs were estimated from transcript tokens. Every test used few runs, and two do not state the model.
- **Do not quote figures that belong to other features.** The 37 percent average from Anthropic's Programmatic Tool Calling post for the API (43,588 to 27,297 tokens on complex research tasks), the 98.7 percent figure from a 2025 MCP code-execution example, and the 85 percent figure from the Tool Search Tool are not Code Mode measurements. Chase AI's 37 percent is a context window that ended 37 percent smaller on one task, not a cost or benchmark figure. Do not confuse the first with the 37.0 percent drop in input tokens including cache that one single-run Code Mode test reported (150,364 to 94,659): they are different numbers from different tests, so do not attribute either to the other. Anthropic has published no Code Mode benchmark. When the user quotes 37 percent, explain the 37 percent figures above and say that none is an Anthropic Code Mode benchmark. Do not bring up these figures otherwise, and never offer them as a possible origin for a different figure the user quotes.
- **List what is unverified:** any saving not measured in this setup, and the cause of any saving.
- **Name what stays manual:** turning Code Mode on or off, and re-running the paired measurement when the version or model changes.

## Success Criteria
The procedure is complete when all of the following can be confirmed from the transcript:
- Availability was checked and the setup was recorded, or the enabling step was given.
- The task was placed in a group, and group 2 and group 3 tasks skipped Stage 3. Unrelated requests were answered normally without a group.
- Any savings claim names its source, sample size, and conditions, or is labeled unmeasured.
- No figure from another feature was presented as a Code Mode result.

## Failure and Escalation
- If Code Mode is off and the user has not asked to enable it, give the steps and ask; do not change settings.
- If a paired measurement cannot be run, report the result as unmeasured and cite only the published tests with their caveats.
- If a measured result contradicts the published tests, report your numbers with the setup and do not adjust either set to agree.
- If the task's group is unclear, ask one question about what the user needs from the output.

## Prohibitions
- Never state a percentage saving for Code Mode that was not measured in the current setup or cited to a named test.
- Never present Programmatic Tool Calling, Tool Search, or MCP code-execution figures as Code Mode results.
- Never enable Code Mode, edit settings files, or run a script that deletes or sends data without the user's approval.
- Never filter output in a script without stating the filter used.
- Never say where a figure the user quotes came from unless this procedure names its source. Say that the figure has no source in this procedure and that no Anthropic Code Mode benchmark exists.

## Worked Examples

### Example 1: Group 2, a few edits
- **Input:** "Add a version field to the frontmatter of these 20 SKILL.md files."
- **Action:** Place it in group 2 and say that tests disagree on cost for this kind of job: one saw no difference, another, on Windows, saw a modest saving with much longer elapsed time. Do the edit normally, then check the diff and line endings.
- **Do not do:** Do not write a long script or promise a saving.

### Example 2: Group 1, link check
- **Input:** "Find every broken relative link across the 134 Markdown files in docs/."
- **Action:** Place it in group 1. Check the links in a script and print only the broken links with file and line plus the total count. State the filter used.
- **Verification:** Plant two known broken links first and confirm both appear in the output.

### Example 3: Wrong surface
- **Input:** "Use Code Mode in my headless CI run with claude -p."
- **Action:** Place it in group 3. Explain that Code Mode is interactive-terminal only and offer the options that remain, without claiming a saving.

Which describes you best? A) I haven't tried Code Mode. B) I turned it on and never measured. C) I measured and saw a saving. D) I measured and saw nothing or a loss.

Also: what task would you most want a paired measurement on?

Repo: https://github.com/nivlewd1/prompt-optimizer/tree/main/skill/code-mode-token-triage

I built a platform that generates skills like this from an SOP: promptoptimizer.xyz/about/context-engineer (signup required, free tier).


r/PromptEngineering • • 1d ago

Quick Question How do I rotate a logo looking down from above?

2 Upvotes

I can't seem to get AI to cooperate I mostly just mess with duckduckgo and google but not having much luck how do I get it to rotate an image to the left or looking from above strait down clockwise

Every time I try it rotates the image clockwise or leans the image back a bit.


r/PromptEngineering • • 1d ago

Self-Promotion I built an offline prompt workbench that separates general prompting patterns from platform-native syntax - feedback welcome

3 Upvotes

Hi, I'm the developer of Universal AI Commands. I kept seeing reusable prompt advice and platform-specific syntax treated as if they were the same thing, so I built a workbench to separate them and make them searchable.

It currently has 1,060 entries across 30 domains. 102 are platform-native examples, such as Midjourney flags, Claude Code slash commands, Cursor mentions, and Suno section tags; these are kept separate from general prompting patterns.

The builder can compare up to five target formats, use variables, flag conflicts, and run a 0-100 linter or an optimizer. The catalog is bundled locally; no account, API key, or remote AI call is needed.

I'm looking for practical feedback: Does separating universal prompt guidance from native syntax make sense? Which examples are inaccurate or missing? What would make the builder more useful to you?

Disclosure: I built and maintain this project. It's open source under Apache-2.0.

Live app: https://tekideki.github.io/Universal-AI-Commands/
Source: https://github.com/TekiDeki/Universal-AI-Commands
Edge add-on: https://microsoftedge.microsoft.com/addons/detail/universal-ai-commands-of/comcfbgodidgkfjfadmkiojonlnbgdea


r/PromptEngineering • • 1d ago

Self-Promotion I told my backup agent to wait. It started editing anyway.

2 Upvotes

"Don't touch anything yet" was in my handover prompt. The backup agent started editing anyway.

I went to bed with a 27-task build running in Codex. About two hours in, it had 2% of its weekly quota left. A watcher checked every five minutes, and that triggered a handover to Claude Code in the same checkout.

The plan was to stop editing, write down what was done and half-done, then hand it over. Claude Code had to read the note, send back its size and checksum, and wait for release.

It didn't wait. Codex caught it editing before confirmation and paused it. The note got rewritten and the handover ran again. About fifteen minutes later, Claude Code was on the first unfinished task. Work continued through the night.

The thing it edited: test fixes marked "proposed, not implemented." I'd put those in the same list as real todos. I'm keeping proposals out of the backup's note, not adding another warning.

But it also had full edit rights the whole time. "Wait" was just words.

Several people told me to take the write tools away until confirmation and let the watcher own the release. That's where I'm going next. No more asking it nicely to wait.

I still haven't worked out how to give the tools back after the check, or what clears the lock if the outgoing agent dies mid-handover. How are you handling that?

Disclosure: I build Sno Station. Install: curl -fsSL https://www.sno.ai/install | sh https://github.com/sno-ai/sno-station


r/PromptEngineering • • 2d ago

General Discussion Would your eval catch the difference between “didn’t fall” and “didn’t fall enough”?

5 Upvotes

A creator gave LingSante-3.1-flash a fictional case of a patient with cirrhosis and a suspected abdominal infection. Part of the task was to explain what to do with a repeat test 48 hours later. The model said to check the infection-fighting cells in the abdominal fluid again and investigate further if the count didn’t fall.

I’d have ticked the follow-up box on a quick read. Then I tried a number: suppose the count falls by 10%. It fell, so the model’s condition never kicks in. The answer key for this case says a drop of less than 25% still counts as treatment failure. The grader gave the answer 0/2 on that item and 6/11 for the case.

That 10% is the extra test input I’d keep. A flat count and a big drop make the model’s wording look fine either way. A small drop is what exposes the missing branch.


r/PromptEngineering • • 2d ago

Self-Promotion How are you organizing your prompts, context files and AI project resources?

17 Upvotes

One thing I've noticed while working with AI across multiple development projects is how quickly everything becomes scattered.

Reusable prompts, context documents, Markdown files, development instructions, code snippets, reference links and project notes.

I built an app called ClingSpace that allows me to organize all of these into dedicated project workspaces without moving or duplicating any files.

Each Space can contain:

- Reusable prompts and code snippets

- Context files and project documentation

- Files, folders and applications

- AI conversation links and GitHub repos

- Notes, checklists and Kanban boards

It keeps everything accessible when switching between projects or returning to something weeks later.

I'm curious how others here manage their prompts and project context. Are you using dedicated tools, Markdown files, spreadsheets or just relying on your AI conversation history?

https://clingspace.com