AI Skill Report Card
Extracting Product Catalog Data
Quick Start13 / 15
Given raw scraped catalog text, parse each product entry into a structured record:
JSON{ "title": "Botánico. Tejer Jacquard", "author": "Jandi Gardiazabal", "reviews_count": 14, "publisher": "Enhorabuena Estudio Ltda.", "year": 2022, "edition": null, "binding": "Tapa Blanda", "condition": "Nuevo", "price": 33.97, "currency": "USD", "used_available": false, "used_price": null }
Recommendation▾
Add an example with a fully missing field (e.g., no author, or no price) to demonstrate null-handling in practice rather than just describing it in Best Practices
Workflow14 / 15
Progress:
- Step 1: Identify the repeating record delimiter pattern (usually ends with "Ver detalleEmpezar a leer" or similar CTA boilerplate)
- Step 2: Split the raw text blob into individual product chunks using that delimiter
- Step 3: For each chunk, extract fields in order of appearance: title, author(s), review count (in parentheses), publisher, year, edition, binding, condition, price
- Step 4: Detect optional sub-patterns: "Disponible Usado en Buen Estado a $X" → set
used_available: trueandused_price - Step 5: Strip UI noise words: "Agregado", "Agregar al carro", "Ver detalle", "Empezar a leer", "(en Inglés)", "(en Alemán)" language tags (move to
languagefield) - Step 6: Normalize prices (strip
$, convert to float), normalize year (int or null), normalize edition (extract "N edición" → int) - Step 7: Deduplicate — catalog pages often repeat items across "page preview" sections; flag or merge duplicates by title+author+publisher
- Step 8: Output as clean JSON array or CSV table, plus a summary count
Recommendation▾
Include a brief regex or pseudocode snippet for the field pattern-matching logic (year, edition, binding, condition detection) since it's described but not shown executing
Field Extraction Rules
- Title: text before the author name; if no clear author, title may include subtitle after a colon or dash
- Author: proper-cased name(s) following title, often followed by
(N)review count — separate multiple authors joined by; - Review count: number in parentheses immediately after author, e.g.
(14)→14; absent if no parentheses - Publisher, year, edition, binding, condition: comma-separated fields following author; order is usually
Publisher, Year, Edition, Binding, Conditionbut any may be missing — match by pattern (\d{4}= year,\d+ edición= edition,Tapa (Blanda|Dura)= binding,Nuevo|Usado|Anticuario= condition) - Price:
$ N.NNimmediately following condition - Language tag:
(en Inglés),(en Alemán), etc. in title → extract tolanguagefield, default"Español"if absent - Used stock line:
Disponible Usado en Buen Estado a $ N.NN. Comprar Usado→ setsused_availableandused_price
Examples17 / 20
Example 1:
Input: Punto de Cruz Varios Autores(1) Susaeta Ediciones, 2006, Tapa Dura, Nuevo $ 42.61Disponible Usado en Buen Estado a $ 40.79. Comprar UsadoAgregadoAgregar al carroVer detalleEmpezar a leer
Output:
JSON{ "title": "Punto de Cruz", "author": "Varios Autores", "reviews_count": 1, "publisher": "Susaeta Ediciones", "year": 2006, "edition": null, "binding": "Tapa Dura", "condition": "Nuevo", "price": 42.61, "currency": "USD", "language": "Español", "used_available": true, "used_price": 40.79 }
Example 2:
Input: The Weaver's Book of 8-Shaft Patterns (en Inglés) Strickler, Carol Interweave Press Inc, 1991, 10 edición, Tapa Blanda, Nuevo $ 42.47AgregadoAgregar al carroVer detalleEmpezar a leer
Output:
JSON{ "title": "The Weaver's Book of 8-Shaft Patterns", "author": "Strickler, Carol", "reviews_count": null, "publisher": "Interweave Press Inc", "year": 1991, "edition": 10, "binding": "Tapa Blanda", "condition": "Nuevo", "price": 42.47, "currency": "USD", "language": "Inglés", "used_available": false, "used_price": null }
Recommendation▾
Show a 'bad outcome' example (e.g., positional indexing failing when a field is missing) to reinforce the Common Pitfalls section with concrete contrast
Best Practices
- Always report total parsed records vs. expected count (stated on page, e.g. "Encontramos 453 Libros") to catch parsing gaps
- When author name format is ambiguous (e.g., "Jonna Hietala" vs "Hietala, Jonna"), preserve as-is rather than guessing reordering
- Treat items with no clear author as having
author: nullrather than misattributing the publisher as author - Watch for pagination markers like "PAGE 2" embedded mid-text — these indicate duplicate content blocks, not new fields
- When fields are entirely missing (no year, no edition), set to
nullrather than omitting the key, to keep records uniform
Common Pitfalls
- Don't assume fixed field order — missing edition/year shifts comma-separated fields; always pattern-match, don't positionally index
- Don't merge the "used book" price into the main price field — keep them separate
- Don't drop the language tag info when removing
(en Inglés)from the title — relocate it - Don't treat repeated content after a "PAGE N" marker as new unique products without deduplication
- Don't include UI chrome text ("Agregado", "Ver detalle", "Comparte y gana dinero") as part of any data field