Local LLM pipeline / independent project

LLM Local PDF

A local Python pipeline that turns sensitive Argentine legal PDFs into structured, reviewable JSON without uploading documents to a SaaS model.

Illustration of redacted documents next to a small local computer with a JSON brace above them
IllustrationAI-generated illustration of the local, reviewable extraction workflow.

At a glance

Period
2026
Role
Python extraction prototype development
Team
Independent engineering project
Users
People reviewing sensitive Argentine legal documents
Status
Working offline pipeline; public source; automated test sources
  • ModelQwen2.5-7B
  • Runtimellama.cpp + GGUF
  • EvaluationField-level golden set
  • Testsautomated test sources

My part

Built extraction, local Qwen2.5-7B inference through llama.cpp, structured JSON generation, schema validation, repair, source anchoring, retries, evaluation, and tamper-evident audit logs.

Tradeoff

Keep documents and inference local while turning probabilistic model output into a structured proposal that can be measured, repaired, and reviewed.

Evidence

Public repository, documented local deployment, and automated test sources. The case makes no production-adoption or accuracy claim beyond the implemented evaluation workflow.

Related work · OficIA

A review shell for sensitive PDFs

OficIA is a separate product from this prototype. I designed and built its review interface: work queue, source and instructions, evidence per field and human approval.

Review shell: my work · Extraction pipeline: owned separately

Illustrative reconstruction with synthetic data, not connected to the real product. These are not original OficIA screens.

Review queueSynthetic notice · DEMO-03Waiting for review

Source text

Synthetic notice. The requested party has 10 business days to submit the requested documents.

The highlighted text is the evidence for the proposed value.

Deadline

10 business days

Proposed · check it against the source

Approval stays locked until a person confirms the field.

Confirm the field before approving.

01

Local inference is a product boundary

The pipeline extracts text and runs Qwen2.5-7B through llama.cpp on the local machine. Documents and inference do not leave the environment for a hosted model.

02

Model output must become a valid proposal

The LLM produces structured JSON, but the workflow does not trust the first response. JSON repair, schema validation, field-level source anchoring, and bounded retries either produce a reviewable result or an explicit failure.

03

Evaluation sources

The public repository includes a golden evaluation script, schema validation, source anchoring, review reports, and tests. These sources make the prototype available for inspection; no measured accuracy or production-adoption result is claimed here.

04

Reviewability over autonomy

The output is a proposal for human review, not a legal decision or automatic external action. Tamper-evident audit logs preserve what ran and how the result changed.

05

Related work: OficIA

OficIA is a separate product for reviewing sensitive PDFs. I designed and implemented its review shell: the work queue, the source and instruction workbench, field-level evidence, and human approval before publication. Its core extraction pipeline is owned separately.