# Getting Inference Results on Chain

Typically, node operators are required to be deployed for oracle adapters. After the adapters are launched locally or on the node, users need to find the corresponding contract address for their subnet.&#x20;

The following is the workflow of Chainlink Function:

<figure><img src="/files/4f15rOKabm8fvcvcre1T" alt=""><figcaption><p>Chainlink Function Workflow</p></figcaption></figure>

1. User initiates the Chainlink Function embedded in the dApp: This is the starting point of the process, where the user triggers the Chainlink Function by interacting with the decentralized application (dApp).
2. The dApp sends a request to the Chainlink Functions smart contract: This request contains three key elements:
   * API endpoint: Specifies the external source from which to fetch data
   * Data transformation logic: Defines how to process the retrieved data
   * Encrypted credentials (if required): Used for secure access to APIs that require authentication
3. The Decentralized Oracle Network (DON) processes the request:
   * The DON continuously monitors the Chainlink Functions smart contract
   * When a request is detected, each node independently performs the following operations:  ***a.*** Triggers its runtime environment. ***b.*** Retrieves external data ***c.*** Executes specified data computations d. Returns the result
4. Reaching consensus and returning results using OCR 2.0:
   * Nodes reach consensus on the final answer using the Off-Chain Reporting (OCR) 2.0 protocol
   * One node is selected to transmit the result back on-chain
   * If the selected node fails to publish the data, another node is chosen for transmission
   * This mechanism ensures high reliability and trust-minimized security


---

# 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.2pm.network/model-inference/getting-inference-results-on-chain.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.
