Inspiration

For many of us, the issues of centralization and data mining have exposed the drawbacks of Web 2. Even now, and in conversations I've had with others, it's clear that our emails and phone numbers are no longer as private as they used to be. Just recently, I received an unsolicited message from an unknown number inviting me to join a dubious site. It was evident that my phone number had somehow made its way to people I'd rather not have it. This not only eroded my trust in a company I had once relied on, but it also highlighted the pitfalls of centralized Web 2 platforms.

Frustrated by such experiences and many others, I decided to explore the world of decentralization, where we have more control over our data. However, since transitioning to the Internet Computer blockchain, I've encountered various projects that aim to replace their centralized counterparts. Unfortunately, they all share a common issue – there's a significant gap between users like me and the project founders. It's challenging to convey concerns or get assistance when needed.

Thankfully, I managed to find some of the founders on Twitter, and after discussing the matter, they all echoed a similar sentiment. To be truly decentralized and gain the trust of customers, every aspect of a product must embrace decentralization, and third-party integrations must prioritize user privacy. However, they faced a dilemma – they couldn't find a suitable, pre-built solution that met these requirement to integrate into their dApps to bridge this communication gap. Most contemplated building it themselves, but that would entail assembling a new team and allocating an unprecedented budget.

This is where Nexai comes into the picture, an AI-driven assistant that dApps can seamlessly integrate into their platforms. It's designed with a strong emphasis on security and anonymity, ensuring that users don't have to divulge sensitive information during interactions with the assistant. Furthermore, all conversations are automatically deleted once they conclude.

What it does

Nexai is a groundbreaking AI-powered decentralized assistant, designed to operate on the DFINITY Blockchain. Our platform transforms customer interactions by serving as a versatile online assistant for businesses, ensuring seamless customer support and enhanced user experiences. Acting as an intelligent chatbot, Nexai effortlessly handles customer inquiries, offers real-time assistance, and guides users through websites.

Advanced Natural Language Processing and Machine Learning

Nexai boasts advanced natural language processing and machine learning capabilities, ensuring it delivers intelligent and context-aware responses to customer questions. Leveraging blockchain technology, Nexai guarantees data security, transparency, and privacy in all customer interactions.

Eliminating Intermediaries with Blockchain

By harnessing the power of blockchain, Nexai eliminates the need for intermediaries and third-party entities in customer-business relationships. This ensures that all communications remain secure, tamper-proof, and efficient. Businesses can now automate repetitive tasks and provide Natural Language-based responses, customized based on each customer's past interactions and preferences.

Unprecedented Insights and Automation

Nexai empowers businesses with advanced AI capabilities and granular analytics, providing unparalleled visibility into customer activities. This enables companies to deliver personalized follow-up messages and automate the entire customer engagement process.

Nexai is not just a chatbot; it's a transformative force that redefines customer engagement, leveraging the synergy of AI and blockchain technology.

Visit our website to explore how Nexai can revolutionize your customer support and elevate user experiences.

How we Built Nexai

Nexai's foundation lies in a meticulously crafted vector database, meticulously designed and implemented in Rust. This database harnesses the power of fast approximate nearest neighbor search via the HNSW index, delivering instant-distance calculations. What sets it apart is its innate intelligence and adaptability, achieved through the processing of embedded vector coordinates, each spanning a length of 384. These coordinates serve as the essence of Nexai's learning capability.

The key to Nexai's intelligence is the proximity-based approach it employs. In essence, it creates a virtual landscape where questions and answers are encoded as vector matrices. This landscape allows Nexai to discern the similarity between user queries and existing knowledge, thereby providing contextually relevant and intelligent responses.

This approach shares a resemblance with industry giants like Google, renowned for leveraging vector databases for image classification, text search, and other data-intensive tasks. Nexai's vector database serves as the bedrock of its capabilities.

Now, let's dive into the components that make Nexai function seamlessly:

The Nexai Canister

At the core of Nexai's operation lies the Nexai Canister, a secure middleman between users and the system(vecto. It not only enhances security but also orchestrates the flow of data between the various components. It plays a dual role by serving as a database where companies can store their information and query it effectively.

Vector Database Canister

The vector database stores questions as vectors and groups similar questions closely together in a multi-dimensional space. It searches for similar questions to provide context-aware responses. Questions are stored as vectors in the database, each with a length of 384. Similar questions are placed near each other in the vector space.

