The-Rosetta-Prompt  by muratcankoylan

Prompt optimization system adapting to AI provider nuances

Created 5 months ago
261 stars

Top 97.2% on SourcePulse

GitHubView on GitHub
Project Summary

The Rosetta Prompt is an agentic system designed to automatically optimize user prompts for various AI providers by leveraging provider-specific documentation. It targets developers and researchers seeking to maximize prompt effectiveness across different LLM platforms, offering a dynamic and autonomous approach to prompt engineering that adapts to evolving AI provider guidelines.

How It Works

The system employs an Orchestrator Agent that manages parallel Optimizer Agents, each acting autonomously within a ReAct (Reason → Act → Observe → Repeat) loop. These Optimizer Agents use tools like list_provider_docs and read_provider_doc to dynamically discover and selectively read documentation (over 12K characters per document) from a local docs/ knowledge base. They then apply learned provider-specific patterns to transform prompts, reporting structured results with a changelog. The architecture supports adding new providers simply by adding their documentation to the docs/ directory.

Quick Start & Requirements

  • Backend Setup: Navigate to rosetta_prompt/, install dependencies (pip install -r requirements.txt), and set OPENROUTER_API_KEY in a .env file. Run the FastAPI server with uvicorn main:app --reload --port 8000.
  • Frontend Setup: Navigate to ui/, install dependencies (npm install), and start the development server (npm start).
  • Prerequisites: Requires API keys for OpenRouter, Anthropic, and Firecrawl (for the updater). Python 3.x is assumed.
  • Documentation: Providers are auto-detected from the rosetta_prompt/docs/ directory.

Highlighted Details

  • Autonomous prompt optimization agents using the ReAct pattern for dynamic tool use and decision-making.
  • Comprehensive logging, including API response logs (JSON) and detailed local file logs (logs/*.log), capturing full execution traces and timings.
  • RESTful API endpoints (/optimize, /providers) built with FastAPI for programmatic integration.
  • An autonomous updater agent (updater/) that periodically scrapes provider documentation and synthesizes updates to the local knowledge base using Claude Opus and Firecrawl.

Maintenance & Community

The project includes an updater/ directory with an agent designed for autonomous documentation updates, suggesting a proactive maintenance approach. Adding new providers is facilitated by simply adding their documentation to the docs/ directory. No specific community links (e.g., Discord, Slack) are provided in the README.

Licensing & Compatibility

The project is released under the MIT License, permitting commercial use and integration into closed-source projects.

Limitations & Caveats

Operational functionality is contingent on valid API keys for OpenRouter, Anthropic, and Firecrawl, which may incur costs beyond free tiers. The frontend utilizes React and Three.js, which may require specific development expertise for customization or integration. The system's effectiveness is directly tied to the quality and completeness of the provider documentation available in the docs/ directory.

Health Check
Last Commit

5 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
74 stars in the last 30 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
7 more.

SuperAGI by TransformerOptimus

0.1%
18k
Open-source framework for autonomous AI agent development
Created 3 years ago
Updated 1 year ago
Starred by Lilian Weng Lilian Weng(Cofounder of Thinking Machines Lab), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
59 more.

AutoGPT by Significant-Gravitas

0.1%
185k
AI agent platform for building, deploying, and running autonomous workflows
Created 3 years ago
Updated 11 hours ago
Feedback? Help us improve.