r/PromptEngineering • • 16h ago

Prompt Text / Showcase How I stopped ChatGPT, Claude, and Gemini from hallucinating and forgetting rules on long projects (Copy-Paste State Protocol)

22 Upvotes

Whenever a thread gets too long or I switch between ChatGPT, Claude, and Gemini, asking for a normal "summary" always backfires. The model starts mixing up old ideas I already rejected with current decisions, or just guesses missing details.

What actually worked for me is forcing the AI to spit out a strict state file (`PROJECT_STATE.md`) before I close a chat, tagging every line so it can't mix facts with guesses.

Here is the prompt I paste at the end of a session:

"Act as a strict Technical Archivist. Reconstruct the current state of our project into a clean Markdown block called `PROJECT_STATE.md`. Follow these 4 rules:

  1. Tag every claim using ONLY: `[VERIFIED]` (proven by tool/file/user), `[DECISION]` (explicitly agreed rule), `[HYPOTHESIS]` (unproven idea), or `[UNKNOWN]` (missing data).
  2. Create a dedicated section called 'REJECTED / DO NOT REPEAT' listing approaches we already ruled out and why.
  3. Do NOT invent missing numbers or URLs. If something is missing, mark it `[UNKNOWN]`.
  4. Keep it concise and ready to be pasted into a fresh AI session."

Then I just paste that block at the start of a new chat. It saves a ton of time repeating myself. Figured I'd share it here in case anyone else is dealing with context drift.


r/PromptEngineering • • 23h ago

Quick Question When using ChatGPT or Claude to prepare for interviews, what happens when your answers sound too generic?

5 Upvotes

I've been exploring how people use ChatGPT, Claude, and other AI tools to prepare for job interviews.

Something I've noticed is that AI can generate polished answers, but sometimes those answers don't really reflect the candidate's actual experience.I'm curious whether others have experienced this.

Imagine a workflow like this:

1. Choose: Enter your target role, select one real experience, and answer a behavioral interview question in your own words.

2. Diagnose: AI identifies vague parts of your answer and asks targeted follow-up questions to understand what actually happened.

3. Discover: You provide more context about the problem, your actions, and the outcome.

4. Improve: AI helps structure your experience into a natural, convincing answer without inventing achievements.

5. Practice: AI asks two follow-up questions to help you prepare for what an interviewer might ask next.

The goal would be to turn one weak or vague answer into a stronger, personalized interview story in around 15 minutes.

I'm interested in hearing from people who have actually used ChatGPT, Claude, or dedicated AI interview preparation apps.

Would a guided workflow like this help you prepare better, or would it feel like too many steps?

I'm particularly interested in real experiences: what didn't work, and what you wish these tools did differently.


r/PromptEngineering • • 18h ago

General Discussion what would a good "im not sure" answer from an AI even look like

4 Upvotes

someone in my last thread said the best version is when it marks the exact sentence it cant back up, right next to that sentence, not one confidence score on the whole answer. so like "renews in march (not sure, couldnt find the date, maybe 40%)" and everything it does have a source for just stays plain

idk if that gets annoying in the middle of a long answer tho. anyone already doing this? what do you put in the prompt


r/PromptEngineering • • 2h ago

General Discussion Ughh !! It's me or sometimes this ai can understand my instructions, it's frustrating sometimes to convey the proper commands through normal english in specific tasks.

2 Upvotes

I mean i should take lessons in prompt engineering or learn to command better, coz it's time consuming and token wasting to get job done the way i am doing currently. So anything that can help me to improve at this??


r/PromptEngineering • • 9h ago

General Discussion How often do you rerun evals after a prompt change?

2 Upvotes

Every small prompt tweak seems to fix one thing and quietly break another. Do you rerun your full eval suite on every change, or just a subset? How long does your run take?


r/PromptEngineering • • 15h ago

Prompt Text / Showcase I built a free tool to compare two prompts side-by-side - with a live word diff

2 Upvotes

I kept rewriting prompts and forgetting what I actually changed, so I built PromptDiff.

Paste two versions of a prompt, it shows a live word-by-word diff- green additions, red removals - with a similarity score, added / removed/ unchanged counts, and token + cost estimates.

It has 280 built-in examples to try, and {{variables}} in a prompt automatically become fill-in test fields. Free, no account, works on phone:

