two-tier-extraction

Route corpus items to utility, reasoning, or deep LLM tiers by content value during bulk extraction.

29.4k|4.4k|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/garrytan/gbrain --skill two-tier-extraction
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: two-tier-extraction
Source: https://github.com/garrytan/gbrain/tree/main/plugin/skills/two-tier-extraction
Command: npx skills add https://github.com/garrytan/gbrain --skill two-tier-extraction

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Processing large archives (email dumps, transcript libraries, document collections) forces a bad tradeoff: run a cheap model on everything and miss nuance on important content, or run an expensive model on everything and pay 10-50x more for mostly noise. This Skill routes each item to the right model tier so significant content gets deep analysis while noise is skipped.

Core Features & Use Cases

  • Deterministic privacy wall: Named-entity and sensitive-pattern matching strips or diverts private content before any LLM call, with ambiguous items failing closed to human review.
  • Triage and gate pipeline: A fast utility-tier classifier scores each item, then gate logic escalates high-value items to the deep tier, sends decent items to the reasoning tier, and skips noise.
  • Single-pass writes with checkpointing: Each extracted item is written immediately to the brain with backlinks and progress checkpoints every 25 items for crash resilience.
  • Use Case: You have a 16,000-item email archive. Triage classifies every item at utility-tier cost, the gate escalates roughly 30% for deep reads, and the run costs around $288 instead of $800 for deep-tier-on-everything.

Quick Start

Ask the agent to set up two-tier extraction on your document dump so a cheap model triages the noise and the best model deep-reads what matters.

Frequently Asked Questions about two-tier-extraction

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I process a large email archive with LLMs without overspending?

Use tiered extraction: a utility-tier model triages each item in about 2 seconds, a gate escalates high-value items to the deep tier, and noise is skipped. Donor-observed runs saved roughly 50-70% versus running the most expensive model on everything.

What is the triage then deep read pattern for bulk extraction?

Triage is a minimal classifier call that scores filing category, writing quality, and significance as JSON. The gate then routes items: deep tier for high-value content, reasoning tier for decent content, and skip for noise, followed by immediate brain writes.

How does the privacy wall work before sending content to an LLM?

A deterministic pass runs before any LLM call using exact-match private contact lists and fixed sensitive-pattern regexes for medical, legal, and credential content. Matches are stripped or diverted to local-only filing, and ambiguous items go to human review rather than a model.

When should I escalate content to the deep model tier?

Escalate when triage shows personal correspondence or original thinking, writing quality at 5 or above, emotional significance at 5 or above, or business significance at 7 or above. The hard rule is: when in doubt, escalate a tier, since missing important content costs more than an extra deep call.

What are the limitations of two-tier extraction?

The cost figures are donor-observed anchors, not benchmarks, so you must re-validate gate quality on your own corpus with the 10 to 100 to 500 progressive ramp. It also decides which model tier reads items, not which files are worth reading; pair it with archive-crawler for file selection.