Find a file
russell@unturf.com 641a4c8bde
add per-phase timings to query/ask output
Cache speedup was previously only visible by running 'time' externally.
Now every query/ask result includes a timings dict so the breakdown
shows up in the JSON itself:

  search_ms        FTS5 + title-LIKE across shards
  context_ms       load doc text into context window
  cache_lookup_ms  primary-key hit on providence_cache
  llm_ms           Hermes-3 round-trip (null on cache hit)
  persist_ms       insert record + chain audit event (null on cache hit)
  total_ms         end-to-end wall

Demo against the live shard cluster:

  Q "What is photosynthesis?" (cache miss):
    search 84.5  context 0.9  cache 0.1  llm 3983.3  persist 36.4
    total 4106.1 ms

  Q "What is photosynthesis?" (cache hit, same key):
    search 78.5  context 0.9  cache 0.1
    llm null     persist null
    total 85.7 ms      → 48x speedup

The cache lookup itself is 0.1 ms (PK on cache_key). The 85 ms hit
baseline is the cost of re-computing the 8-dim cache_key — context_root
depends on retrieval results, so search runs even on hits. A secondary
question-only cache could collapse this if needed, but the v9.8
admissibility model wants context_root in the key.

Same shape for ask (per-doc Q&A).

66 tests still passing.
2026-04-27 12:36:30 -04:00
aborist add per-phase timings to query/ask output 2026-04-27 12:36:30 -04:00
bench progress reporter + structured benchmark 2026-04-27 11:37:20 -04:00
tests concept overlay: synonym expansion + rivalry exclusion 2026-04-27 12:34:00 -04:00
.gitignore phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00
CLAUDE.md update CLAUDE.md: real orientation for the working repo 2026-04-27 10:41:20 -04:00
LICENSE phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00
Makefile make query Q="..." — canonical CLI for corpus Q&A 2026-04-27 11:46:45 -04:00
pyproject.toml add Q&A layer: v9.8 providence_cache writes with Merkle-bound proofs 2026-04-27 08:01:23 -04:00
README.md phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00

aborist

An arborist for trees and forests of cross-linked information.

Aborist ingests documents into a content-addressed, Merkle-committed store. Every document carries a URI for backtrack and cross-link. Search hooks return hits with declared audit modes (STRICT / HYBRID / VISUAL) so callers never overclaim what a result actually proves.

Design

Aborist implements the runtime spec from Merkle-AGI v9.8 / Merkle Providence Reverse RAG. The 8-dim admissibility key (source_root, question_hash, model_profile_hash, conversation_hash, governance_policy_hash, schema_version, canonicalization_version, chunking_version) plus falsification state ensures cached records are never reused under drift.

Two layered document kinds:

  • surface — diverse ingested content (full chunks, FTS-indexed)
  • core — distilled records (haiku/equation/snippet) Merkle-signed back to source surface roots via derivations

Reversible eviction via chunk tier ∈ {hot, warm, cold}. Cold = leaf hash

  • URI only; rehydratable from URI, identity verifiable via leaf hash.

Quick start

make all            # bootstrap + fetch + ingest + verify + stats
make search Q='…'

License

AGPL-3.0-only.