r/PromptEngineering • • 4h ago

Quick Question Prompt Engineering what does it entail exactly?

0 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 • • 1h 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 • • 4h 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 • • 14h 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 • • 20h 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