Trusted AI for next generation RWAs with OriginTrail and Chainlink (2024)

Trusted AI for next generation RWAs with OriginTrail and Chainlink (3)

We are witnessing an important convergence of technologies of Artificial Intelligence (AI), Internet, and Crypto promising to reshape our digital landscape. This convergence enables a Verifiable Internet for AI, unlocking AI solutions without hallucinations and ensuring full respect for data ownership and Intellectual Property rights.

Trillion-dollar industries spanning from tokenization of real world assets (RWAs), supply chains, metaverse, construction, life sciences and healthcare, among others, require AI systems to use verifiable information to deliver the multiplication effect to the benefit of users in a safe manner.

A modular and collaborative approach is necessary to achieve that. OriginTrail and Chainlink are working together to bring the vision of the Verifiable Internet for AI to reality, allowing the transformation of real world asset (RWA) tokenization.

OriginTrail Decentralized Knowledge Graph (DKG) is already powering trusted AI solutions across multiple RWA industries, such as protecting whisky authenticity with trusted AI and DNA tagging techniques, helping Swiss Federal Railways increase rail travel safety with cross-border rail operator connectivity, increasing EU build environment sustainability with trusted AI, supporting representatives of over 40% of US imports to safeguard data on security audits for overseas factories, etc.

Expanding the OriginTrail decentralized AI framework with Chainlink oracle capability further extends the strength of RWA solutions by giving them access to real-time real world data. By synergizing the power of the Decentralized Knowledge Graph and Chainlink Data feeds, the capabilities of AI to retrieve verifiable information on RWAs can be applied across any domain.

Each knowledge resource on the OriginTrail DKG is created as a Knowledge Asset consisting of knowledge content, cryptographic proofs for immutability, and NFT for ownership. For our example, we will create a Knowledge Asset for Chainlink Data Feed. Once created, Knowledge Assets can be used in decentralized Retrieval-Augmented Generation (dRAG) AI applications. For our showcase, we will use an existing DOT/USD data feed in an AI application using the DKG and dRAG in 3 simple steps.

Step 1: Create a Knowledge Asset on the DKG

Since we wish to retrieve DOT/USD data feed in our AI application, we need to start by creating a Knowledge Asset linking to the data feed which we will use to retrieve the live price:

{
"@context": "http://schema.org/",
"@type": "ChainlinkDataFeed",
"@id": "https://data.chain.link/feeds/moonbeam/mainnet/dot-usd",
"description": "Chainlink DataFeed providing real-time DOT/USD price information on the Moonbeam network.",
"baseAsset": {
"@id": "urn:chainlink:base-asset:dot",
"@type": "ChainlinkBaseAsset",
"name": "DOT_CR",
"description": "Polkadot cryptocurrency (DOT)"
},
"quoteAsset": {
"@id": "urn:chainlink:quote-asset:usd",
"@type": "ChainlinkQuoteAsset",
"name": "USD_FX",
"description": "United States Dollar (USD)"
},
"productType": "price",
"productSubType": "reference",
"productName": "DOT/USD-RefPrice-DF-Moonbeam-001",
"contractAddress": "0x1466b4bD0C4B6B8e1164991909961e0EE6a66d8c",
"network": "moonbeam",
"rpcProvider": "https://rpc.api.moonbeam.network"
}

The main entities represented in the Knowledge Asset are:

  • Base asset (DOT_CR) — the first asset listed in a trading pair, this is the asset that is being priced
  • Quote asset (USD_FX) — the second asset listed in a trading pair, this is the currency the base asset is priced in

Necessary fields for DOT/USD value retrieval:

  • Contract address (contractAddress)
  • RPC Provider (rpcProvider)

This Knowledge Asset content can also be visualized in the DKG Explorer:

Trusted AI for next generation RWAs with OriginTrail and Chainlink (4)

Step 2: Use AI to query the DKG

From your application, you can use an LLM to generate DKG queries based on the user prompts. This step can have different degrees of complexity, so for this showcase, we will use the selected LLM to:

  • Determine if the prompt is relevant for the data feed (in our case, is the user’s question mentioning DOT token)
  • Use the LLM to structure a SPARQL query for the OriginTrail DKG to retrieve the Data Feed URL

An example of an engineered prompt to determine the relevance of the question for DOT token:

Given that the chatbot primarily responds to inquiries about the Polkadot ecosystem, including its native token, DOT, analyze the provided question to determine if there's a direct or indirect reference to DOT. Provide a response indicating 'true' if the question pertains to the value, function, or any aspect of DOT, within the context of discussions related to Polkadot ecosystem, either explicitly or implicitly, and 'false' if it does not. Question: {question}

