Hindsight Epistemic Classifier logo

Hindsight Epistemic Classifier

Community
AnthonyAlcaraz
hindsight-epistemic-classifier

Classify facts into HINDSIGHT's 4 epistemic networks (Latimer et al. 2025, cited in Ch4): World (objective external facts), Experience (agent's own first-person actions), Opinion (subjective beliefs with confidence), and Observation (synthesized entity summaries). The separation enables traceability — when users ask "how do you know that", the agent can distinguish evidence from inference from summary. Use when memory must support "how do you know" questions and the agent will be asked to justify its outputs. NOT for one-shot agents (no need to justify), NOT for storage-only systems (the classification is for retrieval-time reasoning, not just persistence).

Overview

PublisherAnthonyAlcaraz
Repositoryagentic-graph-rag-skills
Skill namehindsight-epistemic-classifier
Stars
29
Forks
9
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AnthonyAlcaraz on GitHub. Read the source before you install it.

Installation

Install the Hindsight Epistemic Classifier AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/memory/hindsight-epistemic-classifier
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills.git /tmp/agentic-graph-rag-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-graph-rag-skills/skills/memory/hindsight-epistemic-classifier .claude/skills/hindsight-epistemic-classifier
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hindsight Epistemic Classifier in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hindsight Epistemic Classifier on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hindsight Epistemic Classifier is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

HINDSIGHT 4-Network Epistemic Classifier

Overview

