Logo: Advisor Protocol

Advisor Protocol

Organisatioun
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.

Iwwersiicht

Editeurbis-med-it
Repositorymarco-BIS
Skill-Nummadvisor-protocol
Stären
28
Forks
6
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    bis-med-it huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Advisor Protocol an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/bis-med-it/marco-BIS/tree/main/skills/advisor-protocol
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-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 nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Advisor Protocol an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Advisor Protocol automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Advisor Protocol net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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.

Heefeg gestallte Froen

Wat mécht de KI-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.

Firwat Advisor Protocol op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Advisor Protocol besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Advisor Protocol an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/bis-med-it/marco-BIS/tree/main/skills/advisor-protocol an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Advisor Protocol benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Advisor Protocol benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Advisor Protocol domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Advisor Protocol gratis?

Jo. bis-med-it huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