save_outcome
Records user verdict on optimized prompt outputs to update learning loops with few-shot examples and persistent memory facts, improving future prompt optimizations.
Instructions
Tell ClarifyPrompt whether an optimization's output was accepted, edited, or rejected. Feeds two loops: (1) the session ring buffer so accepted prior outputs are injected as few-shot examples into future similar prompts, and (2) the persistent memory layer via reflection — on accept/edit, ClarifyPrompt extracts atomic facts from the interaction and stores them; on reject, recent reflection facts from this session are invalidated. Reflection uses the same LLM you've configured; expect a 1–3s latency on local models.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| optimization_id | Yes | The `id` returned from optimize_prompt | |
| session_id | Yes | The `sessionId` returned from optimize_prompt. Required so the outcome lands in the right session bucket. | |
| verdict | Yes | accepted = user used the output as-is; edited = user kept it with edits; rejected = user threw it away | |
| diff | No | Optional: the user's edited version or a diff. Helps reflection extract better facts. | |
| skip_reflection | No | Skip the LLM-based fact extraction pass (faster, no facts learned) |