Find a file
russell@unturf.com 0192255f7d
three relevance signals: title + TF-IDF cores + body density
The "permacomputer" query fell into title-relevance's empty-fallback
because "permacomputer" appears nowhere in any title. Fallback was
top-1 by raw BM25, getting one tangential source. Same problem for
any user-coined term: title-LIKE alone can't find it.

_filter_by_title_relevance now grows three accept paths:

1. Title-token overlap (existing).
2. TF-IDF core keyword overlap. A doc's distinctive low-frequency
   terms get distilled into its tfidf-keywords-v1 core. A query for a
   rare term ("permacomputer", "unturf") hits docs whose core lists
   it as a keyword even when no title does.
3. Body density. Docs that mention a query token >= 3 times pass
   regardless of title or core. Cheap proxy for "actually about it."

Empty-all-three fallback widens from top-1 to top-N (default 5) — the
LLM gets enough context to honestly say "I don't know" rather than
fabricating from a single tangential source.

Implementation:
- _docs_with_core_keyword_match: SQL join chunks -> documents -> derivations
  finds source docs whose TF-IDF core content matches a token. Folded
  into the per-shard search loop alongside FTS5 + title-LIKE.
- _body_density_passes: counts case-insensitive occurrences in
  concatenated chunk content. Threshold 3.
- _search_corpus stashes core_match_roots + root_to_shard on the
  returned hits list as side-channel info for _rerank.

Makefile: distill-shards-tfidf-parallel for the per-shard TF-IDF run.

Demo on the live cluster (after TF-IDF distill of 95k cur surface docs):

  Q "tell me about permacomputer ?"
    sources: MOAD Cheat Sheet + Unturf AI Infrastructure Expansion
    answer: synthesized from both, bounds coverage honestly

  Q "what is unturf about ?"
    sources: Unturf Trademark + Unturf AI Infrastructure Expansion
    answer: "grassroots, community-driven initiative ... ethical AI
             hardware, software, and networks"

Both queries now find user-coined terms via TF-IDF cores even though
the terms never appear in any title.

79 tests passing.
2026-04-27 13:39:29 -04:00
aborist three relevance signals: title + TF-IDF cores + body density 2026-04-27 13:39:29 -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 three relevance signals: title + TF-IDF cores + body density 2026-04-27 13:39:29 -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.