The External Canister

Nexai also features an externally accessible canister, aptly named External. This canister is open to the public, enabling universal access. Users engage with this canister to interact with Nexai, directing their queries and receiving timely responses. To streamline this interaction, we've developed the "nexai-assistant" npm package, a client-side tool simplifying user engagement.

From the Company's Perspective:

For companies, the Nexai journey unfolds as follows:

  1. Begin by registering your company, which initiates instances on both the vector and Nexai databases.
  2. Train your Nexai assistant by providing it with question-answer pairs, enabling it to comprehend and respond intelligently.
  3. Store these valuable training sets within the Motoko canister (Nexai) and as embeddings within the vector database.
  4. Prior to integrating Nexai into your dApp, ensure your bot's functionality meets your specific requirements.

From the User's Perspective:

For users, Nexai promises a seamless experience:

  1. Formulate your query or question.
  2. Encode your inquiry using an on-chain model, designed to accommodate substantial data loads with a size of 100MB.
  3. Submit your inquiry to the Nexai canister, crafted using the Motoko programming language. The canister handles validation and redirects as needed.
  4. The question is then seamlessly transmitted to the vector database for processing.
  5. The vector database promptly retrieves an answer, based on the proximity of vector coordinates in the personalized training space tailored to your company's unique knowledge.
  6. The retrieved answer undergoes further refinement through an LLM (Large Language Model), benefiting from the computational prowess of WebGPU. The result is a well-informed response that swiftly reaches your screen.

In essence, Nexai is not just an assistant; it's an innovative solution, underpinned by cutting-edge technology, designed to empower both businesses and users alike.

Challenges we ran into

Our path to creating Nexai wasn't without its share of hurdles. Let's delve into the challenges we encountered and how we navigated through them:

1. Tackling the Intricacies of the "Instance-Distance" Library

One of our initial roadblocks was mastering the nuances of the "instance-distance" library in Rust. We needed this library to perform seamlessly within the Internet Computer (IC) blockchain to align with our vision. The intricacies and fine-tuning required for this integration posed a formidable challenge.

2. On-Chain Model Training: Conquering Storage Constraints

Training complex models on-chain, like the resource-intensive Llama model, presented a unique challenge. Although we devised innovative methods to compress these models to approximately 4GB, we bumped into the limitations of the canister's storage capacity. This constraint compelled us to explore creative solutions to ensure optimal model training and performance.

3. Navigating the WebGPU Compatibility Maze

While WebGPU holds immense promise for unleashing the full potential of Nexai, we encountered a compatibility snag. WebGPU's functionality isn't universally supported across all web browsers, which posed a conundrum. To ensure a seamless user experience, we needed to address this compatibility concern and explore alternatives to accommodate a wider user base.

4. Transforming Our NPM Library into an Accessible Package

Converting our robust NPM library into a user-friendly package was a multifaceted challenge. We aimed to offer developers a streamlined experience for integrating Nexai into their projects. This involved meticulous packaging, documentation, and ensuring ease of installation—a journey that demanded attention to detail.

Accomplishments that we're proud of

As we journeyed towards creating Nexai, we encountered numerous milestones that we hold dear. Here's a glimpse into the accomplishments that fill us with pride:

1. Tailoring "Instance-Distance" Library to Perfection

Our pursuit of excellence led us to a significant achievement—we forked the "instance-distance" library and meticulously tailored it to our specific needs. This customization was pivotal in ensuring that Nexai operates flawlessly within the Internet Computer (IC) blockchain, aligning with our vision of precision and efficiency.

2. Pioneering an AI Database on the Internet Computer

A groundbreaking achievement that sets Nexai apart is the establishment of an AI database on the Internet Computer—an innovation that stands as the first of its kind. This pioneering leap opens up new horizons for AI-driven solutions within the IC ecosystem, marking a transformative moment in decentralized AI technology.

3. Building a Thriving Twitter Community

Our proactive engagement on social media, particularly Twitter, has borne fruit. We've nurtured a vibrant and growing Twitter presence, capturing the attention of prominent figures in the Internet Computer community. This vibrant platform serves as a hub for sharing insights, updates, and fostering meaningful connections.

4. Gaining Recognition and Forging Alliances

