Brian was born at the ETHPrague 2023 hackathon to become the AI-powered brain of web3. We want to enable all users, whether they are experts or not, to easily interact with the web3 world by prompting in plain English.
What it does
The decentralized nature of Web3 often leads to fragmented and hard-to-comprehend information spread across various sources such as websites, documentation, blogs, and social media platforms. Brian addresses this challenge by utilizing its vast knowledge base and leveraging AI techniques to provide precise answers to questions about web3. It also simplifies complex concepts with the ELI5 button, ensuring that a newbie can understand too. Brian also indicates the sources from which the information originates, giving users transparency and the ability to explore further.
Brian goes beyond providing information and empowers users to interact with decentralized applications (dApps) within the ecosystem. One common barrier to entry for many users is the complexity of interacting with smart contracts and executing transactions like swap, bridge, supply, borrow, and transfer. Brian simplifies this process by offering a transaction builder feature. Users can communicate their transaction intentions in plain English, and Brian will generate the corresponding smart contract interactions, making the process seamless and user-friendly.
One unique advantage of Brian's transaction builder is its ability to bypass the need for a functioning dApp frontend. In cases where the dApp's frontend is inaccessible or unresponsive, Brian allows users to interact directly with the underlying smart contract. Routing transactions through Brian allows users to send transactions and interact with the protocol even if the dApp's interface is down.
Brian provides a robust and uninterrupted Web3 experience.
How we built it
The Builds feature was built in ETHPrague leveraging on GPT's model. During this Augment hackathon, we wanted to test and change our approach using open-source, decentralized solutions that are also more sustainable in terms of cost without losing performance. As a result, we have:
- Implemented open-source Hugging Face model replacing the GPT one we were using;
- Applied LoRA (Low-Rank Adaptation of Large Language Models) which allowed us to accelerate the training of large models while consuming less memory;
- Generated and obtained more than 600 custom prompts in order to fine-tune the model, with the goal of allowing the model to better recognize the intent of a user. For example the command "Can you swap 100 USDC for ETH" can be said in many different ways such as "Can you buy 100 USDC for ETH?";
- Fine-tuned the above model with our 600+ custom prompts using Bacalhau for decentralized computing power. This allowed us to tow the model sustainably (also for the future) by not having higher costs and solving the previous vendor lock-in.
Challenges we ran into
- Understanding and applying in a very short time different technologies from those we were previously using;
- Choosing the right open source model to use without having a drop in performance;
- Tackling the high computation power needed to just even test this process in local.
Accomplishments that we're proud of
- We dropped OpenAI (ChatGPT) in favor of an fine-tuned open-source model (Falcon);
- Started using decentralized computation with Bacalhau;
- We reduced the vendor lock-in and the prompting costs;
- We experimented :)
What we learned
- We realized, even more, that version 1.0 doesn't have to be that perfect. If the goal is to develop the final product from the start, it may not actually come to anything. Whereas if you are working on intermediate steps, as in our case running the model with a test dataset (600+ prompts) and a smaller model can be a great way to learn and constantly improve the project;
- How to improve fine-tuning of AI models on limited resources using LoRA.
What's next for Brian
- Keep studying and testing the best model solution for the transaction builder
- Generate more custom prompts to do deeper model fine-tuning;
- Expand the transactions you can perform through Brian beyond the currently supported balance, total supply, transfer, approve, swap, bridge, wrap/unwrap WETH, supply, and borrow on AAVE by supporting more protocols and chains.