CoolFace
Modelpublic

AutosTREFA/trefa-mariana-qwen3-14b

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
0likes110downloads
Model Card

This new version of Mariana has enhanced

What was implemented in this new version:

  1. 1.Database RPC function (buscarvehiculosfuzzy) on the mhlztgilrmgebkyqowxz Supabase project:
  2. 2.Uses busqueda_tsv (tsvector with Spanish stemming) for full-text search
  3. 3.Uses pg_trgm similarity on individual words against marca and modelo columns
  4. 4.Combined relevance score: tsrank * 2 + titulosimilarity + bestperword_similarity
  5. 5.Accepts the same numeric filters (price, year, km) as the primary query
  6. 6.Threshold: 0.2 per-word similarity (catches "jeta"→"Jetta", "nisan"→"Nissan", etc.)
  1. 1.buscarVehiculos.ts — transparent fallback (lines 123-153):
  2. 2.The primary ILIKE query runs first (unchanged behavior)
  3. 3.If 0 results, builds a search text from marca + modelo + tipo_carroceria + motor
  4. 4.Calls buscarvehiculosfuzzy via .rpc() with the same price/year/km filters
  5. 5.Returns results with busqueda_aproximada: true and a correction note
  6. 6.The model never needs to know about this — it calls buscar_vehiculos the same way
  1. 1.Search cascade (3 layers of typo tolerance):
  2. 2.Static maps (fuzzy.ts) — instant lookup for known misspellings
  3. 3.Levenshtein (fuzzy.ts) — catches typos within edit distance 2 against live inventory
  4. 4.tsvector + trigram (new) — catches everything else via database-level fuzzy matching

Test results:

┌───────────────────┬──────────────────────────────────────────────────────────┐ │ Query │ Result │ ├───────────────────┼──────────────────────────────────────────────────────────┤ │ "nisan sentra" │ Nissan Sentra SR CVT (relevancia: 1.09) │ ├───────────────────┼──────────────────────────────────────────────────────────┤ │ "hundai tuczon" │ Hyundai Tucson Limited Tech (0.74) │ ├───────────────────┼──────────────────────────────────────────────────────────┤ │ "jeta automatico" │ Volkswagen Jetta Sportline (0.33) │ ├───────────────────┼──────────────────────────────────────────────────────────┤ │ "chevi equinocs" │ Chevrolet Tracker/Onix/Aveo (0.44) — no Equinox in stock │ ├───────────────────┼──────────────────────────────────────────────────────────┤ │ "toyoda camri" │ Toyota Prius/Corolla (0.43) — no Camry in stock │ └───────────────────┴──────────────────────────────────────────────────────────┘