Our journey led us to a remarkable recognition—a shoutout and a meeting with Code & State. This acknowledgment highlights the value and potential of Nexai within the IC space. Furthermore, discussions around a potential partnership with Code & State signify our commitment to impactful collaborations that amplify Nexai's reach.

5. Streamlined Integration with External Canister

Simplifying integration has been a core achievement. We successfully deployed a canister to the public domain and seamlessly linked it with GitHub releases. This streamlined approach empowers users to effortlessly incorporate our external canister into their applications. By adding just a few lines of code to their dfx.json file, users can harness the full potential of Nexai in their projects.

These accomplishments signify the dedication and ingenuity of our team. Each milestone not only brings us closer to our goals but also reinforces our commitment to delivering a groundbreaking AI-driven decentralized assistant with Nexai.

What we learned

Throughout the development journey of Nexai, our team has gained valuable insights and learned important lessons:

  1. Adaptability and Customization: We successfully adapted and customized the "instance-distance" library to meet our specific project needs. This experience showcased our ability to overcome technical challenges and tailor solutions to align with our project's unique requirements.

  2. Pioneering Innovation: Our achievement in creating an AI database on the Internet Computer reflects our commitment to innovation and pushing the boundaries of decentralized AI technology. We've learned the importance of exploring new frontiers and leading the way in this evolving landscape.

  3. Community Engagement: Building a thriving Twitter community and receiving recognition from influential figures within the Internet Computer community underscored the significance of community engagement. We've learned that maintaining an active online presence and fostering connections is crucial for project visibility and growth.

  4. Partnerships and Collaboration: Our interactions, including a shoutout and meeting with Code & State, highlighted the potential for partnerships and collaborations. We've recognized the value of networking and seizing opportunities to expand Nexai's reach through strategic alliances.

  5. Streamlined Integration: Our efforts to simplify the integration of our external canister with GitHub releases have reinforced the importance of prioritizing user experience. We've learned that user-friendly and accessible solutions are essential for developers seeking to incorporate Nexai seamlessly into their projects.

These lessons serve as valuable insights that will guide our ongoing efforts to enhance Nexai's capabilities and impact within the Internet Computer ecosystem.

What's Next for Nexai

As we move forward, Nexai is poised to embark on an exciting journey of growth and innovation. Our roadmap for the future is filled with ambitious goals and strategies that will solidify Nexai's position as a groundbreaking decentralized AI assistant on the Internet Computer blockchain. Here's a glimpse of what's next for Nexai:

  1. Enhanced AI Capabilities: We are committed to continuous improvement in AI technology. Nexai will undergo further enhancements in natural language processing and machine learning, enabling even more intelligent and context-aware responses to user inquiries.

  2. Integration Expansion: Nexai will explore new avenues for integration with various platforms, both on-chain and off-chain. We aim to make Nexai readily available to a broader range of users and developers, ensuring seamless compatibility with diverse ecosystems.

  3. Decentralized AI Ecosystem: Our vision is to contribute to the development of a vibrant decentralized AI ecosystem on the Internet Computer. Nexai will actively engage with other projects and developers, fostering collaboration and innovation within the community.

  4. Community Building: Nexai's growth will be fueled by an active and engaged community. We plan to organize workshops, webinars, and hackathons to empower developers and users to harness the full potential of Nexai.

  5. User-Centric Features: Listening to user feedback, we will introduce user-centric features and improvements. Nexai aims to provide an exceptional user experience by addressing user needs and preferences.

  6. Global Outreach: Nexai will expand its reach beyond borders, targeting international markets. We will explore partnerships and collaborations that will facilitate Nexai's adoption in various countries and regions.

  7. Research and Development: Our commitment to research and development remains unwavering. Nexai will invest in cutting-edge technologies, ensuring that we stay at the forefront of decentralized AI advancements.

  8. Transparency and Security: Nexai will uphold the core principles of blockchain technology – transparency and security. We will continue to prioritize data security, privacy, and tamper-proof interactions in

Built With

Share this project:

Updates

posted an update

since the project's submission. We have improved our AI's understanding so that it can respond to various questions. The language model that runs on the browser has been improved to react more quickly. Additionally, we enhanced our visitors' experience by including additional error and success messages to guide them through each stage.

Log in or sign up for Devpost to join the conversation.