Logo van Advisor Protocol

Advisor Protocol

Organisatie
bis-med-it
advisor-protocol

Model-agnostic escalation protocol for complex mathematical reasoning, derivation verification, and theoretical validation. Use when the executing agent encounters dense mathematical content from a paper, unfamiliar identification schemes, non-standard prior derivations, or any situation where the agent's confidence in correctly translating mathematics to code is low. This skill routes the query to a more capable reasoning model; the specific provider and model are configurable and not hardcoded.

Overzicht

Uitgeverbis-med-it
Repositorymarco-BIS
Skillnaamadvisor-protocol
Sterren
28
Forks
6
Meegeleverde bestanden
Alleen instructies
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door bis-med-it op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Advisor Protocol in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/bis-med-it/marco-BIS/tree/main/skills/advisor-protocol
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bis-med-it/marco-BIS.git /tmp/marco-BIS
mkdir -p .claude/skills
cp -r /tmp/marco-BIS/skills/advisor-protocol .claude/skills/advisor-protocol
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Advisor Protocol in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Advisor Protocol automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Advisor Protocol niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Advisor protocol

Purpose

The executing agent handles the routine workflow. When mathematical content exceeds its confidence, it asks a more capable reasoning model to check the work before proceeding, as a researcher would consult a senior colleague on a tricky derivation.

When to escalate

The executing agent should invoke the advisor when:

  1. Unfamiliar derivations. A paper introduces notation, distributional assumptions, or algebraic steps the agent cannot confidently verify.
  2. Novel identification schemes. Sign restrictions with complex penalty functions, narrative identification with inequality constraints, or set-identified models.
  3. Non-standard priors. Any prior structure not covered by the scripts/lib/bvar.py module docstrings or CONVENTIONS.md.
  4. Distributional theory. Posterior derivations involving non-conjugate cases, marginalisation over nuisance parameters, or asymptotic approximations.
  5. Ambiguous mathematical notation. When a paper's notation is inconsistent or context-dependent and the agent is unsure of the correct interpretation.
  6. Cross-checking implementations. After coding a complex formula, the agent can ask the advisor to verify the code matches the mathematics.

Do not escalate for: routine matrix algebra, standard OLS/GLS, well-documented Minnesota prior computation, basic time-series transformations, or anything already covered in verified reference documents.

Advisor configuration

The advisor is off by default. Before any call, read advisor.enabled in the repo-root config.yaml. If it is not true, do not call the advisor: tell the user the step would normally be escalated, continue without it, and suggest checking the derivation by hand or enabling the advisor.

The advisor is configured in the repo-root config.yaml under advisor: (enabled, provider, model, endpoint, api_key_env, an optional fallback provider, and settings: max_attempts, timeout_seconds, log_all_exchanges, require_human_review). The model named there is an example; set one the user has access to. Users or administrators set this once; the agent reads it at runtime.

The agent sends the query through the configured provider's API; the library implements no advisor calls.

Escalation protocol

Step 1: Prepare the query

The executing agent constructs a structured prompt for the advisor:

CONTEXT:
I am implementing [model/method] from [paper reference].
The executing environment is [Python/R/Julia].

MATHEMATICAL CONTENT:
[Extract the relevant equations, definitions, and notation from the paper.
Include surrounding context so the advisor understands the setup.]

SPECIFIC QUESTION:
[One of:]
- "Verify that the following derivation is correct: [steps]"
- "Translate this mathematical expression into pseudocode: [expression]"
- "This paper uses notation X for Y. Please confirm my interpretation: [interpretation]"
- "I have implemented this formula as [code]. Verify it matches the mathematics."
- "Derive the posterior distribution for [parameter] given [prior] and [likelihood]."

CONSTRAINTS:
- Provide step-by-step reasoning.
- Flag any assumptions that are implicit in the paper but should be made explicit.
- If the derivation has multiple valid interpretations, list them.
- Express the final result in explicit matrix notation with dimensions annotated.

Step 2: Call the advisor

Send the query through the configured provider's API as a standard request, with no provider-specific logic beyond API format translation. If the primary provider fails and a fallback is set, try the fallback. If no provider answers, tell the user to verify the mathematical content manually before proceeding.

Step 3: Process the response

  1. Parse the advisor's response.
  2. Extract: verified derivation steps, pseudocode, flagged assumptions, and any alternative interpretations.
  3. Present to the human for review (if require_human_review is true). The review happens after the call and before the response is used.
  4. Log the full exchange via the research-log skill.

Step 4: Incorporate into workflow

Once the human confirms the advisor's output:

  1. Save the verified derivation as a reference document in the relevant skill's references/ directory (created on first use; e.g., <skill-name>/references/verified_xyz_derivation.md) or alongside the lib module that needs it (e.g., scripts/lib/references/verified_xyz_derivation.md).
  2. Use the pseudocode to implement the formula.
  3. The reference document persists, so future runs of the same method do not need to re-escalate.

This creates a growing library of verified mathematical content over time.

Cost management

Advisor calls are expensive relative to routine execution. For each session, the agent records in the research log the number of advisor calls, tokens per call, and a cost estimate from the provider's published pricing. If costs are a concern, the user can:

  • Ask the agent to confirm with the user before each advisor call (an explicit step before invoking; require_human_review reviews the response after the call, so it saves no cost)
  • Use a local model as the advisor for cost-free but potentially lower-quality review
  • Pre-populate references/ with verified content to reduce future escalations

Institutional deployment considerations

Central banks and research institutions may have:

  • Air-gapped networks. Use a locally hosted model as the advisor.
  • Data confidentiality constraints. The advisor prompt should never include proprietary data, only mathematical content from published or working papers. The skill instructs the agent to send only equations and derivations, never datasets or proprietary data. This is a policy, not a technical filter.
  • Approved vendor lists. The configurable provider system accommodates this: set only the approved provider(s) in the configuration.
  • Audit requirements. The agent logs every advisor exchange in the research log, with timestamps, prompts, responses, and human confirmation status.

Veelgestelde vragen

Wat doet de AI-skill Advisor Protocol?

Model-agnostic escalation protocol for complex mathematical reasoning, derivation verification, and theoretical validation. Use when the executing agent encounters dense mathematical content from a paper, unfamiliar identification schemes, non-standard prior derivations, or any situation where the agent's confidence in correctly translating mathematics to code is low. This skill routes the query to a more capable reasoning model; the specific provider and model are configurable and not hardcoded.

Waarom Advisor Protocol gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Advisor Protocol bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Advisor Protocol in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/bis-med-it/marco-BIS/tree/main/skills/advisor-protocol. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Advisor Protocol gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Advisor Protocol gebruiken?

Zoveel als je wilt. Je kunt Advisor Protocol gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Advisor Protocol gratis?

Ja. Deze skill is door bis-med-it op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