An automated prompt engineering tool for Large Language Models (LLMs), designed for universal domain adaptation.
- 💰 Ultra-low iteration cost ($0.1 level)
- 🏷️ Label-free approach - no training data needed
- 📊 Few-shot learning with minimal examples
- ⚡ Super simple template configuration
- 🌐 Multi-language support
Create a configuration file config.yaml
:
openai:
api_key: " "
base_url: " "
Create a prompt template file settings/task_name.yaml
:
prompt: |
solve question.
requirements: |
...
count: None
faq:
- question: |
...
answer: |
...
- question: |
...
answer: |
...
Use main.py
to execute:
from script.optimizer import Optimizer
if __name__ == "__main__":
optimizer = Optimizer(
optimized_path="workspace",
initial_round=1,
max_rounds=10,
template="task_name.yaml",
name="Task",
optimize_model={"name": "claude-3-5-sonnet-20240620", "temperature": 0.7},
execute_model={"name": "gpt-4o-mini", "temperature": 0},
evaluate_model={"name": "gpt-4o-mini", "temperature": 0.3},
iteration=True,
)
optimizer.optimize()
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Made with ❤️ by the MetaGPT and AFlow Team