About
In this project, we are going to build an application on anchor document on the blockchain and augment an LLM with this on-chain data using RAG (Retrieval Augmented Generation) in order to ask information about the status of anchored documents using natural language. Anchoring documents on the blockchain has many use cases, one of which being a legal proof that a document was created at a specific time, e.g. in the music industry where tracks are anchored on-chain to prove the time of their production. For this, we are going to develop a simple smart contract on Starknet that will store hashes of documents we wish to anchor. In addition, metadata about the document will be stored in a vectorial database in order to later be injected into the LLM context. We’ll then use the API of OpenAI to ask questions such as: Example question 1: Is my document helloworld.pdf anchored on-chain? Expected answer: Yes, your document helloworld.pdf has been anchored on July 23rd 2023 under the hash 3ea78b98he on Starknet with the transaction tx36284vh2434jvv9u2uhh24uih. Example question 2: Is the track In the Air Tonight by Phil Collins anchored on-chain? Expected answer: Yes, this track has been anchored by SACEM on October 12th, 2021 under the hash 976b686a86 on Starknet with the transaction txdedit7824d3. Example question 3: Is the hash 876a67ccb anchored? Expected answer: Not, but there is an on-going transaction under the id tx12su23bj4 that will anchor this hash in the next few minutes.
Builders