# AI Match Mocks

When HyperTest AI finds an outbound call during the Replay mode that does not have an exact same outbound call in Record mode, it matches this call with one closest in schema to avoid Mock Not Found scenarios.

<figure><img src="/files/4b1nXCZamvZqiGXxmQJr" alt=""><figcaption></figcaption></figure>

This is a best match scenario orchestrated by HyperTest's AI. It matches mocks of requests between record and replay with minimal difference in schema of the response as well as the outbound calls.

#### Let's try to understand this by taking an Example:

Suppose you've 2 APIs: createProduct and updateStock, and now you've introduced a new column to your stock table called "restockNeeded" whose value will be set on the count stock we have.\
\
When we recorded these 2 APIs we did not have that column, now in your new PR you've added it and you're trying to run a Test, you would see something like this:

<figure><img src="/files/Akebg85eSoIUaINqp9eL" alt=""><figcaption></figcaption></figure>

Both the APIs have reported a change that a new Key has been added to the **sequelize-mode-update** mock.

This has been made possible by AI matches, here we looked at all the available recorded mocks and decided to pick a closest mock to the current input of the mock and reported this change.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-v2.hypertest.co/setup-guide/interpreting-test-results/ai-match-mocks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