Production memory systems benefit from distinguishing what the agent observed from what it believes. HINDSIGHT (Latimer et al., 2025, cited in Ch4) organizes memory into four networks:

  • World network — objective facts about external reality. Verifiable by external sources (the production region is us-east-1, the CEO of ACME is X, the API endpoint returned 503).
  • Experience network — the agent's own first-person actions. "I called the deploy API at 22:30." "I retrieved 5 documents." First-person, timestamped, agent-as-actor.
  • Opinion network — subjective beliefs with confidence scores. "I believe the root cause is X with 0.7 confidence." Inference, not observation.
  • Observation network — synthesized entity summaries. "Sarah is the on-call lead this week" derived from the union of {Sarah's calendar, on-call rotation doc, prior incidents}. Distillation, not evidence.

Per the HINDSIGHT paper as quoted in Ch4: "developers and users can see what the agent knows versus what it believes." This skill is the classification layer that makes the distinction queryable.

When to Use

  • Audit-grade agents — when a user asks "how do you know that," the response must trace evidence to network
  • Regulated environments — opinion must be flagged as opinion, not stated as fact
  • Multi-agent systems — Agent A's opinion should not become Agent B's fact via uncritical knowledge sharing
  • Debugging hallucinations — if the agent stated X confidently, the network classification tells you whether X is evidence-grounded (World/Experience) or inference (Opinion/Observation)

Phrases: "where did the agent get this", "is this fact or inference", "justify the answer", "trust calibration", "HINDSIGHT", "epistemic status".

When NOT to Use

  • One-shot agents that need no justification trail
  • Storage-only systems (the classification is for retrieval-time reasoning, not just persistence)
  • Pure-retrieval agents that never synthesize — the Observation network is empty, the Opinion network is empty; just use World + Experience

Process

StepInputActionOutputVerification
1Raw fact text + optional metadatalib.classify(text, metadata)EpistemicClass(network, confidence)network ∈ {World, Experience, Opinion, Observation}; confidence in [0, 1]
2List of factslib.classify_batch(facts)List of EpistemicClasscounts per network match expected distribution for the source
3Memory containing classified factslib.justify(memory, query)Provenance chain: which World+Experience facts ground a given Opinion/Observationevery Opinion or Observation traces back to World or Experience
4Classified memorylib.network_audit(memory)Health report — % per network, orphan Opinions (no provenance chain), Experience without timestampsflags experience_without_timestamp_count > 0

Classification Heuristics

NetworkLinguistic signalsMetadata signals
Worlddeclarative third-person, no agent pronoun, verb tense past or present, no confidence hedgingsource != agent, external_ref present
Experiencefirst-person agent pronouns ("I called", "I retrieved"), action verbs, timestampsource == agent, action_type present
Opinionhedging ("I believe", "likely", "probably", "appears to"), explicit confidenceconfidence < 1.0, inferred_from present
Observationsynthesis language ("based on X and Y", "in summary"), multiple inputsderived_from has multiple refs

The default classifier is heuristic — production should swap in an LLM classifier with a typed-output schema at this seam.

Rationalizations

Agent rationalizationDocumented rebuttal
"All facts are facts — networks are overengineering."Then when the user asks "how do you know," the agent cannot distinguish "the API returned 503" (World, evidence) from "I believe the database was overloaded" (Opinion, inference). The trust calibration collapses.
"Just track a confidence score; networks are redundant."Confidence is a property of Opinion. World facts don't have confidence — they have provenance. Confidence-only loses the World/Experience/Opinion distinction.
"Observation can be folded into World."Observation is synthesized from World; it inherits the synthesis-step's failure modes. If you fold it into World, your "World" silently includes summarizations that may contradict raw evidence. The chapter's worked example: Sarah's role is World; "Sarah is the most reliable on-call" is Observation.
"I'll skip Experience because the agent always logs its actions."Logging is not classification. Experience is the network that answers "what did I do" vs "what happened in the world." If your logs are merged into World, you've conflated agent-action with external-event.

Red Flags

  • Opinion network is empty. Either the agent never reasons (unusual) or opinions are being misclassified as World (more likely; check hedging-language detection).
  • Experience network has no timestamps. Replay / forensic reconstruction is broken — fix at lib boundary.
  • Observation network references nothing. The provenance chain is broken; observations should reference the World/Experience facts they synthesize from.
  • World network has confidence < 1.0 entries. World is supposed to be evidence; if it has confidence, it's Opinion misclassified.

Non-Negotiable Verification

  1. Run the benchmark battery. python cli.py benchmark must report:
    • all 4 networks distinguishable from typical training-data examples
    • classify_batch produces deterministic output
    • justify returns a non-empty provenance chain for Opinion/Observation
  2. Verify CLI help. Exits 0, prints SKILL.md description.

Security Posture

  • Prompt injection. Fact text is untrusted input classified against fixed signals - never executed. The attack shape is epistemic masquerade: adversarial phrasing that dresses an opinion as an objective World fact so downstream agents over-trust it. The provenance chain from justify is the cross-check; use it.
  • Data exfiltration. No network calls, no file writes. Facts and their provenance chains may reference sensitive sources; they surface only in the stdout report the caller owns.
  • Privilege escalation. No shell invocation, no eval, no dynamic import. Network labels are trust metadata: silently promoting Opinion/Observation to World is the escalation to guard against - the label is advisory and grants no evidentiary standing by itself.

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly, by Anthony Alcaraz and Sam Julien) Ch4 — Epistemic Classification subsection. Primary research: HINDSIGHT (Latimer et al., 2025).

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Hindsight Epistemic Classifier AI skill do?

Classify facts into HINDSIGHT's 4 epistemic networks (Latimer et al. 2025, cited in Ch4): World (objective external facts), Experience (agent's own first-person actions), Opinion (subjective beliefs with confidence), and Observation (synthesized entity summaries). The separation enables traceability — when users ask "how do you know that", the agent can distinguish evidence from inference from summary. Use when memory must support "how do you know" questions and the agent will be asked to justify its outputs. NOT for one-shot agents (no need to justify), NOT for storage-only systems (the cl...

Why use Hindsight Epistemic Classifier on TypingMind?

Because you install it once and use it with any model. Hindsight Epistemic Classifier is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hindsight Epistemic Classifier in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/memory/hindsight-epistemic-classifier. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Hindsight Epistemic Classifier?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hindsight Epistemic Classifier?

As many as you like. As long as a model supports skills, you can use Hindsight Epistemic Classifier with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hindsight Epistemic Classifier AI skill free?

Yes. It is published on GitHub by AnthonyAlcaraz under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