Library for prompt engineering and optimization
Top 49.2% on sourcepulse
SAMMO is a Python library for prompt engineering and optimization, targeting researchers and developers who need to systematically improve LLM prompt performance. It offers a structure-aware approach to prompt modification and execution, enabling efficient data labeling, prompt prototyping, and instruction optimization.
How It Works
SAMMO treats prompts as programs, allowing manipulation via CSS-like selectors and Markdown parsing. This structure-aware approach facilitates multi-objective optimization, such as balancing prompt length and accuracy, using techniques like beam search. It supports parallel execution and rate limiting for large-scale LLM interactions.
Quick Start & Requirements
pip install sammo jupyter
git clone https://github.com/microsoft/sammo.git
), cd sammo
, and launch Jupyter Notebook (jupyter notebook --notebook-dir docs/tutorials
).Highlighted Details
Maintenance & Community
The project is authored by Tobias Schnabel and welcomes contributions, requiring a Contributor License Agreement (CLA). It adheres to the Microsoft Open Source Code of Conduct.
Licensing & Compatibility
Licensed under the MIT License, permitting commercial use and integration with closed-source projects.
Limitations & Caveats
SAMMO is positioned as a tool for prompt optimization and large-scale execution, explicitly noting it is less suitable for interactive, agent-based or production-ready LLM applications, recommending AutoGen and LangChain respectively for those use cases.
1 month ago
1+ week