TL;DR
Zero-knowledge proofs let us verify sensitive computations—like clinical trials—without exposing private data, but they require rigid, unforgiving API calls that lock out everyday users. Putting a conversational LLM in front of these cryptographic pipelines makes them accessible, yet introduces a perilous risk: a hallucinated parameter can silently bind a proof to the wrong dataset or test. This paper solves that dilemma with "skeptical tools"—a backend architecture that treats the LLM strictly as an intent translator while overriding its inputs with verified server-side state, boosting task completion by ~23% and making conversational cryptography actually trustworthy.
What Problem Does This Paper Address?
Zero-knowledge succinct non-interactive arguments of knowledge (zkSNARKs) are cryptographic marvels: they prove a mathematical statement is true without revealing the underlying data. Frameworks like CoSMeTIC apply zkSNARKs to clinical statistics, allowing regulators or trial participants to verify that their medical records were properly analyzed without exposing patient privacy.
However, there is a massive usability gap. Operating these systems requires precise API calls armed with exact dataset hashes, nonces, and circuit identifiers. An LLM agent using the Model Context Protocol (MCP)—a standard way for AI models to call external software tools—seems like the obvious bridge, letting a user simply ask, "Prove my data was used in the Kolmogorov-Smirnov test."
The catch? Cryptography demands absolute precision, while LLMs deal in probabilities. If an LLM guesses a missing parameter or hallucinates a user ID, the consequences go way beyond a weird chatbot reply:
- Selecting the wrong statistical test generates a cryptographically valid proof for the wrong question, masking semantic intent behind mathematical certainty.
- Fabricated user IDs bind proofs to the wrong patient datasets.
- Sensitive metadata (hashes, job IDs) passes through the chat loop, leaking outside the proof system's privacy guarantees to model providers.
Methods
Instead of trying to prompt-engineer the LLM into perfection, the authors demote it. In their architecture, the LLM acts only as an interpreter of natural language intent, never as an authority on state or identity.
Using a standard LangGraph ReAct agent connected via FastMCP to CoSMeTIC provers, Redis (session state), and PostgreSQL (user accounts), the authors introduce the Skeptical Tools Pattern. Comprising 20 design decisions, this pattern actively polices the boundary between the LLM and the cryptographic backend:
- Input Skepticism & Identity Stripping: Every tool call passes through a security interceptor that strips out any user ID the LLM tries to supply—preventing placeholder hallucinations—and injects the real authenticated identity from the server session.
- Server-Side State Override vs. Completion: Rather than sending chat history back and forth (stateless per-request), Redis tracks the user's active jobs. When downloading or verifying proofs, the tools completely override the LLM's proof-type parameter with the authoritative value stored in Redis.
- Deterministic Templates & Trust Labels: The backend appends unforgeable trust labels (e.g.,
[Cryptographically verified]) to responses and, in its strictest configuration, replaces LLM-written summaries on tool-backed turns with clean, deterministic text templates.
Datasets
Because no benchmark existed for conversational zero-knowledge systems, the authors built a custom evaluation suite of 82 annotated natural-language queries.
Test suite composition across 82 queries. (Note: Evaluated across 75 core ablation queries and 7 end-to-end verification queries.)
The suite stress-tests seven distinct scenarios: normal operations, graceful error handling, context-free ambiguities (like a casual "Check my status" with no job ID), impossible requests ("Email me the results"), out-of-scope redirects, multi-step sequential workflows, and "tool-bypass temptations" designed to lure the LLM into answering from memory rather than calling a tool.
Key Insights and Ideas
- Plausible defaults are worse than no defaults: When checking job status without server-side overrides, an omitted proof-type triggered a hardcoded default port, resulting in 267 silent misroutings (HTTP 404s). Models honestly reported the 404, which ironically meant lying to the user ("Your job doesn't exist"). In contrast, the verification tool had no default; when the parameter was missing, it threw an explicit error asking for the proof type, prompting the model to look it up and succeed.
- Chat history + past success = fabrication: Across 6,000+ runs, outright fabricated outcomes (claiming a download succeeded without calling a tool) happened only when conversation history was enabled and contained a prior successful turn for non-thinking models to imitate. Keeping tool turns stateless eliminated fabrications entirely.
- Standard automated graders can be gaslit: A naive faithfulness grader penalized honest error messages containing the word "submitted" while letting zero-tool hallucinations slip through because they contained keywords like "download." Fixing the grader revealed the main models were nearly 100% faithful to tool outputs.
- The metadata privacy leak: Even when zero-knowledge proofs protect patient records, tool outputs containing dataset hashes and job IDs flow back into the LLM's context window—exposing execution traces to third-party model providers unless scrubbed first.
Key Results
Evaluating three open-weight model families (Qwen-3 32B, Mistral Small 3.2 24B, and Llama-3 8B) across more than 6,000 query executions:
- Massive jumps in task completion: Moving from a naive chatbot baseline to the full skeptical architecture with templates raised task completion by ~23 percentage points across all models—climbing from 70.2% to 93.0% on Qwen-3 32B, 65.1% to 88.4% on Mistral 24B, and 54.9% to 78.1% on Llama 8B.
- Zero wrong-port routing: Enabling Redis-backed proof-type resolution dropped misrouted status 404 errors across the three models from 198 down to 0, while cutting average status-check latency from 16.6s to 12.4s.
- Flawless end-to-end lifecycles: On Qwen-3 32B, the full system completed the entire four-step lifecycle (prove → status → download → verify) in 5 out of 5 trials (up from 0/5 in baseline configurations).
Limitations and Future Work
- Hallucinated lookup keys defeat overrides: Server-side overrides rely on finding the right record in Redis. When Llama hallucinated fake job IDs (like
12345), Redis lookups missed and fallback logic didn't trigger because an ID was technically present. - Trust label ambiguity: The
[Backed by CoSMeTIC prover]label vouched for tool invocation rather than computational success, inadvertently slapping a badge of legitimacy onto 404 error replies. - Scope constraints: Prover backend latency left reference jobs stuck in
queuedfor Mistral and larger Qwen sweeps, limiting cross-model download comparisons. Furthermore, prompt injection, corrupted payloads, and multi-user authorization scenarios were excluded—marking clear territory for future work alongside redacting tool-output metadata before the LLM ever sees it.
Summary updated