Skip to case studies

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.

GHAnalytics is my personal portfolio and product lab. It is not an agency, and I do not take client work alongside a full-time role.

VotoVisible

RAG with source traceability on pgvector

votovisible.cl (opens in a new tab)
Problem
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.

  1. 0:00–0:15A billFind a bill and see its progress and roll calls.
  2. 0:15–0:40RAG queryThe assistant answers with verified citations by vote, committee and document.
  3. 0:40–0:55Open the sourceEach citation links directly to the official record on camara.cl or senado.cl.

Architecture

01codeIngestionshifting portalsunstructured PDFserror & drift checksPython · Poppler02modelProcessingand OCRdocument chunkinglocal embeddingsSHA-256 cachelocal embeddings03modelLocal orAPI LLMtool-calling RAGsummary auditoromission checksAI SDK · Gateway04codeDeterministicvalidationchecks each citationstrips loopsofficial URLs onlyallowlist + IDs05dataPostgresSupabasepgvectormaterialized FTScache & rate limitSupabase · Redis06codeUI andobservabilityNext.js 16 appzero-PII chat logsemail digestsSentry · PostHogunverified citation → stripped before rendervote-affinity model (offline): no-go01Ingestioncodeshifting portalsunstructured PDFserror & drift checksPython · Poppler02Processingand OCRmodeldocument chunkinglocal embeddingsSHA-256 cachelocal embeddings↳ vote-affinity model(offline): no-go03Local orAPI LLMmodeltool-calling RAGsummary auditoromission checksAI SDK · Gatewaydeterministic boundary04Deterministicvalidationcodechecks each citationstrips loopsofficial URLs onlyallowlist + IDs↳ unverified citation →stripped before render05PostgresSupabasedatapgvectormaterialized FTScache & rate limitSupabase · Redis06UI andobservabilitycodeNext.js 16 appzero-PII chat logsemail digestsSentry · PostHog
Every citation has a deterministic ID; code strips any that don’t exist and blocks links outside the Chamber or Senate.

Three engineering decisions

  1. 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.

  2. 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.

  3. 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.

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.

  1. 0:00–0:15A synthetic caseIt arrives from the PJUD scraper and is keyed by its canonical case ID.
  2. 0:15–0:40OCR and draftLocal OCR, filing classification and a template-locked draft.
  3. 0:40–0:55Approval and callA lawyer approves the draft; the CRM places a call with live status.

Architecture

01codeIngestionPJUD scrapinghard stop on blockresumable runsPlaywright · feeds02modelProcessingand OCRSHA-256 dedupeonce per case keyprivate SSH tunnelOCR · local server03modelLocal orAPI LLMclassifies filingsper-case embeddingslocked templatesLLM · local server04codeDeterministicvalidationdual DPD modelChile timezonebatches under 8 sfail-closed05dataPostgresSupabasemulti-schema, RLSWorkspace SSOaudit ledgersSupabase Postgres06codeUI andobservabilityNext.js 16 CRM~25 daily usersintegrated voiceTwilio · Sentrylegal filing → mandatory human approvalunapproved host → task stops01IngestioncodePJUD scrapinghard stop on blockresumable runsPlaywright · feeds02Processingand OCRmodelSHA-256 dedupeonce per case keyprivate SSH tunnelOCR · local server03Local orAPI LLMmodelclassifies filingsper-case embeddingslocked templatesLLM · local server↳ unapproved host → taskstopsdeterministic boundary04Deterministicvalidationcodedual DPD modelChile timezonebatches under 8 sfail-closed↳ legal filing → mandatoryhuman approval05PostgresSupabasedatamulti-schema, RLSWorkspace SSOaudit ledgersSupabase Postgres06UI andobservabilitycodeNext.js 16 CRM~25 daily usersintegrated voiceTwilio · Sentry
Anonymized schematic: OCR and models run on owned hardware, and no legal data leaves for an unapproved host.

Three engineering decisions

  1. 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.

  2. 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.

  3. 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.

BuscaTuRemate

Multi-source scraping, LLM extraction and deduplication

buscaturemate.cl (opens in a new tab)
Problem
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.

  1. 0:00–0:15SearchA property by district, filtered by type and auction source.
  2. 0:15–0:40One auction, one listingAn ad printed in two newspapers appears once, with both sources.
  3. 0:40–0:55AlertCreate an alert for the next matching auctions.

Architecture

01codeIngestionpress and bulletinauctioneer portalspaced with jitterlocal server · cron02codeProcessingand OCRlocal pre-routerby asset typepicks the schemaJSON schema v103modelLocal orAPI LLM3 local workersin parallelAPI fallbacklocal server · API04codeDeterministicvalidationplate + local datecourt + case IDaddress similaritydedupe · SHA-25605dataPostgresSupabaseserial writestransactional splitwith pre-snapshotSupabase Postgres06codeUI andobservabilitysearch and filtersalertsquality digestsSentry · PostHogHTTP 403 block → clean halt, resumes by cursor01Ingestioncodepress and bulletinauctioneer portalspaced with jitterlocal server · cron↳ HTTP 403 block → cleanhalt, resumes by cursor02Processingand OCRcodelocal pre-routerby asset typepicks the schemaJSON schema v103Local orAPI LLMmodel3 local workersin parallelAPI fallbacklocal server · APIdeterministic boundary04Deterministicvalidationcodeplate + local datecourt + case IDaddress similaritydedupe · SHA-25605PostgresSupabasedataserial writestransactional splitwith pre-snapshotSupabase Postgres06UI andobservabilitycodesearch and filtersalertsquality digestsSentry · PostHog
Three workers extract in parallel, but the database takes one write at a time, so deduplication never races itself.

Three engineering decisions

  1. 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.

  2. 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.

  3. 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.

InsolvIA

Document intelligence, deterministic reconciliation and evals

insolvia.cl (opens in a new tab)
Problem
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.

  1. 0:00–0:15The filingA bulletin agreement: scanned PDF and its creditor table.
  2. 0:15–0:40Extraction and reconciliationRows, verified tax IDs and amount sums checked against the declared total.
  3. 0:40–0:55QA queueA flagged mismatch in human review and its fix, leaving the original intact.

Architecture

deterministic table parser: 16% without LLM01codeIngestionheadless ingestioncached sessionPlaywright fallbackPDF cache · SHA-25602modelProcessingand OCRlayout extractiontable geometryOCR as fallbackOCR local03modelLocal orAPI LLM3 local lanesserial auditormodel for edge caseslocal server · LLM04codeDeterministicvalidationparses literalsreconciles totalsvalidates tax IDsreconciliation05dataPostgresSupabaseRLS, private bucketimmutable payloadseparate fixesSupabase Postgres06codeUI andobservabilityNext.js 16 portalhuman QA queueSentry · PostHogmismatch or partial read → human review01Ingestioncodeheadless ingestioncached sessionPlaywright fallbackPDF cache · SHA-25602Processingand OCRmodellayout extractiontable geometryOCR as fallbackOCR local↷ skips to 04:deterministic tableparser: 16% without LLM03Local orAPI LLMmodel3 local lanesserial auditormodel for edge caseslocal server · LLMdeterministic boundary04Deterministicvalidationcodeparses literalsreconciles totalsvalidates tax IDsreconciliation↳ mismatch or partial read→ human review05PostgresSupabasedataRLS, private bucketimmutable payloadseparate fixesSupabase Postgres06UI andobservabilitycodeNext.js 16 portalhuman QA queueSentry · PostHog
Models never output tax IDs, amounts or totals: code reads them from the document and reconciles every table.

Three engineering decisions

  1. 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.

  2. 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.

  3. 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.

Other products in production