Unlock $300K in Grants: Enter WaveHack Global Now!
zkGPT

zkGPT

A private knowledge hub for organizations and teams using GPT models and zkSNARK
zkGPT
zkGPT

Background

With ChatGPT and LLM models, we can inquire about specific topics by providing context before making the inquiry. For example, if we ask "What is Bitcoin price today? The AI model may response with "I can't provide the answer". However, if we supply the necessary context such as "The current Bitcoin price is $25,000 and then ask the question again, the model will return the Bitcoin price.


Because of the generative AI models have the ability to retain information and context from previous interactions with its long-term memory. When we provide specific context or information and ask a related question again, the model can then access and utilize the stored information to provide an accurate response.


Problem

By applying the concept from previous section, there is a huge potential for streamlining tasks within organizations or teams. However, sharing context especially sensitive information, may expose it to external parties or individuals operating the generative models.


zkGPT

A toolkit that enables organizations and teams to create their private GPT-based knowledge hub and allowing only authorized account have access to query and retrieve specific information such as employee handbooks, newsletters for stakeholders, internal team documents and more without revealing the identity via the use of zero-knowledge technology.


How It Works

There are 3 roles in the system:

Hub admin - responsible for defining access control, settings passwords and overall maintenance of the document within the hub

Hub users - are individuals who provide documents to the hub and perform queries

Miners - are individuals who run the zkGPT node and provide the necessary resources

The system utilizes a hybrid model where all documents are stored in a database hosted by miners while some information is persisted on-chain and they're all interconnected with arithmetic circuits that encode operations written in the Circom language.


Limitations

Due to time limitations, we can provide only a POC version and limiting the number of questions to 5 per account due to the heavy resource consumption involved in generating ZK-proofs.


Technologies

ZK libraries - zkSNARK, Circom, snarkjs, PLONK

Smart contact - Solidity, BNB Testnet

AI frameworks - Langchain (parser, in-memory vector store), OpenAI (Text embeddings)

Backend - Node.js, PouchDB, Docker, AWS ECS

Frontend - Next.js, TailwindCSS, Vercel


Presentation

Link