Zypher Network
Twitter Games DevWebsite
  • General Introduction
    • Zypher Opportunities
    • Join Our Community
  • Zytron (AI Chain)
    • What is Zytron Kit (Layer3 Framework)?
      • Precompiled Contract
      • Zytron Kit
      • Zytron and Zero Gas Eligibility
        • How to get Zero Gas SBT
    • Zytron AI Chain
      • Useful Links (RPC, Bridge, Gas)
      • Network Configuration
      • Zytron-Linea Bridge (Native Bridge)
        • Bridging to Zytron Layer3
        • Bridging from Zytron Layer3
      • Zytron Block Explorer
      • Mint Zero-gas SBT
      • Zytron Testnet
  • ZYPHER AI AGENT
    • Zypher Trustless AI Agent
      • Trustless AI Agents
      • Alpha Girl
      • Zypher Girl
      • zkPrompt
        • Proof of Prompt
      • zkInference
        • Proof of Inference
  • (Campaign) Treasure Ark
    • Treasure Ark is Here!
      • Campaign Overview
      • How to Participate
      • 6X Rewards
      • How to Earn Reward Points
      • Rules for Obtaining Invitation Codes
      • Campaign Timeline
      • Frequently Asked Questions
      • Zypher Network Audit Information
  • (Proof) AI Mining Network
    • ZK-Proof AI Mining
      • Proof of ZK Work
      • ZK Proof Generation Prediction (Gaming)
      • $Zypher Token Utility
  • Become a Minner
  • AI Games & Ecosystem
    • AI Gaming Portal
      • Zypher AI Games DAO
      • Featured AI Games
        • Crypto Rumble
        • AI Ludo Game
        • zBingo Game
        • Protect T-Rump Game
        • Rainbow Journey Game
        • Stick Cat Game
        • Assassins Jump Game
        • z2048 Game
        • Airdrop Battles Game
        • Ten Sum Rings Game
        • zAce Game
        • Divine Cataclysm Oblivion (D.C.O)
        • Crypto Shooter Game
        • Endless Snake Game
      • Zypher Game Bot (AI driven)
      • z2408 x EXP chain Testnet Infromation
        • z2048 Gameplay Guide
        • Galxe Campaign Prize pool Information
  • Developer Support
    • Zypher's ZK + AI Game SDKs
      • SECRET ENGINE
      • AW ENGINE
      • Z4 ENGINE
  • Crypto Economics
    • Zypher's Crypto Economics Paper
      • Chapter 1 Background
      • Chapter 2 Introduction to the Zypher’s Safe AI Network
      • Chapter 3 Decentralized Mining Network and Proof of ZK Work
      • Chapter 4 Token Utility & Allocation Design
Powered by GitBook
On this page

Was this helpful?

  1. ZYPHER AI AGENT
  2. Zypher Trustless AI Agent

zkPrompt

PreviousZypher GirlNextProof of Prompt

Last updated 3 months ago

Was this helpful?

In large language models (LLMs), prompts are categorized into System Prompts and User Prompts. Both types of prompts directly impact the user experience and the effectiveness of the model, with system prompts playing a particularly crucial role. A typical LLM interaction workflow is illustrated in Figure 1.

System Prompts are provided by developers to define the context, tone, and boundaries of LLM responses. Acting as a guiding framework, they shape the AI's behavior and style throughout the interaction. Mastering the design of system prompts has become a core skill for LLM developers, which is why most are reluctant to disclose their system prompts. Moreover, many LLMs operate as black boxes for users, making it impossible to guarantee the consistency of system prompts.

System Prompt Consistency refers to the model's ability to consistently respond based on the predefined system prompt across different interactions, without any alterations. This ensures that the model's behavior aligns with the developer's intended framework.

To address this, we propose zkPrompt, a method leveraging zero-knowledge proof (ZKP) algorithms to prove the consistency of model behavior (i.e., system prompt consistency) without revealing the system prompt itself. As shown in Figure 2, the process of initializing the model with a system prompt is compiled into a circuit, and a commitment module is introduced within the circuit to commit to the system prompt provided to the model.

The zk circuit ensures that the committed prompt and the prompt used to initialize the model are identical. The commitment value is then output publicly from the circuit, allowing any user to verify this fact using the initial commitment value.

A cryptographic commitment is a protocol that allows one party to commit to a value without revealing its content to another party until the committer chooses to disclose it. Common commitment schemes include hash commitments and Pedersen commitments.

In zkPrompt, developers can both keep their committed system prompt confidential and ensure that once the system prompt is committed, it cannot be altered. This guarantees the integrity of the system prompt.

Overall Workflow:

  1. The developer commits to the system prompt and sends the commitment value on-chain.

  2. The circuit is initialized, generating a prover key and a verifier key, with the verifier key sent on-chain.

  3. The user sends a User Prompt.

  4. The LLM processes the user request and generates a Response along with a zk Proof, which is then sent on-chain for verification.

  5. The smart contract uses the initial system prompt commitment value to verify the zk Proof. If the verification passes, it ensures that the system prompt has not been tampered with.