Skip to content

Releases: vignesh-nagarajan-vn/Quarry-LDR

v1.0.1

Choose a tag to compare

@vignesh-nagarajan-vn vignesh-nagarajan-vn released this 12 Aug 23:48

A maintenance release on top of v1.0.0: four bug fixes from a full-repo audit, with no change to how a healthy run behaves. Everything is backwards-compatible; the engine tiers, the cost ledger, and the VERIFY gate are untouched.

Fixes

  • Resumed reports no longer misattribute citations (#3, #7). A run resumed after SYNTHESIZE rebuilt its citation numbering from the full evidence set rather than the corpus-budget subset synthesis actually numbered, so once the budget trimmed anything the resumed report's [n] markers could resolve to the wrong sources. Resume now rebuilds from the same selected subset; a regression test crashes mid-VERIFY under a trimming budget and asserts the resumed references match an uninterrupted run exactly.
  • Setup gaps fail fast with remediation instead of a traceback (#1, #6). quarry research and resume now run the same preflight quarry verify does and stop with the exact fix when a local model, Docker, or an API key for the paid engines is missing, instead of crashing several frames deep in the arbiter. Bootstrap also falls back to a WMI adapter check when nvidia-smi is not on PATH, so a real NVIDIA card is reported honestly rather than silently routed to a CPU-only sync.
  • Preflight resolves the bundled config from the repo, not the cwd (#4, #10). The SearXNG config checks looked for docker/compose.yaml relative to the current directory, so the installed quarry run from anywhere but the repo root falsely reported the config missing and refused to start. It now anchors on the same location the quarry searxng launcher uses.
  • Docker is optional when SearXNG is remote (#5, #9). Preflight treated a missing Docker binary as a blocking failure even when search.searxng_url pointed at an already-running instance. The Docker check is now a skip, not a failure, for a non-local SearXNG URL.
  • Documentation was updated to match: the CLAUDE.md module map, Troubleshooting, and the Run Guide (#11).

License: MIT.

v1.0.0

Choose a tag to compare

@vignesh-nagarajan-vn vignesh-nagarajan-vn released this 06 Aug 04:58

Quarry-LDR turns a research topic into a cited report, now as markdown plus a branded PDF. The design still rests on one idea: the local GPU compresses roughly 750K tokens of raw scraped web text into roughly 60K tokens of deduplicated, reranked evidence. What changed in v1 is who reasons over it: by default the GPU is also the brain. Qwen3-8B plans the research and writes every section, Qwen3-4B triages evidence and audits coverage, and a cross-encoder verifies every cited sentence against its cited chunks before render. A default run makes zero API calls and needs no API key.

Engine What happens Cost per report
Naive (no Quarry) ~750K raw tokens through Opus $10 to $15
premium local GPU compresses; Claude plans, audits, writes $1.36 to $2.88, measured
assisted local plan and draft; Haiku 4.5 gap audits and one polish pass $0.02 to $0.12, measured
local (default) everything runs on your GPU $0.00, enforced by the ledger

The measured numbers come from live validation runs on one laptop card, an NVIDIA RTX 5060 Mobile with 8 GB of VRAM, where the 8B writer generates at 35.3 tokens per second. Four unedited sample reports covering all three engine tiers ship in pdf-reports/ with the numbers behind each, from the $0.00 local run to the $2.55 Claude-written premium report.

Highlights

  • Fifteen checkpointed stages from plan to render, now including VERIFY: every cited sentence is scored against its cited chunks by the cross-encoder, and what the evidence does not support is rewritten on the 4B model or dropped. Validated live in both directions, including organic drops at the production floor.
  • The $0.00 default is enforced, not asserted: local calls are metered into the same cost ledger as API calls, with real token counts from llama-server's usage block at zero price.
  • Three engine tiers behind one config key (engine.mode), sharing one pipeline, one ledger, and one verification gate. The premium path keeps v0's prompt-cached corpus economics, re-confirmed under v1 at $2.55 with one 60K-token cache write and nine reads.
  • The local models run as Q4_K_M GGUF quantizations via llama.cpp (the 8B writer at 16K context with flash attention and a q8_0 KV cache); the bge-m3 embedder and bge-reranker-v2-m3 cross-encoder run at fp16. Four models share one 8 GB card under a VRAM arbiter with a hard 6.5 GB budget.
  • Reports ship as markdown plus a branded Typst PDF: cover page, contents, run charts (compression funnel, source mix, coverage, claim verification), references resolving to URL plus chunk offsets, and a run-facts appendix. The PDF path is fail-soft; the markdown never depends on it.
  • The assisted polish is guarded: if Haiku's polish changes the citation-marker multiset, the polish is discarded and the local draft stands. Both branches proven live.
  • An interrupted run resumes from its last completed stage; SearXNG metasearch and a polite fetcher (robots.txt respected, rate limited, cached); Windows, Linux, and WSL2 all work.

Getting Started

An NVIDIA GPU (8 GB VRAM or more) and Docker for SearXNG are required. An Anthropic API key is needed only for the assisted and premium engines; the default engine runs without one.

git clone https://github.com/vignesh-nagarajan-vn/Quarry-LDR
cd Quarry-LDR
make bootstrap                # fresh Windows without GNU make: powershell -ExecutionPolicy Bypass -File scripts/bootstrap.ps1
make searxng                  # starts local search in Docker
uv run python scripts/download_models.py   # fetches llama-server and both GGUFs
uv run quarry verify          # preflight check with remediation hints
uv run quarry research "your topic"

The report and its PDF land in data/reports/ with a cost ledger and a run manifest. make smoke-local runs a $0 end-to-end rehearsal if you want proof before a real topic. To buy Claude reasoning instead, add ANTHROPIC_API_KEY to .env and pass --engine assisted or --engine premium. Every flag, engine, config knob, and operational caution: the Run Guide.

From the Beta

v0.9.0-beta was the hybrid architecture: the GPU compressed, Claude reasoned, every run cost dollars. v1.0.0 keeps that behavior intact as the premium engine and makes it optional. New since the beta: the engine tiers, the local Qwen3 writer with per-section synthesis, the VERIFY entailment gate in every mode, the branded PDF with run charts, request-timeout and schema hardening from live validation, and a documentation set that includes a full run guide. The hybrid remains preserved on archive/v0-hybrid-api and under its own tag.

Documentation

  • Run Guide: setup, all three engines with commands and measured costs, configuration, resume, rehearsals.
  • Architecture: pipeline diagram, engine routing, VRAM arbiter rules, full configuration reference.
  • Sample Reports: four real pipeline outputs across all three engines, $0.00 to $2.55.
  • First Test: the v0 validation record; cost anatomy and the $2.88 premium example report.
  • Troubleshooting: symptoms, causes, exact fixes.

Known Limitations

  • NVIDIA CUDA only; developed and tested on 8 GB cards (RTX 5060 Mobile, desktop RTX 4060). More VRAM is fine, smaller cards are untested.
  • Local-engine prose is an 8B model's: verified and cited, but flatter than Claude's. The quality ceiling is a config swap away; that is the point of the engine tiers.
  • Upstream search engines throttle IPs that burst many queries in a short window. The fetch cache and checkpointed resume soften it; the Run Guide documents probing and pacing. The premium sample ran during such a window and stands on fewer sources than premium normally gathers; it says so in its own prose.

License: MIT.

v0.9.0-beta

v0.9.0-beta Pre-release
Pre-release

Choose a tag to compare

@vignesh-nagarajan-vn vignesh-nagarajan-vn released this 05 Aug 04:01

Quarry-LDR turns a research topic into a cited markdown report. The design rests on one idea: the local GPU is a compression layer, not a brain. It squeezes roughly 750K tokens of raw scraped web text into roughly 60K tokens of deduplicated, reranked evidence, and Claude is called only on that dense payload for planning, gap analysis, and synthesis.

Approach Cost per report
All API (~750K raw tokens through Opus) $10 to $15
Quarry-LDR hybrid (~60K compressed tokens to the API) $1.36 to $2.88, measured

The measured numbers come from live validation runs on one laptop card, an NVIDIA RTX 5060 Mobile with 8 GB of VRAM. First Run Report breaks down where every cent went.

Highlights

  • Fourteen checkpointed stages from plan to render; an interrupted run resumes from its last completed stage instead of restarting.
  • Every claim in a report carries a citation that resolves to a source URL and chunk offsets.
  • Three GPU models (embedder, reranker, llama.cpp triage) share one 8 GB card under a VRAM arbiter with a hard 6.5 GB budget.
  • API spend lands in a cost ledger computed from the API's own usage blocks, never estimated from text length. Prompt caching keeps the synthesis corpus warm across the research loop.
  • SearXNG metasearch and a polite fetcher: robots.txt respected, rate limited, cached.
  • Windows, Linux, and WSL2 all work.

Getting Started

An NVIDIA GPU (8 GB VRAM or more), Docker for SearXNG, and an Anthropic API key are required; make bootstrap installs uv and the dependencies.

git clone https://github.com/vignesh-nagarajan-vn/Quarry-LDR
cd Quarry-LDR
make bootstrap                # fresh Windows without GNU make: powershell -ExecutionPolicy Bypass -File scripts/bootstrap.ps1
cp .env.example .env          # paste your ANTHROPIC_API_KEY
make searxng                  # starts local search in Docker
uv run python scripts/download_models.py   # fetches llama-server and the triage GGUF
uv run quarry verify          # preflight check with remediation hints
uv run quarry research "your topic"

Reports land in data/reports/ with a cost ledger and a run manifest. make smoke runs a capped end-to-end rehearsal with a $2.00 ceiling if you want proof before spending on a real topic.

Beta Status and Roadmap

This prerelease is the complete hybrid architecture, validated end to end; it is marked beta because the next major version changes the architecture, not because this one is unfinished. Work on main now targets v1.0.0: a local-first rebuild that moves planning, gap analysis, and synthesis onto local models, makes API calls optional, and adds a branded PDF alongside the markdown report. The hybrid version in this release is preserved on the archive/v0-hybrid-api branch and under this tag, and it remains the right choice when you want Claude writing the report.

Documentation

  • Architecture: pipeline diagram, VRAM arbiter rules, full configuration reference.
  • First Run Report: the live validation story, measured costs, and the bugs only production could find.
  • Example Report: a real report produced during validation for $2.88 of API spend, verbatim except punctuation.
  • Troubleshooting: symptoms, causes, exact fixes.

Known Limitations

  • An Anthropic API key and live spend are required; this version has no offline mode. Planning and synthesis default to Opus, gap checks to Sonnet.
  • NVIDIA CUDA only.
  • Developed and tested on 8 GB cards (RTX 5060 Mobile, desktop RTX 4060). More VRAM is fine; smaller cards are untested.

License: MIT.