A RAG-powered prompt engineering platform with modality-specific optimization for Text, Image, Video, and System Prompts
System prompts are generated referencing frontier LLM providers (Claude, Cursor, v0, Gemini CLI)
Try it Live • Features • System Design • Architecture • Technologies • Contributing • Security
PromptTriage is an enterprise-grade prompt engineering platform that transforms rough ideas into production-ready AI prompts through RAG-powered retrieval and modality-specific optimization.
The platform excels at system prompt generation by referencing a curated corpus of frontier LLM system prompts from Claude Code, Cursor, v0, Windsurf, and Gemini CLI—ensuring your prompts follow proven patterns from industry leaders.
- Pinecone RAG Architecture: 28K+ vectors for fast semantic retrieval of similar high-quality prompts
- Modality-Specific Prompts: Dedicated metaprompts for Text, Image, Video, and System Prompt generation—each optimized for their domain
- MCP Tool Integration: Context7 integration provides live documentation lookup for current library APIs
- Fine-Tuning Ready: Curated datasets prepared for model fine-tuning (Gemini 1.5 Flash tuning supported)
- Deep Context Understanding: Gemini analyzes your initial prompt to identify gaps, ambiguities, and missing context
- Risk Assessment: Automatically detects potential issues, biases, and edge cases in your prompt design
- Structured Blueprint Generation: Creates a comprehensive blueprint with intent, audience, success criteria, constraints, and evaluation checklists
- Context-Aware Questions: Generates 2-5 custom follow-up questions based on detected gaps
- Adaptive Intelligence: Questions evolve based on the target AI model, tone, and output requirements
- Efficient Information Gathering: Streamlined workflow to capture all necessary details
- Multi-Model Support: Optimized prompts for OpenAI GPT, Claude (Sonnet/Opus/Haiku), Gemini (Pro/Flash), Grok, and Mistral
- Structured Output: Generates markdown-formatted prompts with nine comprehensive sections
- Quality Guardrails: Includes assumptions, change summaries, and evaluation criteria for response validation
- Pinecone Vector Store: 28K+ embeddings for fast semantic retrieval
- Smart Retrieval: Uses Google's
gemini-embedding-001model (768d) to search across 28,000+ verified prompts - System Prompts Corpus: Curated library of 79+ system prompts from frontier models (Claude Code, Cursor, v0, Gemini CLI), professionally categorized and labeled
- Modality Routing: Automatic namespace selection based on prompt type (text →
system-prompts, image →image-prompts, video →video-prompts)
- Unified Interface: Seamlessly switch between Text, Image, and Video generation modes.
- Context-Aware Refinement:
- Text: Focuses on system instructions, tone, and structure.
- Image: Optimizes for negative prompts, aspect ratios, and style descriptors.
- Video: Enhances temporal consistency, camera motion, and duration parameters.
- Output Format Selector: Force outputs into JSON, XML, Markdown, or tabular formats
- Desired Output Specification: Tell the AI what format your target model should respond in
- Thinking Mode: Enable deep analysis with extended reasoning for complex prompts
- Context7: Live documentation lookup for current library APIs (Next.js 15, React 19, LangChain, etc.)
- Firecrawl (Optional): Web search to enrich prompts with real-world context when needed
- One-Click Rewrite: Generate alternative refinements without re-answering questions
- Metaprompt-Driven Consistency: Curated system prompts guide Gemini to maintain quality across generations
PromptTriage is built on RAG-powered retrieval and modality-specific optimization, not just API wrappers.
Before generating any prompt, the system queries a curated vector store to find similar high-quality prompts:
- Semantic Search: Pinecone vector store with 28K+ embeddings finds the most relevant reference prompts
- Modality Routing: Queries automatically route to the correct namespace (
system-prompts,video-prompts,image-prompts) - Frontier Model References: System prompt generation draws from Claude Code, Cursor, v0, Windsurf, and Gemini CLI patterns
Each modality has dedicated analyzer, fast mode, and refiner prompts:
- Text/System: Focuses on role definition, guardrails, and multi-turn behavior
- Image: Optimizes for composition, style keywords, and negative prompts
- Video: Enhances camera motion, temporal consistency, and duration compliance
- Versioned Prompts: Current version
2025-01-systemprompts-enhancedfor reproducibility
Curated examples provide format consistency alongside RAG retrieval:
- Domain examples (creative, analytical, technical) demonstrate target output structure
- Examples work with RAG context, not as the primary source of prompt patterns
The system uses a two-phase orchestration design with structured blueprints:
Phase 1 - Analysis:
- Extracts intent, audience, success criteria, constraints, risks
- Generates targeted follow-up questions (2-5 questions)
- Creates a structured blueprint with 10+ fields for later synthesis
- Validates completeness through confidence scoring
Phase 2 - Refinement:
- Reconciles the original prompt with blueprint, RAG context, and user answers
- Synthesizes a production-ready prompt with 9 standardized sections
- Generates usage guidance, change summaries, assumptions, and evaluation criteria
The platform integrates with MCP tools for real-time context:
- Context7: Fetches current library documentation during prompt generation
- Firecrawl: Optional web search for additional context enrichment
- Google OAuth 2.0: Secure authentication with Google Sign-In
- NextAuth.js Integration: Session management and authentication flows
- Environment-based Configuration: Secure API key management
- TypeScript-First: Full type safety across the application
- Modern Tooling: ESLint, Turbopack, and PostCSS for optimal development
- Responsive Design: Tailwind CSS-powered UI that works on all devices
┌─────────────────┐
│ User Input │
│ (Rough Idea) │
└────────┬────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Analyzer API │
│ /api/analyze │
│ │
│ ┌──────────────────┐ ┌──────────────────────────────┐ │
│ │ Modality Router │───▶│ RAG Service (FastAPI) │ │
│ │ Text/Image/Video │ │ ┌─────────────────────────┐ │ │
│ └──────────────────┘ │ │ Pinecone (28K+ Vecs) │ │ │
│ │ │ └─────────────────────────┘ │ │
│ ▼ └──────────────────────────────┘ │
│ ┌──────────────────┐ │
│ │ Metaprompt │◄────── 9 Modality-Specific Prompts │
│ │ (v2025-01) │ + RAG Context │
│ └──────────────────┘ ┌──────────────────────────────┐ │
│ │ │ MCP Tools │ │
│ ▼ │ • Context7 MCP → Live Docs │ │
│ ┌──────────────────┐ │ • Firecrawl → Web Search │ │
│ │ AI Generation │ └──────────────────────────────┘ │
│ └──────────────────┘ │
│ │ │
│ • Blueprint Generation │
│ • Follow-up Questions │
└───────────┬─────────────────────────────────────────────────┘
│
▼
┌─────────────────┐
│ User Answers │
└────────┬────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Refiner API │
│ /api/refine │
│ │
│ ┌──────────────────┐ ┌──────────────────────────────┐ │
│ │ Modality-Specific │ │ Blueprint + RAG Context │ │
│ │ Refiner Prompt │───▶│ + User Answers │ │
│ └──────────────────┘ └──────────────────────────────┘ │
│ │ │
│ ▼ │
│ • Production-Ready Prompt │
│ • Negative Prompts (Image/Video) │
│ • Evaluation Criteria │
└───────────┬─────────────────────────────────────────────────┘
│
▼
┌─────────────────┐
│ Final Prompt │
│ (AI-Ready) │
└─────────────────┘
app/page.tsx: Main UI with modality selection and form orchestrationcomponents/: ModalitySelector, OutputFormatSelector, DesiredOutputSelector, ImageUploader, ErrorFeedback, PipelineProgressservices/: RAG client, Context7 MCP integration, Firecrawl clientlib/: PipelineLogger (structured agentic logging)
analyze/route.ts: Prompt analysis with modality routing and RAG contextrefine/route.ts: Prompt refinement with modality-specific system prompts
app/routers/rag.py: RAG endpoints with Pinecone retrievalapp/services/rag.py: RAG service with modality-based namespace routingscripts/: Dataset ingestion and labeling pipelines
metaprompt.ts: 9 modality-specific system promptsANALYZER_SYSTEM_PROMPT/FAST_MODE_SYSTEM_PROMPT/REFINER_SYSTEM_PROMPT(Text)IMAGE_ANALYZER_SYSTEM_PROMPT/IMAGE_FAST_MODE_SYSTEM_PROMPT/IMAGE_REFINER_SYSTEM_PROMPTVIDEO_ANALYZER_SYSTEM_PROMPT/VIDEO_FAST_MODE_SYSTEM_PROMPT/VIDEO_REFINER_SYSTEM_PROMPTSYSTEM_PROMPT_ANALYZER/SYSTEM_PROMPT_FAST_MODE/SYSTEM_PROMPT_REFINER
- Version Control:
PROMPT_VERSION = "2025-01-systemprompts-enhanced"
- Next.js 15.1.6: React framework with App Router
- React 19.0.0: UI component library
- TypeScript 5: Type-safe development
- Tailwind CSS 3.4: Utility-first styling
- Google Gemini API: Generation with
gemini-2.5-pro-preview-05-06 - Gemini Embeddings:
gemini-embedding-001(768d) for vector similarity - 9 Modality Metaprompts: Text, Image, Video, System Prompt specializations
- Fine-Tuning Ready: Datasets prepared for
gemini-1.5-flash-001-tuning
- Context7: Live library documentation lookup
- Firecrawl (Optional): Web search for context enrichment
- NextAuth.js 4.24: Google OAuth 2.0 authentication
- Node.js 20+: JavaScript runtime
- Python 3.9+: Backend runtime
- AI Product Development: Generate production-ready prompts for AI features
- Content Creation: Craft precise prompts for copywriting, marketing, and creative work
- Data Analysis: Structure prompts for analytical tasks and reporting
- Research: Formulate clear research questions and analysis frameworks
- Education: Teach effective prompt engineering techniques
- Automation: Create consistent, reusable prompt templates
- Input: User provides rough idea + selects modality (Text/Image/Video/System)
- RAG Retrieval: System queries Pinecone for similar high-quality prompts
- Modality Routing: Appropriate analyzer prompt is selected based on modality
- Analysis: AI generates structured blueprint with gaps and questions
- Clarification: User answers 2-5 targeted follow-up questions
- Refinement: Blueprint + RAG context + answers are synthesized
- Generation: Production-ready prompt with modality-specific optimizations
- Iteration: One-click rewrite or modify with custom instructions
Generated prompts include nine comprehensive sections:
- Context: Background and situational information
- Objective: Clear goal statement
- Constraints: Limitations and boundaries
- Audience: Target users or stakeholders
- Tone & Style: Communication approach
- Format: Expected output structure
- Examples: Reference cases (when applicable)
- Success Criteria: Evaluation metrics
- Additional Notes: Edge cases and considerations
Plus metadata:
- Usage Guidance: How to use the prompt effectively
- Change Summary: What was refined from the original
- Assumptions Made: Inferred context
- Evaluation Checklist: Quality validation points
- Pinecone RAG pipeline (28K+ vectors)
- 9 modality-specific metaprompts
- Context7 MCP integration (direct
mcp.context7.com) - System prompt corpus from frontier models
- Google OAuth authentication
- Error feedback UX (inline form + GitHub issues)
- Chain-of-thought loading indicator
- Pipeline logging (PipelineLogger)
- Fine-tuned model deployment (Gemini 1.5 Flash)
- Public API with rate limiting
- Prompt history and versioning
- Multi-LLM provider support (OpenAI, Anthropic)
- Prompt performance analytics
- Template marketplace
- Collaborative prompt editing
We welcome contributions! Please see our Contributing Guidelines for details on:
- Code of Conduct
- Development setup
- Pull request process
- Coding standards
Security is a top priority. Please see our Security Policy for:
- Reporting vulnerabilities
- Security best practices
- Disclosure policy
This project is licensed under the terms specified in the LICENSE file.
- Google Gemini Team: For Gemini API and embeddings powering generation and RAG
- Pinecone: For the vector database infrastructure
- Frontier Model Providers: Claude, Cursor, v0, Windsurf—whose system prompts informed our corpus
- Open Source Community: For the amazing tools and libraries
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with ❤️ using RAG pipelines, modality-specific prompts, and frontier model patterns
Not just an API wrapper—a specialized prompt engineering system