![zkGPT](https://prd-akindo-private.s3.us-west-1.amazonaws.com/products/icons/kz8ZZ2DOqh8rlDGD_medium.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIAUVKHMQQTDKNLTHOT%2F20240912%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240912T062955Z&X-Amz-Expires=3600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHcaCXVzLXdlc3QtMSJHMEUCIQDfJ9CglED4jKhqpY%2Bt5NGgiv4KOo7dIWVBXopMdvVEAwIgKzTULXXWyHL%2FflfYUIUGtDjJBxVFz1vBu9yyx9%2F9fBsq9AMIoP%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARABGgwzMjA2NjE2NTI1MTgiDPhS%2F5v54b9fwQrf4SrIAzufEfyMq8FWw2SY4rDy0Nk71QT4LzF%2Fcn1RoM4fEvfClCRl9Li08rQJZUQOkOfvrYnZVEw17Wf6Hln0qQpV8iMthSWInSAd74ZQHJ7V4D4CaZYFo0McSTylgpQrVKCECdO53iSprT5YYtbdeNZtjx%2BiftvqNDPE2GGzD80QWg6nb16IICS0yiF4GPuEFuak8KSZqmaV1NZ1wFictpRe9dAfkzPmhwT4ujthNvbcnBvq%2FDSrdaF03nquCqa5WmMhPAhpHOcH6AlvjvO8nUGGqJoZrXP1A73%2BxUrPiGJE4b%2BU2i3lc2YyFoT21P2iuit7HDW8makrejZeAz9dKqzSiYa2g1EudksjLamkfRt%2BiMJMn0dP0DgKkYFUi6dSGCwxgKhDVeK5whareopXDvvyzD62KEKwhyj8w2jC7Ekl6mN9pEA2m0N%2FKPA1X%2B7kt4B%2BRxjmhFUPBK29EoUegDbRCyI3fpSsxveFGkLrSWudfo50ixscuB61A7UXm7ZIu7qOK2Fa0QLUY7fS6QvWUhXSqFClYkAY%2F0epDO3kdZ5%2BfWPkNjEp94TJWwzduAUWKyI1KPgfmMFhp4eJF4hNTepyY%2BoKSMQhCVOWEDCBkoq3BjqlASkXDYYslhYH%2BTk3Iyhhmq3J0KYPkhiblL7vOEns31aqWeaYZ9AsXfZSVpvmb0cZD%2BigBCmthjEdCuXwyPvHydkrOoUPzQ%2Fjw4H8%2F61Q5GngcbM1883mnaLjJIZHH%2FVCh85XDr47jJHDbkN9lDD7jZ7Dx9C63%2FDYjC3RAYbdobql%2FUWxS2qaX4VYveDMnCsKpKGjh2e9vCYvS2Px96u%2Fbcz5c%2BvPOg%3D%3D&X-Amz-Signature=667496a7851428285a5effa31eb15c99b0dae65e4e7148ff918ef4de76c6c121&X-Amz-SignedHeaders=host&x-id=GetObject)
zkGPT
![zkGPT](https://res.cloudinary.com/travary/image/upload/c_fill,h_400,w_400/v1/prd-akindo-public/communities/icon/Be7jK0kVdH0Zkkwv1.png)
![zkGPT](https://res.cloudinary.com/travary/image/upload/c_fill,h_400,w_400/v1/prd-akindo-public/communities/icon/Be7jK0kVdH0Zkkwv1.png)
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