If the above prompt determines the question as relevant (returns true), we proceed with a SPARQL query for the OriginTrail Decentralized Knowledge Graph. There are various techniques to obtain a SPARQL query with the LLM you’re using. In our case, we seek ChainlinkDataFeed type entities (Knowledge Assets) with DOT as the BaseAsset. The query result in our case will be a single Knowledge Asset containing information about the DOT/USD value. The SPARQL query should look like this:

PREFIX schema: <http://schema.org/>
SELECT ?dataFeed ?contractAddress ?rpcProvider
WHERE {
?dataFeed a schema:ChainlinkDataFeed ;
schema:baseAsset ?baseAsset ;
schema:contractAddress ?contractAddress ;
schema:rpcProvider ?rpcProvider .
?baseAsset a schema:ChainlinkBaseAsset ;
schema:name "DOT_CR" .
}

Step 3: Retrieve the data and display it in your application

Retrieve all the necessary information from the Knowledge Assets obtained through the SPARQL query. Essential information includes the contract address and RPC endpoint, as they are required to execute the code fetching price information from Chainlink. In our case, we are fetching the DOT/USD price.

Code execution

The following code uses ethers.js to fetch the requested value from the retrieved Data Feed. Here’s a simple example:

const { ethers } = require('ethers');

//Your code that executes SPARQL queries.

const rpcProvider = sparqlResult.data[0].rpcProvider;
const contractAddress = sparqlResult.data[0].contractAddress;

const provider = new ethers.providers.JsonRpcProvider(rpcProvider);
const abi = [{
inputs: [],
name: "latestRoundData",
outputs: [
{ internalType: "uint80", name: "roundId", type: "uint80" },
{ internalType: "int256", name: "answer", type: "int256" },
{ internalType: "uint256", name: "startedAt", type: "uint256" },
{ internalType: "uint256", name: "updatedAt", type: "uint256" },
{ internalType: "uint80", name: "answeredInRound", type: "uint80" },
],
stateMutability: "view",
type: "function",
}
];
async function getDOTUSDPrice() {
const contract = new ethers.Contract(contractAddress, abi, provider);
const [ , price] = await contract.latestRoundData();

console.log(`DOT/USD Price: ${ethers.utils.formatUnits(price, 8)}`);
}
getDOTUSDPrice();

Include Chainlink Data feed into the final response

You can modify how the LLM will perform the decentralized Retrieval Augmented Generation and include the data feed as a part of the response by engineering the prompt based on your requirements. Here’s one example that appends it at the end of the generated response.

Trusted AI for next generation RWAs with OriginTrail and Chainlink (5)

The next generation RWA solutions will be using the best of what the Internet, Crypto and AI have to offer. Combining the power of OriginTrail DKG and Chainlink unlocks avenues of value in the RWA industries that can disrupt the way those industries operate today. Your path to disrupting the trillion dollar industries can start with the 3 steps shown above. Join us in Discord to let us know how OriginTrail and Chainlink can boost your solution with trusted AI.

Build transformative AI solutions on OriginTrail by diving into ChatDKG.ai and joining our Inception program today.

Trusted AI for next generation RWAs with OriginTrail and Chainlink (2024)

FAQs

Does Chainlink use AI? ›

As the universal blockchain connectivity standard, Chainlink can interface with individual AI models as a single source of inputs into smart contracts, thereby connecting smart contracts to AI.

What is the max supply of OriginTrail? ›

About OriginTrail

TRAC has a circulating supply of 412.32 M TRAC and a max supply of 500 M TRAC.

Will banks use Chainlink? ›

The future of finance is onchain, and Chainlink CCIP is the on-ramp for banks, asset managers, and other financial services companies.

Which crypto coin is related to AI? ›

Top Artificial Intelligence (AI) Coins Today By Market Cap
#NamePrice
1NEAR Protocol ( NEAR )$3.98
2Internet Computer ( ICP )$7.72
3Artificial Superintelligence Alliance ( FET )$1.34
4Bittensor ( TAO )$316.96
39 more rows

Does Chainlink use smart contracts? ›

Chainlink is a decentralized oracle network or blockchain abstraction layer that communicates off-chain data to a blockchain. Its oracles securely enable computations on- and off-chain, supporting what it calls hybrid smart contracts and its cross-chain interoperability protocol.

Does blockchain use AI? ›

AI can be used to detect and prevent fraudulent activities within Blockchain networks. It can analyze large amounts of data to identify anomalies or suspicious transactions. AI can enhance encryption and authentication methods, making Blockchain more secure.

What programming language does Chainlink use? ›

Solidity

What does Chainlink run on? ›

Part of LINK's value in the marketplace is really Ethereum (ETH) value, because Chainlink runs on the Ethereum blockchain and relies on Ethereum smart contracts to earn money. First created in 2017, the Chainlink team has so far been able to deliver on its vision of providing accurate external data to blockchains.

Top Articles
Buy Ethereum Name Service (ENS): value and trends
Company Registration Number (CRN) for the UK explained  | Talk Business
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 6191

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.