1 pointby nathanbraun18 hours ago3 comments
  • badmonster16 hours ago
    How does the verification system work, and what kind of use cases would benefit from using signed chats with hash signatures in nvim-ai
    • nathanbraun15 hours ago
      From the README:

      How it works

      In a signed chat, nvim-ai hashes the full conversation history and latest response immediately after getting a reply from the LLM. It inserts that hash into the buffer as a signature block.

      Separately, the :NAIVerify command hashes the full buffer, compares it to the signature, and displays the "Verified" text (as an extended mark) if it matches.

      Also:

      - The hashing algorithm uses a persistent, secret key. This prevents the user from simply editing the text in the buffer, then re-hashing it and tampering with the signature themselves.

      - As soon as the buffer is edited the "Verified" text disappears (since we can no longer guarantee it matches) but you can check it again by running :NAIVerify.

      The hashing algorithm will ignore previous signature blocks and blank lines. Other formatting changes count as differences.

      Re uses -- besides arbitration like in the README, you could use it for habit contracts (e.g. beeminder or forfeit). For example, I have a template that I use for a weekly review and have AI evaluate it and make sure it includes all the sections it's supposed to have. If it does the AI responds "Review meets requirements". This verification could prevent one mode of cheating, which would be me just typing in "Review meets requirements" myself.

      • badmonster15 hours ago
        How is the persistent, secret key managed and stored securely, and what mechanisms are in place to prevent key leakage or unauthorized re-signing of tampered chats?
  • nathanbraun18 hours ago
    I guess HN cuts off the hash portion of URLs, but the part about signing/verifying is here:

    https://github.com/nathanbraun/nvim-ai#verifying-chats

  • andrewfromx18 hours ago
    couldn't I just like pinky-swear to my friend and that should be enough?