Skip to content

Best practice: HADS format for system prompts that work across all 300+ models #70

@catcam

Description

@catcam

OpenRouter's core value is model-agnostic access — users switch between GPT-4, Claude, Llama, Mistral without changing their app. But documentation and system prompts often break when switching because smaller models handle verbose docs differently than larger ones.

HADS (Human-AI Document Standard) solves this: https://github.com/catcam/hads

A lightweight Markdown tagging convention that works from GPT-4 down to Llama 3 8B:

## API Authentication

**[SPEC]**
- Method: Bearer token
- Header: `Authorization: Bearer <token>`
- Expiry: 3600s

**[NOTE]**
Switched from cookie auth in v2. Legacy docs mentioning cookies are outdated.

**[BUG] Token silently rejected after password change**
Symptom: 401 identical to expired token
Cause: All tokens invalidated on password change
Fix: Re-authenticate after any account operation

The AI manifest at the top tells any model what to read and skip — explicit instruction beats structural inference, especially for 7B models.

Why relevant to OpenRouter users:

  • System prompts written in HADS work consistently across model tiers
  • Context docs in HADS format reduce hallucination when switching to smaller/cheaper models
  • Zero overhead — pure Markdown, no tooling

Would this be worth a mention in the docs or examples as a best practice for portable system prompts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions