Project status

Personal project · Experimental prototype · Not currently available for download

Papyrus separates document handling into stages so a researcher can see what kind of mechanism is used and what record it produces. Technical names identify the intended architecture; runtime behavior and tests still need further confirmation.

Three kinds of processing

ApproachSuitable workWhat it does not establish
Conventional codeParsing, segmentation, identifiers, database writes, pattern matching, formatting, and cache checks.Deterministic code can still misparse, omit, or connect information incorrectly.
Small task-specific modelsEmbeddings, reranking, classification, transcription, and narrow predictions.A narrow scope does not make a prediction correct or unbiased.
Generative modelsSelected synthesis, comparison, or relationship judgments.Fluent output is not evidence and can introduce unsupported interpretation.

What happens when a source is added

  1. Register and parseRecord the source, extract available text or a transcript, and divide it into blocks, sections, and addressable passages.
  2. Extract selected recordsConfigured stages look for names, dates, citations, tables, or candidate claims. These are classifications and associations, not verified facts.
  3. Prepare retrievalText can enter a full-text index and an embeddings-based vector index for lexical and meaning-based search.
  4. Reuse eligible workA cache can compare content, configuration, and model identity. Reuse avoids repetition; it does not prove correctness.
Illustrative example—not an executed demonstration
StageExample recordReason to review it
Parsed passageA paragraph about a proposed water rule receives a source identifier and location.Page order or extraction may be wrong.
Extracted record“Department of Natural Resources” is marked as an organization.Entity boundaries and aliases can be misclassified.
Retrieved resultA query about agency authority ranks that passage highly.Rank does not establish relevance or legal significance.
Assisted outputA comparison cites the passage and exposes assembled context.The model may overstate support or miss conflicting material.

Where it all gets stored

The intended design uses SQLite for structured project records and a local vector index for embeddings. A record carries an artifact identifier, type, source provenance, and payload. Provenance records origin; it does not certify truth.

Artifact browser showing records and provenance.
Figure 1. Artifacts extracted from a source and its associated metadata

Finding the right passage

  1. PlanIdentify query type, names, dates, filters, or structured constraints.
  2. RetrieveRun lexical, embedding, entity-aware, or structured lookup as appropriate.
  3. Fuse and rerankReciprocal rank fusion combines ranked lists; an optional reranker reconsiders a smaller candidate set.
  4. Assemble contextPack selected records and exact passages within a configured budget, retaining source identifiers.

Fusion and reranking can still promote an irrelevant passage, but increases the quality of retrieved results significantly. These steps help determine the final context package the LLM receives when answering a query.

Which model does what

Embeddings model
Turns passages and queries into vectors for similarity search; similarity is not a factual judgment.
Reranker
Scores a small query–passage set after retrieval; it changes order rather than supplying evidence.
Classifier
Classifies sentences and words by type, like recognizing "John Smith" as a person.
Generative model
Produces selected synthesis from assembled context. Runs using ollama or llama cpp backend.

Current limitations