Skip to content

Ratione/prompt_gen_thing

Repository files navigation

Simplified Explanation: The Modular Prompt Engineering System

The Modular Prompt Engineering System is like a "mix and match" toolkit for creating effective AI prompts. Instead of writing one giant prompt with everything in it, you break your instructions into specialized modules that can be combined as needed.

Think of it like building with LEGO blocks instead of carving a sculpture from a single stone.

I generated this, after some effort, using Claude Sonnet 3.7 w/ Extended thinking. This the result of a few recursive itterations, and is implemented with all the finesse of a sledgehammer. Critically, however, it does appear to work, with rather impressive results.

The Core Concept in Simple Terms

Traditional Approach: Write one big, comprehensive prompt with everything included.

  • 👎 Uses lots of tokens
  • 👎 Hard to reuse parts for other projects
  • 👎 Difficult to update without rewriting

Modular Approach: Break instructions into specialized modules that can be combined.

  • 👍 Uses fewer tokens (only activate what you need)
  • 👍 Reuse modules across different projects
  • 👍 Update individual modules without changing everything

Three Main Scenarios

Modular Prompt Engineering System

1. Creating a New Prompt

Use these modules:

  • Goal Exploration (understands what you really need)
  • XML Structure (organizes information properly)
  • Extended Thinking (for complex reasoning)

Process:

  1. Start by exploring your true goals
  2. Structure your prompt with proper XML tags
  3. Add examples if needed
  4. Implement reasoning patterns
  5. Test and refine

2. Optimizing an Existing Prompt

Use these modules:

  • Optimization Principles (makes prompts more efficient)
  • Documentation Integration (follows best practices)
  • Prompt Evolution (systematic improvement)

Process:

  1. Analyze current structure
  2. Remove redundancy
  3. Apply documentation best practices
  4. Test variations
  5. Implement improvements

3. Managing a Long-Term Project

Use these modules:

  • Conversation Management (handles context across sessions)
  • Goal Exploration (maintains focus on objectives)
  • Prompt Evolution (continuous improvement)

Process:

  1. Set up conversation management
  2. Create separate artifacts for components
  3. Use breakpoints at natural transitions
  4. Maintain a module index
  5. Document decisions

How to Start Using This System

The Ultra-Simple Approach:

  1. Copy the activation framework into a new chat
  2. Add 2-3 modules you need right now
  3. Activate them with a simple command
  4. Give Claude your specific project details

Example:

I'm setting up a modular prompt engineering system.

[Paste module-activation-core]

[Paste goal-exploration-module]

[Paste xml-structure-module]

Activate modules:
1. goal-exploration-module
2. xml-structure-module

I need help creating a prompt that will guide Claude in analyzing scientific papers.

Special Needs Add-Ons

If you need:

  • Pattern Examples: Add the multishot-prompting-module
  • Detailed Documentation: Add the deliverables-module
  • More Efficiency: Add the optimization-principles-module

Using this as a prompt generator

I've included a file called "recursion-prompt.md". I used it to generated a prompt for another project. Using Claude Sonnet, I created a project (ChatGPT has a similar function), pasted the contents of that file into "Set project instructions", and then started the first chat in that project with the following text:

" Activate Modules:

  1. goal-exploration
  2. xml-structure
  3. extended-thinking
  4. prompt-evolution
  5. conversation-management "

I then just 'spoke' with the LLM, in normal english, explaining my project and what I my goals were. It then outputted a prompt, that I then used in the "Set project instructions" box of a new project. The first project becomes my Prompt-Generator, and I use it's output as the Prompt for new projects.

The Bottom Line

The modular system is about working smarter, not harder. Instead of reinventing the wheel each time, you build a library of prompt engineering techniques that can be mixed and matched for any project.

It's like having a toolbox instead of a single multi-tool - you get exactly what you need without carrying around what you don't.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published