https://muse.ai/s/promptdiff-xfz75r1xwxgt1h/ucQWPGvITUnzZFRt5g7iF-Cj45ld_RLD6mKmAwy2UEg


r/PromptEngineering • • 22h ago

General Discussion 145. Examples in prompts helped me more than any amount of instructions

2 Upvotes

For months I kept adding rules to a prompt that writes short product descriptions. Tone rules, length rules, banned words, all of it. Outputs got a little better each time but still felt off.

Last week I deleted most of the rules and pasted in three descriptions I'd written myself that I liked. The outputs got much closer to what I wanted right away. Fewer rules, better results.

Now my default is a short instruction plus two or three real examples, and I only add a rule when it keeps making the same mistake. Curious if others found the same, or if there are tasks where examples made things worse.


r/PromptEngineering • • 17h ago

Tools and Projects Built Keylo with Claude Code — it lets Claude Code use your API keys without ever seeing them (free)

1 Upvotes

What it is. Keylo is a secrets vault for people who let AI agents run real commands. It's an MCP server plus a desktop app (Windows/macOS/Linux) and CLI. The core idea: the agent names a secret, Keylo runs the command with it, and returns only the exit code and output — with the secret value scrubbed to `[keylo:name]`. There's deliberately no tool that returns a value, so Claude Code can use your prod DB password or API key without being able to read it. Anything outside an agent's scoped, run-only key triggers a Touch ID / Windows Hello approval, you can mark prod "always ask," and every use is logged.

Claude Code setup is one line: `keylo keys create "Claude Code" --category dev --add-to-claude`

It's free — free to try and free to use, no account, local-first (nothing goes to a cloud). Source-available so you can audit the security-critical code.

How Claude Code helped (in detail). I built the whole thing in Claude Code (Opus), and it did most of the actual engineering:

* Wrote the Rust across three crates — the core vault (AES-256-GCM, authenticated so tampering is detected), the per-OS keystore layer, and the CLI/MCP server.

* Implemented the hard cross-platform bits: Windows DPAPI + Windows Hello via KeyCredentialManager (TPM), the macOS login-Keychain seal + Secure Enclave Touch ID, and the Linux Secret Service keyring with a passphrase-wrapped file vault for headless servers.

* Designed the MCP tool surface and the two mechanisms that make the "never read" guarantee real: the output redactor and the run-only access-key model.

* Debugged genuinely nasty platform issues with me — e.g. macOS errSecInteractionNotAllowed when unlocking over SSH — and then built the headless fallback vault. It drove the tests too: a real Mac over SSH, Linux in Docker.

* Wrote the docs, and built the project's website and the writeup of how the concealment works, with references into the source.

Honest limits. Redaction catches accidental echoes, not a command deliberately transforming a value; a command you approve gets the real secret, so sandbox your agent and don't approve things you don't understand. It's a single-developer tool, not a team secrets platform.

Site: https://keylo.dev Code: https://github.com/tulde23/keylo

Happy to answer questions about the MCP design or the cross-platform keystore work.


r/PromptEngineering • • 19h ago

General Discussion Everyone talks about AI adoption, but how do companies actually implement AI successfully?

1 Upvotes

Hi everyone!

I'm currently working on my master's thesis in Logistics and exploring how industrial companies can systematically introduce and implement AI tools into their existing business processes.

There is a lot of academic literature about AI adoption, frameworks, readiness assessments and digital transformation. However, I'm particularly interested in what happens in the real world, beyond theory and the AI hype.

I would love to hear from professionals working in industry, manufacturing, IT, consulting or AI implementation..

  • When your company decides to introduce an AI tool, where does the process actually begin?
  • How do you identify which business processes could genuinely benefit from AI?
  • What are the biggest challenges during implementation?
  • Does your company follow a structured methodology, or is it more of a trial-and-error approach?
  • Have you experienced AI projects that failed? What went wrong?
  • If you could design an AI implementation roadmap from scratch, what steps would you consider essential?

I'm particularly interested in the gap between what academic frameworks recommend and what companies actually need in practice.

I'm not looking for someone to do my research for me. I genuinely want to challenge my assumptions, discover new perspectives and develop something that could be useful for companies rather than just another theoretical framework.

Any experiences, recommendations, critical opinions, or even uncomfortable truths about AI implementation would be greatly appreciated.

Thank you!