Back to portfolio

Local document extraction / Python prototype

OficIA

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

Redacted legal documents beside a local mini computer and a structured review sheet
recreatedAI-generated editorial still life of the local, reviewable extraction workflow.
At a glance

What I owned

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
Contribution

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.

Model
Qwen2.5-7B
Runtime
llama.cpp + GGUF
Evaluation
Field-level golden set
Tests
automated test sources
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.