⚖️ Monitor XAI v1.0

Ph.D. Vicente Humberto Monteverde · Algoritmos contra la Corrupción

📘 Manual de Usuario / User Manual

📥 .docx ES 📥 .docx EN

1. ¿Qué es el Monitor XAI?

El Monitor XAI (eXplainable Artificial Intelligence) es una plataforma web de auditoría automatizada del gasto público argentino. Cruza tres fuentes oficiales — el Boletín Oficial de la República Argentina (BORA), el portal Comprar.gob.ar y la Tesorería General de la Nación (TGN) — y aplica una matriz de 7 escenarios desarrollada por el Ph.D. Vicente Humberto Monteverde para detectar patrones de transferencia regresiva de ingresos.

Importante: el sistema NO detecta delitos penales, no es un canal de denuncia y no analiza la corrupción de personas individuales.

Lo que SÍ hace: analiza decisiones discrecionales del Estado, detecta transferencias económicas regresivas y genera alertas tempranas basadas en evidencia, como herramienta de transparencia.

1.1 Las tres fuentes de datos

  • Boletín Oficial (BORA) — Sección 3ª: avisos de licitaciones y adjudicaciones.
  • Comprar.gob.ar — portal oficial de compras públicas, con el detalle de cada proceso.
  • Tesorería General de la Nación (TGN) — confirma si el proveedor efectivamente cobró.

Cuando un mismo contrato aparece en las tres fuentes, el sistema lo marca como "Flujo Completo": trazabilidad total desde la decisión hasta el cobro.

2. Fundamento teórico — Los 7 escenarios de la Matriz XAI

La Gran Corrupción no se limita a actos ilegales. Según la investigación del Dr. Monteverde (Journal of Financial Crime, 2020), la corrupción moderna se diversificó en fenómenos legales que producen las mismas consecuencias económicas.

EscenarioPeso XAIDirección de la transferencia
Privatización / Concesión9.0Estado → Privados
Obra Pública / Contratos8.0Estado → Empresas contratistas
Tarifas de Servicios Públicos7.0Usuarios → Concesionarias
Precios Regulados6.0Consumidores → Productores
Salarios y Paritarias5.0Asalariados → Empleadores
Jubilaciones / Pensiones10.0Jubilados → Estado
Traslado de Impuestos9.0Contribuyentes → Estado

Cada proceso recibe un Índice XAI de 0 a 10 según el escenario y el contexto del contrato. A mayor índice, mayor nivel de discrecionalidad detectado.

Monteverde, V. H. (2020). Great corruption – theory of corrupt phenomena. Journal of Financial Crime, Vol. 28 No. 2, pp. 580-595. doi.org/10.1108/JFC-04-2020-0062

3. Estructura de navegación

📊 Dashboard

Resumen ejecutivo con métricas y gráficos del último análisis.

🚀 Análisis en Vivo

Pantalla operativa para ejecutar el scraping y el análisis del día.

🏛️ Licitaciones

Flujo cruzado BORA → Comprar.gob.ar → TGN, con trazabilidad completa.

📖 Documentación

Marco teórico, guía de uso y referencia de la API.

4. Dashboard

Pantalla principal con el resumen ejecutivo del último análisis ejecutado.

4.1 Métricas principales

Cuatro tarjetas superiores: total de procesos analizados, alertas de alto riesgo, escenario más frecuente e índice XAI promedio.

4.2 Gráficos

  • Distribución por Tipo de Fenómeno — frecuencia de cada uno de los 7 escenarios.
  • Nivel de Riesgo — distribución proporcional por categoría de riesgo.
  • Detalle del Análisis Algorítmico — tabla expandible con índice XAI, escenario, organismo, proveedor y monto.

5. Análisis en Vivo

Sección operativa: ejecuta el scraper y aplica la Matriz XAI sobre los datos del día seleccionado.

5.2 Ciclo de Análisis Completo

  1. Conexión con Comprar.gob.ar
  2. Extracción de datos del día
  3. Cruce con BORA
  4. Consulta TGN (confirmación de cobro)
  5. Aplicación de la Matriz XAI
  6. Generación del reporte Excel
  7. Redireccionamiento a Dashboard y Licitaciones

6. Licitaciones — Flujo Cruzado BORA → Comprar → TGN

La pantalla más informativa para el seguimiento diario: combina las tres fuentes en una vista unificada.

6.2 Métricas del flujo

  • Total Publicaciones BORA — todos los avisos de la Sección 3ra del día.
  • Con CUIT Extraído — publicaciones con CUIT identificado.
  • Sin CUIT (pendientes) — requieren revisión manual.
  • Flujo Completo BORA→TGN — trazabilidad total: BORA + Comprar.gob.ar + cobro confirmado en TGN.

6.3 Tabla de adjudicaciones

Junto al CUIT de cada proveedor aparecen dos señales adicionales (ver Secciones 7 y 8):

  • ✓ / ⚠️ — validación de formato del CUIT (dígito verificador AFIP).
  • 🌍 ALERTA INTERNACIONAL — CUIT en la base de sanciones internacionales (MEACI).

7. Validación de formato de CUIT

Cada CUIT de proveedor se extrae automáticamente del texto de un aviso del Boletín Oficial (a veces un PDF escaneado), así que la extracción puede fallar. El sistema valida cada CUIT con el algoritmo real de dígito verificador módulo 11 de AFIP.

✓ SÍ confirma que el número tiene 11 dígitos y que el dígito verificador es matemáticamente correcto — es decir, que el CUIT está bien formado.

⚠️ NO consulta ningún padrón oficial: no confirma inscripción real en AFIP, ni devuelve razón social o estado. Eso requeriría el webservice oficial de AFIP (padrón A13) con certificado digital, no integrado aún.

Acceso programático (API)

GET /api/cuit/validar?cuit=30-12345678-1
GET /api/cuit/validar-lote?cuits=30-12345678-1,20-12345678-6   (máx. 200)

8. Cruce internacional de sanciones (MEACI)

Servicio independiente que cruza el CUIT del proveedor adjudicado contra bases de sanciones internacionales. Si hay coincidencia, la fila muestra 🌍 ALERTA INTERNACIONAL.

GET /api/cruce-cuit?cuit=30-12345678-1
GET /api/cruce-cuits-bulk?cuits=cuit1,cuit2,cuit3   (máx. 50)

9. Documentación e interpretación de resultados

9.1 Guía rápida

  1. Ir a Análisis en Vivo y pulsar 🚀 para ejecutar el scraping del día.
  2. En Dashboard, revisar métricas y gráficos.
  3. Ordenar por Índice XAI para priorizar los casos más críticos.

9.2 Interpretación del índice

El Índice XAI (0-10) mide el nivel de discrecionalidad detectado. Cuanto más alto, mayor la probabilidad de un fenómeno de transferencia regresiva (Sección 2).

10. API REST

API construida con FastAPI. Documentación interactiva (Swagger UI) en /docs.

EndpointDescripción
GET /api/statusEstado general del sistema
GET /api/licitaciones/datosDatos del último reporte
POST /api/licitaciones/ejecutarEjecuta el ciclo de análisis
GET /api/marco-teoricoDetalle de la Matriz XAI
GET /api/cuit/validarValida el formato de un CUIT
GET /api/cruce-cuitConsulta sanciones internacionales (MEACI)
GET /api/ia/statusIndica si la IA está configurada
GET /healthHealthcheck del servicio

11. Flujo de trabajo recomendado

  1. Todas las mañanas: ejecutar el ciclo del día en Análisis en Vivo.
  2. Revisar el Dashboard por nuevas alertas de alto riesgo.
  3. En Licitaciones, filtrar por "Sin CUIT" para revisión manual.
  4. Verificar los íconos ✓/⚠️ antes de dar por buena una adjudicación.
  5. Prestar atención a cualquier fila 🌍 ALERTA INTERNACIONAL.
  6. Ordenar por Índice XAI para priorizar los casos más críticos.

12. Aviso

Contacto: vhmonte@retina.ar / viny01958@gmail.com · Licencia MIT

1. What is Monitor XAI?

Monitor XAI (eXplainable Artificial Intelligence) is a web platform for automated auditing of Argentine public spending. It cross-references three official sources — the Official Gazette (BORA), the Comprar.gob.ar procurement portal, and the National Treasury (TGN) — and applies a 7-scenario matrix developed by Ph.D. Vicente Humberto Monteverde to detect regressive income transfer patterns.

Important: this system does NOT detect criminal offenses, is not a whistleblowing channel, and does not analyze individual people's corruption.

What it DOES do: it analyzes discretionary state decisions, detects regressive economic transfers, and generates evidence-based early warnings.

1.1 The three data sources

  • Official Gazette (BORA) — Section 3: tender and award notices.
  • Comprar.gob.ar — the official public procurement portal.
  • National Treasury (TGN) — confirms whether the vendor was actually paid.

When the same contract appears in all three sources, the system flags it as "Complete Flow": fully traceable from decision to payment.

2. Theoretical foundation — The 7 scenarios of the XAI Matrix

Grand corruption is not limited to illegal acts. Per Dr. Monteverde's research (Journal of Financial Crime, 2020), modern corruption diversified into legal phenomena producing the same economic consequences.

ScenarioXAI WeightDirection of the transfer
Privatization / Concession9.0State → Private sector
Public Works / Contracts8.0State → Contracting firms
Public Utility Tariffs7.0Users → Utility companies
Regulated Prices6.0Consumers → Producers
Wages and Collective Bargaining5.0Employees → Employers
Pensions10.0Retirees → State
Tax Shifting9.0Taxpayers → State

Each process receives an XAI Index from 0 to 10 based on the detected scenario and contract context. The higher the index, the greater the discretion detected.

Monteverde, V. H. (2020). Great corruption – theory of corrupt phenomena. Journal of Financial Crime, Vol. 28 No. 2, pp. 580-595. doi.org/10.1108/JFC-04-2020-0062

3. Navigation structure

📊 Dashboard

Executive summary with metrics and charts from the latest analysis.

🚀 Live Analysis

Operational screen to run the day's scraping and analysis.

🏛️ Tenders

Cross-referenced BORA → Comprar.gob.ar → TGN flow.

📖 Documentation

Theoretical framework, usage guide and API reference.

4. Dashboard

The system's main screen, showing an executive summary of the latest analysis run.

4.1 Key metrics

Four top cards: total processes analyzed, high-risk alerts, most frequent scenario, and average XAI index.

4.2 Charts

  • Distribution by Phenomenon Type — frequency of each of the 7 scenarios.
  • Risk Level — proportional distribution by risk category.
  • Algorithmic Analysis Detail — expandable table with index, scenario, agency, vendor and amount.

5. Live Analysis

The operational section: runs the scraper and applies the XAI Matrix to the selected day's data.

5.2 Full Analysis Cycle

  1. Connect to Comprar.gob.ar
  2. Extract the day's data
  3. Cross-reference with BORA
  4. Query the TGN (payment confirmation)
  5. Apply the XAI Matrix
  6. Generate the Excel report
  7. Redirect to Dashboard and Tenders

6. Tenders — BORA → Comprar → TGN Cross-Referenced Flow

The most informative screen for daily monitoring, combining all three sources into one unified view.

6.2 Flow metrics

  • Total BORA Publications — every notice from the day's Section 3.
  • With CUIT Extracted — publications with an identified CUIT.
  • Without CUIT (pending) — require manual review.
  • Complete BORA→TGN Flow — fully traceable: BORA + Comprar.gob.ar + confirmed TGN payment.

6.3 Awards table

Next to each vendor's CUIT, two additional signals appear (see Sections 7 and 8):

  • ✓ / ⚠️ — CUIT format validation (AFIP check digit).
  • 🌍 INTERNATIONAL ALERT — CUIT found in the international sanctions database (MEACI).

7. CUIT format validation

Every vendor CUIT is automatically extracted from an Official Gazette notice (sometimes a scanned PDF), so extraction can fail. The system validates every CUIT with AFIP's real modulus-11 check-digit algorithm.

✓ It DOES confirm the number has 11 digits and a mathematically correct check digit — i.e., the CUIT is well-formed.

⚠️ It does NOT query any official registry: it does not confirm real AFIP registration, nor return the legal name or status. That would require AFIP's official webservice (Padrón A13) via digital certificate, not yet integrated.

Programmatic access (API)

GET /api/cuit/validar?cuit=30-12345678-1
GET /api/cuit/validar-lote?cuits=30-12345678-1,20-12345678-6   (max. 200)

8. International sanctions cross-reference (MEACI)

An independent service that cross-references the awarded vendor's CUIT against international sanctions databases. On a match, the row shows 🌍 INTERNATIONAL ALERT.

GET /api/cruce-cuit?cuit=30-12345678-1
GET /api/cruce-cuits-bulk?cuits=cuit1,cuit2,cuit3   (max. 50)

9. Documentation and how to interpret results

9.1 Quick start

  1. Go to Live Analysis and click 🚀 to run the day's scraping.
  2. On the Dashboard, review metrics and charts.
  3. Sort by XAI Index to prioritize the most critical cases.

9.2 Interpreting the index

The XAI Index (0-10) measures the level of discretion detected. The higher it is, the more likely it corresponds to a regressive-transfer scenario (Section 2).

10. REST API

A REST API built with FastAPI. Interactive documentation (Swagger UI) at /docs.

EndpointDescription
GET /api/statusOverall system status
GET /api/licitaciones/datosData from the latest report
POST /api/licitaciones/ejecutarRuns the analysis cycle
GET /api/marco-teoricoDetail of the XAI Matrix
GET /api/cuit/validarValidates a CUIT's format
GET /api/cruce-cuitChecks international sanctions (MEACI)
GET /api/ia/statusIndicates whether the AI is configured
GET /healthService health check

11. Recommended workflow

  1. Every morning: run the day's cycle in Live Analysis.
  2. Check the Dashboard for new high-risk alerts.
  3. In Tenders, filter by "No CUIT" for manual review.
  4. Check the ✓/⚠️ icons before treating an award as reliable.
  5. Pay attention to any row marked 🌍 INTERNATIONAL ALERT.
  6. Sort by XAI Index to prioritize the most critical cases.

12. Disclaimer

Contact: vhmonte@retina.ar / viny01958@gmail.com · MIT License