Skip to content

⚡ Prompt Engineering Testing & Optimization Platform - Built with Microsoft Agent Framework, Blazor Server, and Azure OpenAI. Features smart routing, version control, and guided optimization.

License

Notifications You must be signed in to change notification settings

breezy89757/PromptAgent

Repository files navigation

PromptAgent

Prompt 優化測試系統 — 使用 Microsoft Agent Framework 進行智慧評估與多輪優化

.NET Blazor Azure OpenAI MAF

PromptAgent 是一個 Prompt 品質測試與優化工具。透過多輪平行執行與 AI 評估,快速找到最佳 Prompt 配置。

Prompt Test Page

Features

  • Multi-Agent Parallel Execution — 使用 Task.WhenAll 同時執行多個 Agent,測試 Prompt 穩定性
  • GAI Feasibility Analysis — 智慧分析需求適合 AI、傳統程式、還是人工處理
  • Prompt Version Control — 像 Git 一樣管理 Prompt 版本,支援回滾與 Diff 比較
  • Smart Correction Mode — 全自動多輪優化,達標自動停止
  • Guided Mode — 每輪暫停讓用戶選擇偏好的回答風格
  • AI Example Generation — LLM 動態生成測試範例

Test Modes

Mode Description Use Case
Normal Single execution + AI evaluation Quick validation
Smart Correction Fully automatic multi-round Trust AI judgment
Guided Pause each round for user input Precise control

Quick Start

1. Clone

git clone https://github.com/breezy89757/PromptAgent.git
cd PromptAgent

2. Configure

cp appsettings.template.json appsettings.json

Edit appsettings.json:

{
  "AzureOpenAI": {
    "Provider": "Azure",
    "Endpoint": "https://your-resource.openai.azure.com/",
    "ApiKey": "your-api-key",
    "DeploymentName": "gpt-4o-mini",
    "EvaluatorDeploymentName": "gpt-4o"
  }
}

3. Run

dotnet run

Open http://localhost:5036

Project Structure

PromptAgent/
├── Models/           # Data models
├── Services/         # Business logic (Agent, Evaluation, Versioning)
├── Components/       # Blazor pages
└── appsettings.json  # Configuration

Data Storage

All data is stored in browser LocalStorage:

Feature Key Limit
Test History prompt_test_history 30 records
GAI Evaluation gai_evaluation_history 20 records
Version Projects prompt_projects Unlimited

Note

Clearing browser data will delete these records.

License

MIT

About

⚡ Prompt Engineering Testing & Optimization Platform - Built with Microsoft Agent Framework, Blazor Server, and Azure OpenAI. Features smart routing, version control, and guided optimization.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published