name: promptions description: Promptions workflows for dynamic control generation, validation, and replay in AI copilots. license: MIT
Activation Conditions
Activate when users ask about Promptions, dynamic controls, structured prompt middleware, control schema design, or replaying user selections into model prompts.
Scope Boundaries
- Focus on control schema generation, validation, rendering patterns, and selection replay.
- Keep guidance aligned with the provided examples and docs.
- Avoid exposing API keys or secret values.
Quick Context
- Core workflow is: prompt -> controls -> user selections -> parameterized prompt -> final response.
- Reference implementations are in
examples/and include generation, validation, replay, and React rendering. - Public reference applications are available in the Microsoft Promptions repository.
Prerequisites
- Node.js 18+.
- OpenAI or Azure OpenAI credentials configured in
.env. - TypeScript support for integrating the example modules.
Workflow
- Configure credentials and validate connectivity.
- Generate controls via
examples/generate-controls.ts. - Validate schemas via
examples/validate-controls.tsbefore rendering. - Render controls with your UI framework (
examples/render-controls.tsxas reference). - Replay selections using
examples/replay-selections.tsand request the final model output.
Routing
docs/launch-procedure.mdfor running, trying, or demoing the reference apps (chatbot / image generator).docs/quick-start.mdfor integrating Promptions into a new or existing application.docs/application-patterns.mdfor domain workflows and product integration ideas.docs/data-integration.mdfor transcript and telemetry wiring.docs/REFERENCE.mdfor the full control schema when implementing or extending control types.docs/troubleshooting.mdanddocs/performance-guide.mdfor diagnostics and optimization.
Reference Links
- GitHub: https://github.com/microsoft/Promptions
- Research paper: https://arxiv.org/abs/2412.02357
- Microsoft Research project page: https://www.microsoft.com/en-us/research/project/tools-for-thought
- AI Foundry Labs: https://ai.azure.com/explore/foundry-labs