Skip to content

Agentic Prompt Rewriter - Transform Simple Instructions into Powerful Prompts Transform one-line instructions into comprehensive, production-ready prompts with this multi-agent AI system. This tool combines GPT-4's intelligence with structured prompt engineering to help you create perfect prompts for any AI task.

Notifications You must be signed in to change notification settings

Croups/agentic-prompt-rewriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic Prompt Rewriter

A sophisticated multi-agent system that transforms simple instructions into detailed, production-ready prompts. This tool leverages GPT-4 and a pydantic-ai agent architecture to generate structured prompts with XML tags, quality guidelines, and execution steps.

DEMO

agentic-prompt-rewriter.mp4

🌟 Features

  • Intelligent Prompt Generation: Transforms simple intentions into comprehensive prompts
  • Structured Output: Generates prompts with XML tags for clear input/output handling
  • Real-time Streaming: Watch the prompt generation process in real-time
  • Multi-step Validation: Ensures quality and completeness of generated prompts
  • Flexible Use Cases: Works for content creation, analysis, and more
  • User-friendly Interface: Built with Streamlit for easy interaction

πŸš€ Quick Start

  1. Clone the repository:
git clone https://github.com/yourusername/ai-prompt-generator.git
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
streamlit run app.py

πŸ’» Requirements

  • Python 3.9+
  • OpenAI API key
  • See requirements.txt for complete package list

πŸ› οΈ Technical Architecture

The system consists of several key components:

  1. Input Processing Agent

    • Analyzes user intent
    • Determines required prompt structure
    • Validates input requirements
  2. Prompt Generation Agent

    • Creates structured prompts
    • Implements XML tagging
    • Ensures format consistency

πŸ“Š Usage Example

  1. Enter your OpenAI API key in the sidebar
  2. Input your prompt intention (e.g., "write an article")
  3. Optionally add examples
  4. Click "Generate Prompt"
  5. Watch as the system generates a structured prompt
  6. Download the generated prompt as needed

πŸ”‘ Configuration

Key configuration options are available through environment variables:

OPENAI_API_KEY=your_api_key

πŸ“ Output Format

Generated prompts follow this structure:

You are [role]

[task description]

Required Inputs:
[XML-tagged input structure]

Instructions:
[step-by-step process]

Output Format:
[expected output structure]

Quality Guidelines:
[quality checks]

Restrictions:
[constraints]

CONTACT

Reach me out from linkedin : www.linkedin.com/in/enes-koşar

About

Agentic Prompt Rewriter - Transform Simple Instructions into Powerful Prompts Transform one-line instructions into comprehensive, production-ready prompts with this multi-agent AI system. This tool combines GPT-4's intelligence with structured prompt engineering to help you create perfect prompts for any AI task.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages