Conforme

Cómo funcionaHow it works

El modelo lee y señala. Un agente vuelve al papel. El código pone los números.The model reads and points. An agent goes back to the paper. Code owns the numbers.

Cada euro de la pantalla sale del código y señala su sitio en el papel. Los modelos leen, localizan, eligen qué mirar y entienden la pregunta. Nada de lo que dicen se convierte en una cifra o en una reclamación hasta que el código lo ha comprobado.Every euro on screen comes from code and points to its place on the paper. The models read, locate, choose what to look at and understand the question. Nothing they say becomes a figure or a claim until code has checked it.

De la foto a la reclamaciónFrom photo to claim

  1. 1
    SAM 3.1SAM 3.1

    Separa y enderezaSplits and straightens

    Encuentra cada albarán de la foto con el concepto «sheet of paper» y da su máscara al píxel. El código calcula el rectángulo girado mínimo, endereza el papel y blanquea el fondo.Finds every note in the photo with the concept "sheet of paper" and returns its pixel mask. Code computes the minimum rotated rectangle, straightens the paper and whitens the background.

  2. 2
    Muse Spark 1.3Muse Spark 1.3

    Lee con cajasReads with boxes

    Copia cada línea tal como está impresa, con su caja en el papel (rejilla 0-1000), en un esquema JSON estricto. Dice cuánto hay que girar la página; el código la pone derecha y mueve las cajas con ella. Si la caja de una fila es imposible (sin altura, o fuera del orden impreso), el código la recoloca a partir de sus vecinas.Copies every line exactly as printed, with its box on the paper (0-1000 grid), in a strict JSON schema. It reports how far the page must turn; code turns it upright and moves the boxes with it. If a row's box is impossible (no height, or out of the printed order), code re-places it from its neighbours.

  3. 3
    Muse Spark 1.3Muse Spark 1.3

    Lee otra vez, por separadoReads again, independently

    Una segunda lectura sobre la tabla ampliada, sin ver la primera: copia de nuevo cantidades, precios e importes y sitúa cada fila. Si las dos lecturas no coinciden en un número, es una duda.A second reading of the enlarged line table, without seeing the first: it copies quantities, prices and amounts again and places every row. If the two readings disagree on a number, that is a doubt.

  4. 4
    CódigoCode

    Comprueba cada euroChecks every euro

    Cantidad × precio, sumas por tipo de IVA, total, NIF, precio frente al historial, pedido y duplicados. Decide el sello: CONFORME, CON RESERVAS o REVISAR.Quantity × price, sums per VAT rate, total, tax ID, price against history, order and duplicates. It decides the stamp: ALL GOOD, CHECK BEFORE SIGNING or TAKE A LOOK.

  5. 5
    Muse Spark 1.3 + herramientasMuse Spark 1.3 + toolsagenteagent

    Investiga lo que no cuadraInvestigates what doesn't add up

    Si hay dudas de lectura, un agente decide qué mirar en el papel y cierra con un veredicto que cita sus pruebas: celda mal leída, error del proveedor, lectura confirmada o «que lo mire una persona».When a reading is in doubt, an agent decides what to look at on the paper and closes with a verdict that cites its evidence: misread cell, supplier error, reading confirmed, or "a person should look".

  6. 6
    Muse Spark 1.3 + herramientasMuse Spark 1.3 + toolsagenteagent

    Confirma cada reclamación en el papelConfirms every claim on the paper

    Antes de pedirle dinero a un proveedor, el agente relee ampliada la línea reclamada y saca el registro con el que se compara (historial de precios o pedido). Si la relectura no coincide, la reclamación se retiene.Before any money is asked of a supplier, the agent re-reads the claimed line zoomed in and pulls the record it is compared against (price history or order). If the re-read disagrees, the claim is held back.

  7. 7
    CódigoCode

    Escribe la reclamaciónWrites the claim

    El mensaje, la frase para escribir en el albarán antes de firmar y la imagen de prueba (cada línea reclamada, cortada del papel del proveedor, con la cuenta) son plantillas con las cifras del código. No se envía nada sin ti.The message, the line to write on the note before signing, and the proof image (each claimed line cut from the supplier's own paper, with the arithmetic) are templates filled with code's numbers. Nothing is sent without you.

  8. 8
    Muse Voice Transcribe + SparkMuse Voice Transcribe + Spark

    Entiende la preguntaUnderstands the question

    La voz se pasa a texto; Spark la convierte en una intención con proveedores y productos sacados de tus propios albaranes. El código calcula la cifra y enciende las líneas que la forman.Speech becomes text; Spark turns it into an intent with suppliers and products taken from your own notes. Code computes the figure and lights up the lines behind it.

  9. 9
    Muse ImageMuse Image

    Escenas de pruebaTest scenes

    Genera los fondos de las muestras (la encimera de la cocina). Siempre etiquetado; ningún albarán real aparece nunca.Generates the sample backgrounds (the kitchen counter). Always labelled; no real delivery note ever appears.

El bucle del agenteThe agent loop

Muse Spark 1.3 por la Responses API, con herramientas que ejecuta el código. La API solo admite tool_choice «auto», así que al llegar al límite solo se le ofrece la herramienta de cerrar. Tope: 4 llamadas y 45 s por albarán (40 s para la reclamación).Muse Spark 1.3 through the Responses API, with tools that code runs. The API only allows tool_choice “auto”, so at the limit the agent is offered only the closing tool. Budget: 4 calls and 45 s per note (40 s for the claim file).

CódigoCode

Encuentra una duda o una reclamación y le pasa al agente lo impreso y sus cálculos.Finds a doubt or a claim and hands the agent what is printed and its own figures.

Muse Spark 1.3

Elige la herramienta más barata que pueda decidir.Picks the cheapest tool that could settle it.
hasta 4 vecesup to 4 times

CódigoCode

Comprueba cada prueba citada con sus reglas. Acepta el veredicto, o lo rechaza y el albarán pasa a una persona.Checks every cited piece of evidence against its rules. Accepts the verdict, or rejects it and the note goes to a person.

Código ejecuta la herramientaCode runs the tool

Recorta y amplía el papel, o consulta el historial o el pedido. Cada resultado es una prueba numerada (ev1, ev2…) con su recorte.Crops and zooms the paper, or looks up the history or the order. Every result is numbered evidence (ev1, ev2…) with its crop.
Al final el agente cierra citando las pruebas que lo sostienen. Nunca pone una cifra: las cuentas son del código.At the end the agent closes, citing the evidence that supports it. It never sets a figure: the arithmetic belongs to code.

Sus herramientasIts tools

Herramientas del agenteThe agent's tools
HerramientaToolQué hace el códigoWhat code does
releer_celdaRecorta una celda (desde el inicio de su fila), la amplía 2× y Spark la copia tal cual.Crops one cell (from the start of its row), zooms 2× and Spark copies it as printed.el texto + el recortethe text + the crop
releer_filaRecorta la fila entera, la amplía 2× y copia cantidad, precio, descuento, importe y cada número impreso en ella.Crops the whole row, zooms 2× and copies quantity, price, discount, amount and every number printed on it.los números + el recortethe numbers + the crop
releer_totalRecorta el total o una fila de IVA y la vuelve a leer.Crops the total or one VAT row and reads it again.el texto + el recortethe text + the crop
historial_precioÚltimas compras del producto (consulta del código).Last purchases of the product (a code lookup).fechas y preciosdates and prices
pedidoCantidad pedida del producto (consulta del código).Quantity ordered of the product (a code lookup).la línea del pedidothe order line
recontar_filasVuelve a contar las filas de producto del papel.Counts the product rows on the paper again.el recuentothe count

Si la línea no está en su recorte, la herramienta vuelve a mirar una vez en la tabla entera, y la prueba lo dice.If the line is not in its crop, the tool looks once more at the whole table, and the evidence says so.

Lo que el código acepta como pruebaWhat code accepts as evidence

  • Una celda corregida vale solo si una relectura ampliada muestra exactamente ese texto y la línea pasa a cuadrar.A corrected cell counts only if a zoomed re-read shows exactly that text and the line then adds up.
  • Un error del proveedor vale solo si una relectura confirma el importe impreso, ninguna relectura contradice la cantidad o el precio, y ningún otro número impreso en la fila hace cuadrar la cuenta (piezas frente a peso).A supplier error counts only if a re-read confirms the printed amount, no re-read contradicts the quantity or price, and no other number printed on the row makes the line add up (pieces against weight).
  • Una subida o una falta se reclama solo si la relectura ampliada muestra el mismo precio y cantidad (subida) o la misma cantidad entregada (falta). Una relectura que no coincide retiene la reclamación, aunque el agente no la cite.A price rise or a shortage is claimed only if the zoomed re-read shows the same unit price and quantity (rise) or the same delivered quantity (shortage). A re-read that disagrees holds the claim back, even if the agent does not cite it.
  • Un cierre que cita una prueba que no existe se rechaza entero.A closing that cites evidence that does not exist is rejected as a whole.

Ver la traza real de cada reclamaciónSee the real trace behind each claim

Lo que aprendí haciéndoloWhat I learned building it

Se inventó un precio que cuadraba.The model invented a price that added up.

Leyó 1,175 € donde el papel dice 0,950 €, porque 24 × 1,175 son justo los 28,20 € cobrados. La segunda lectura, independiente, existe por esto.It read €1.175 where the paper says €0.950, because 24 × 1.175 is exactly the €28.20 charged. The second, independent reading exists because of this.

Casi acusa en falso a un proveedor.It nearly accused a supplier wrongly.

Un albarán imprime piezas (3 U) y peso (11,081 kg); el agente tomó las piezas y vio un cobro de más de 111,52 €. Ahora el código prohíbe ese veredicto si otro número impreso en la fila hace cuadrar la línea.A note prints pieces (3 U) and weight (11.081 kg); the agent took the pieces and saw a €111.52 overcharge. Code now forbids that verdict when another number printed on the row makes the line add up.

Una caja sin altura escondió una fila entera.A box with no height hid a whole row.

En una grabación, la primera lectura puso la caja de la cerveza encima de la fila 1 y sin altura; el recorte de la tabla dejó fuera esa fila y el agente miró en el sitio equivocado. Ahora el código recoloca las cajas imposibles a partir de sus vecinas, y una herramienta que no encuentra su línea vuelve a mirar en la tabla entera.On one recording, the first reading put the beer line's box above row 1 with zero height; the table crop cut that row out and the agent looked in the wrong place. Now code re-places impossible boxes from their neighbours, and a tool that cannot find its line looks again at the whole table.

Contar cajas con SAM no era fiable.Counting crates with SAM wasn't reliable.

Acertó 5 de 23 recuentos en fotos públicas, así que no está en el producto.It was exact on 5 of 23 counts on public photos, so it is not in the product.

Límites, con honestidadHonest limits

  • Medido en 33 albaranes reales de un solo restaurante familiar de Gijón. Otros países, albaranes a mano con precios y copias de calco no están medidos todavía.Measured on 33 real notes from one family restaurant in Gijón. Other countries, handwritten notes with prices and carbon copies are not measured yet.
  • El historial de precios y los pedidos de las muestras son ficticios. Una foto en vivo se comprueba en cuentas, IVA, totales y NIF; las subidas y las faltas necesitan tu historial y tus pedidos, que la app aún no importa.Price history and orders in the samples are fictional. A live photo is checked for arithmetic, VAT, totals and tax ID; price rises and shortages need your own history and orders, which the app does not import yet.
  • El agente tiene 4 llamadas a herramientas por albarán. Si las pruebas no son claras lo dice y el albarán pasa a ti; no adivina.The agent has 4 tool calls per note. When the evidence is unclear it says so and the note goes to you; it does not guess.
  • Las preguntas cubren un conjunto cerrado: pagado de más, subidas, gasto por proveedor o producto, último precio, albaranes con problemas e IVA.Questions cover a closed set: overpaid, price rises, spend by supplier or product, last price, notes with problems, and VAT.
  • La lectura usa Muse Spark por la Model API de Meta en modo estándar. Hay un modo privado con el modelo abierto Muse Glimmer 30B preparado tras una opción, pero aún sin medir.Reading uses Muse Spark through Meta's Model API in standard mode. A private mode on the open-weight Muse Glimmer 30B is wired behind a flag but not measured yet.
  • La muestra grabada de tres albaranes tardó 46 s y costó 0,106 $.The recorded run of three notes took 46 s and cost $0.106.

Lo que el modelo nunca decideWhat the model never decides

Ninguna cifra (sumas, diferencias, € en juego, respuestas), si una línea está bien, el precio de referencia, si un albarán está duplicado, las conversiones de unidades, qué líneas se encienden, el sello ni el texto que recibe un proveedor. Solo modo estándar de la API: una lista blanca en el código rechaza cualquier modelo «-contributor».No figure (sums, differences, € at stake, answers), whether a line is right, the reference price, whether a note is a duplicate, unit conversions, which lines light up, the stamp, or the text a supplier receives. Standard API mode only: an allowlist in code refuses any “-contributor” model.

Ver cómo lo medimosSee how we measure itEl código, en GitHubThe code, on GitHub