> For the complete documentation index, see [llms.txt](https://docs.vannalabs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vannalabs.ai/vanna-network/inference-modes/vanilla-inference.md).

# Vanilla Inference

Vanilla inference represents a regular inference to an AI or ML model in Vanna's decentralized filestore.

In order to run basic vanilla inference, you need to implement the ArbInference interface for inferCall.

**model** - The IPFS CID for the model

**input** - The input parameters to the inference request

{% code overflow="wrap" %}

```solidity
function inferCall(bytes memory model, bytes memory input) external returns (bytes memory);
```

{% endcode %}

Below is an example of a minimal smart contract that runs vanilla inference:

{% code title="ArbInference.sol" %}

```solidity
pragma solidity >=0.4.21 <0.9.0;

/// @title Infer Call
/// @notice This contract is used to run on-chain inference.
/// This custom contract will set on 0x000000000000000000000000000000000000011a since we set it in precompile.go.
interface ArbInference {
    function inferCall(bytes memory model, bytes memory input) external returns (bytes memory);
    function inferCallZK(bytes memory model, bytes memory input) external returns (bytes memory);
}
```

{% endcode %}

{% code title="VanillaInference.sol" %}

```solidity
pragma solidity ^0.8.18;

import "contracts/ArbInference.sol";

contract VanillaInference {
    string value;

    function infer(
        string calldata modelName,
        string calldata inputData
    ) public {
        value = string(abi.encodePacked(ArbInference(address(0x11a)).inferCall(abi.encodePacked(modelName), abi.encodePacked(inputData))));
    }
    
    function getValue() public view returns (string memory) {
        return value;
    }
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.vannalabs.ai/vanna-network/inference-modes/vanilla-inference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
