Fernando García-Huidobro Hechetle— Applied AI Engineer & Product/Operations Leader.
For 7+ years I have built production AI pipelines, data platforms and software in Python, TypeScript, Next.js and Postgres/pgvector, running local-server inference alongside hosted APIs. I lead technology and operations for a team of about 25 people.
Congress activity lives across portals that change without notice and unstructured PDFs and transcripts — bills, roll calls and committees. An assistant that invents a citation is useless.
Outcome
About 2,550 visits a month over 4,000+ bills and 2.5M+ individual votes; every citation the assistant makes is verified in code before rendering.
visits a month
~2,550
individual votes indexed
2.5M+
roll-call events
22,800+
Product walkthrough · 0:55
Video in production. This is the script.
0:00–0:15A billFind a bill and see its progress and roll calls.
0:15–0:40RAG queryThe assistant answers with verified citations by vote, committee and document.
0:40–0:55Open the sourceEach citation links directly to the official record on camara.cl or senado.cl.
Architecture
Architecture: VotoVisible01 Ingestion (code): shifting portals, unstructured PDFs, error & drift checks; Python · Poppler. 02 Processing and OCR (model): document chunking, local embeddings, SHA-256 cache; local embeddings. 03 Local or API LLM (model): tool-calling RAG, summary auditor, omission checks; AI SDK · Gateway. 04 Deterministic validation (code): checks each citation, strips loops, official URLs only; allowlist + IDs. 05 Postgres Supabase (data): pgvector, materialized FTS, cache & rate limit; Supabase · Redis. 06 UI and observability (code): Next.js 16 app, zero-PII chat logs, email digests; Sentry · PostHog. 02: vote-affinity model (offline): no-go. 04: unverified citation → stripped before render.Every citation has a deterministic ID; code strips any that don’t exist and blocks links outside the Chamber or Senate.Deterministic codeLocal or API modelData: Postgres, pgvector, RedisDeterministic boundary: no model output is stored before code checks itFail-closed exit: the flow halts or discards
Three engineering decisions
Citations verified in code
Each tool registers its sources with a deterministic ID, and a code validator checks every citation before saving or rendering. Unverified references and repetition loops are stripped; only official camara.cl and senado.cl URLs pass.
A benchmark that said no
I evaluated vote-affinity embeddings on 185,000+ historical first votes (2014–2026) using a strict chronological split. Gains failed bootstrap significance, so I kept it out of production.
Resilient ingestion over unstructured sources
Processes transcripts, PDFs and HTML from portals that shift layouts or fail without notice. The pipeline checks coverage, isolates parsing errors with traceability and audits each AI summary against the source text.
02
Cobgestión
Production CRM and judicial pipeline, anonymized case
Anonymized production case · no public link
Problem
A judicial and extrajudicial collections operation of about 25 people handles 5,500+ active accounts a month across court cases, filings and calls.
Outcome
An in-house CRM and pipeline let the team absorb more portfolio without proportional headcount, and cut technology spend by 20–25%.
technology spend
−20–25%
daily CRM users
~25
active accounts a month
5,500+
Product walkthrough · 0:55
Video in production. This is the script.
Anonymized architecture walkthrough on synthetic data. No real debtor or client data is shown.
0:00–0:15A synthetic caseIt arrives from the PJUD scraper and is keyed by its canonical case ID.
0:15–0:40OCR and draftLocal OCR, filing classification and a template-locked draft.
0:40–0:55Approval and callA lawyer approves the draft; the CRM places a call with live status.
Architecture
Architecture: Cobgestión01 Ingestion (code): PJUD scraping, hard stop on block, resumable runs; Playwright · feeds. 02 Processing and OCR (model): SHA-256 dedupe, once per case key, private SSH tunnel; OCR · local server. 03 Local or API LLM (model): classifies filings, per-case embeddings, locked templates; LLM · local server. 04 Deterministic validation (code): dual DPD model, Chile timezone, batches under 8 s; fail-closed. 05 Postgres Supabase (data): multi-schema, RLS, Workspace SSO, audit ledgers; Supabase Postgres. 06 UI and observability (code): Next.js 16 CRM, ~25 daily users, integrated voice; Twilio · Sentry. 03: unapproved host → task stops. 04: legal filing → mandatory human approval.Anonymized schematic: OCR and models run on owned hardware, and no legal data leaves for an unapproved host.Deterministic codeLocal or API modelData: Postgres, pgvector, RedisDeterministic boundary: no model output is stored before code checks itFail-closed exit: the flow halts or discards
Three engineering decisions
OCR once per case
Every PDF is deduplicated by SHA-256 under its canonical court key (docket, year and court), avoiding redundant OCR runs on the local server.
Fail-closed legal data
The local model endpoint is verified before every call; if it points to an unapproved host, the job halts. Legal drafts use locked templates and require human sign-off.
Call states only move forward
Telephony webhooks follow a monotonic state hierarchy so a delayed event never reverts a finished call to “in progress”; recordings are processed on a separate callback.
03
BuscaTuRemate
Multi-source scraping, LLM extraction and deduplication
Chile’s judicial, insolvency and private auctions are published across newspapers, PDFs and auctioneer portals. The same asset shows up several times with different data.
Outcome
One search engine for real estate, vehicles and movable goods, with about 1,780 visits a month, where each auction appears once.
visits a month
~1,780
parallel local workers
3
address similarity to merge
≥ 0.9
Product walkthrough · 0:55
Video in production. This is the script.
0:00–0:15SearchA property by district, filtered by type and auction source.
0:15–0:40One auction, one listingAn ad printed in two newspapers appears once, with both sources.
0:40–0:55AlertCreate an alert for the next matching auctions.
Architecture
Architecture: BuscaTuRemate01 Ingestion (code): press and bulletin, auctioneer portals, paced with jitter; local server · cron. 02 Processing and OCR (code): local pre-router, by asset type, picks the schema; JSON schema v1. 03 Local or API LLM (model): 3 local workers, in parallel, API fallback; local server · API. 04 Deterministic validation (code): plate + local date, court + case ID, address similarity; dedupe · SHA-256. 05 Postgres Supabase (data): serial writes, transactional split, with pre-snapshot; Supabase Postgres. 06 UI and observability (code): search and filters, alerts, quality digests; Sentry · PostHog. 01: HTTP 403 block → clean halt, resumes by cursor.Three workers extract in parallel, but the database takes one write at a time, so deduplication never races itself.Deterministic codeLocal or API modelData: Postgres, pgvector, RedisDeterministic boundary: no model output is stored before code checks itFail-closed exit: the flow halts or discards
Three engineering decisions
Extract in parallel, write serially
Three workers on the local server extract concurrently; database writes run serially to prevent deduplication races. Slower to persist, zero concurrency duplicates.
Identity depends on the asset
Vehicles match on normalized plate and local date; real estate on court, docket and address similarity ≥ 0.9; republished ads by text hash. Colliding filings split transactionally with a pre-snapshot.
A scraper that knows when to stop
Uses jittered pacing and stateful backfill cursors. On an HTTP 403 block it halts cleanly, sends a quality alert and resumes from the cursor on the next run.
04
InsolvIA
Document intelligence, deterministic reconciliation and evals
Renegotiation agreements in Chile’s insolvency bulletin arrive as PDFs, often scanned, with dense creditor tables. One misread amount changes the outcome.
Outcome
On a held-out gold set of 30 agreements (361 rows, 3,000+ field checks) extraction passes 100% with zero critical errors, at a ~50 ms median.
eval gold-set pass rate (gate ≥ 99%)
100%
median deterministic extraction
~50 ms
of tables parsed with zero LLM calls
16%
Product walkthrough · 0:55
Video in production. This is the script.
0:00–0:15The filingA bulletin agreement: scanned PDF and its creditor table.
0:15–0:40Extraction and reconciliationRows, verified tax IDs and amount sums checked against the declared total.
0:40–0:55QA queueA flagged mismatch in human review and its fix, leaving the original intact.
Architecture
Architecture: InsolvIA01 Ingestion (code): headless ingestion, cached session, Playwright fallback; PDF cache · SHA-256. 02 Processing and OCR (model): layout extraction, table geometry, OCR as fallback; OCR local. 03 Local or API LLM (model): 3 local lanes, serial auditor, model for edge cases; local server · LLM. 04 Deterministic validation (code): parses literals, reconciles totals, validates tax IDs; reconciliation. 05 Postgres Supabase (data): RLS, private bucket, immutable payload, separate fixes; Supabase Postgres. 06 UI and observability (code): Next.js 16 portal, human QA queue; Sentry · PostHog. 02 skips to 04: deterministic table parser: 16% without LLM. 04: mismatch or partial read → human review.Models never output tax IDs, amounts or totals: code reads them from the document and reconciles every table.Deterministic codeLocal or API modelData: Postgres, pgvector, RedisDeterministic boundary: no model output is stored before code checks itFail-closed exit: the flow halts or discards
Three engineering decisions
Models don’t write numbers
Prompts forbid returning tax IDs, amounts, totals or bands. Code parses literals from the source, reconciles rows against declared totals and routes mismatches to human review without saving partial reads.
Deterministic parser before the LLM
A column-geometry parser resolves 16% of simple creditor tables without calling a model, matching production LLM extractions with 100% row agreement.
Audit only where there is doubt
A second model on a single serial lane audits only profiles with confidence ≤ 85, while a specialized model runs only on ambiguous clauses. Audit budget stays focused on hard cases.