Natural language phrases can often be interpreted in different ways. For example, does the description “the selected tab” refer to “the currently selected tab”, or does it mean “the tab with the text ‘Selected’”? What if both options exist on the page?In order to eliminate flakiness, it is imperative that AI chooses a single interpretation for each query across different test runs. To achieve this, Momentic stores AI completions from successful test runs and supplies those traces back to the AI agent when generating new completions.By using past runs’ decisions and logical reasoning processes as context, we can ensure Momentic’s AI agents are making consistent decisions.
If enabled, memory is updated whenever a step executes and requires AI. Even if the test ultimately fails, Momentic still stores a memory entry for that step. This behavior helps tests fail consistently when there are legitimate errors.