Investigate external catalog data as bottle evidence
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 103
- Forks
- 18
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 555
Description
Summary
Explore whether regulatory and state alcohol catalogs can become a durable
evidence source for Peated's bottle classifier, catalog enrichment, barcode
lookup, missing-bottle discovery, and pricing workflows.
These datasets are not interchangeable bottle databases:
COLA approval = an approved label
State catalog = a sellable SKU/package observed at a point in time
Retail scrape = a store listing and price
Peated Bottle = one exact marketed release
The opportunity is to connect those observations without losing their
provenance or collapsing their different identity scopes:
Approved label ──▶ State SKU/package ──▶ Retail listing
│ │ │
label facts UPC + volume price + availability
└────────────────────┼────────────────────┘
▼
exact Peated Bottle
This issue captures findings from real downloadable samples and proposes an
eval-first investigation. It does not assume that any source should be copied
directly into canonical Bottle rows.
Goals
- Measure whether these sources add meaningful coverage or correctness beyond
existing retail-price scraping. - Improve exact-Bottle findability through accepted barcodes and aliases.
- Produce evidence-backed enrichment proposals for existing Bottles.
- Discover genuinely missing marketed Bottles without creating package
variants, gift sets, or stale listings as new catalog identities. - Give the bottle classifier targeted structured source evidence at runtime.
- Preserve source history and conflicts instead of turning source claims into
canonical truth prematurely. - Understand licensing, attribution, freshness, operational cost, and paid-data
options before production ingestion.
Non-goals
- Do not bulk-copy source rows into
bottle. - Do not treat a source UPC as authoritative merely because it passes a
checksum. - Do not ask an LLM to perform deterministic parsing, proof conversion, GTIN
validation, persistence, or automation gating. - Do not initially train or fine-tune the classifier on a complete source dump.
- Do not infer BottleGroups from source names.
- Do not select a production source based only on row count or field
completeness.
Sources evaluated
Iowa Liquor Products
Official dataset: https://data.iowa.gov/catalog/dataset/1029
The downloaded July 2026 catalog contained:
- 13,445 total rows
- 4,257 unique whisky items
- UPC and proof on all 4,257 whisky items
- Positive structured age on 1,192 whisky items
- SCC on 3,149 whisky items
- 3,502 unique whisky UPCs
- 3,275 clean 700/750 ml non-bundle whisky items
- 1,070 positive ages in that clean subset
Useful fields include state item number, category, item description, vendor,
bottle volume, case/inner pack, structured age, proof, listing date, UPC, SCC,
state bottle/case cost, state bottle retail, and report date.
Category coverage included 1,291 straight bourbons, 562 blended whiskies, 418
single-malt Scotches, 399 straight ryes, 299 Scotches, 268 Canadian whiskies,
258 Irish whiskies, 187 single-barrel bourbons, and 78 bottled-in-bond
bourbons.
Caveats:
vendor_nameis a supplier and must not be assumed to be the consumer brand,
bottler, or distillery.- A state item is a package/SKU observation, not automatically one Peated
Bottle. - 625 UPCs mapped to multiple Iowa whisky items. Some are legitimate package
variants; others appear incorrect. - Suspicious examples included one UPC shared by Fireball variants and Devils
River Agave Bourbon, and another shared by a Compass Box gift pack and Dark
Arts Oloroso Sherry Bourbon.
The catalog is public under CC BY 4.0, so production use would require
documented attribution and retained license/source metadata.
Pennsylvania wholesale spirits catalog
Official catalog page:
https://www.pa.gov/agencies/lcb/supplier-vendors/wine-and-spirits-suppliers/item-catalogs
The downloaded July 27, 2026 workbook contained:
- 4,548 worksheet rows
- 3,225 unique items overall
- 1,261 unique whisky items
- At least one UPC on all 1,261 whisky items
- Proof, explicit Brand, Country, and manufacturer SCC on every whisky item
- 2,372 unique whisky UPCs
- 2,376 item-to-UPC relationships
- Multiple UPCs on 864 whisky items
- 930 clean 700/750 ml non-bundle whisky items
- 1,819 unique UPCs in that clean subset
Useful fields include department/class/subclass, PLCB item code, description,
PLCB and manufacturer SCC, volume, case pack, prices and promotions, several
UPC/description pairs, package dimensions, proof, explicit brand,
import/domestic, country/region, availability, and extraction date.
Caveats:
- The field guide describes
Proofas ABV, but values such as Everclear190
show that the data is actually proof. Adapters must validate samples rather
than trust documentation blindly. - Four UPCs mapped to multiple Pennsylvania whisky items. One clear suspicious
example mapped the same UPC to Jack Daniel's 10 Year and Buffalo Trace
Prohibition Collection #2. - Other duplicates represent packaging rather than conflicting Bottle
identity, such as a bottle and gift set. - The public page says the catalogs are for supplier ordering and labeling and
carries a general copyright notice. No explicit open-data license was found;
persistent commercial reuse or redistribution should be confirmed in
writing.
COLA Cloud sample pack
- Sample: https://colacloud.us/sample-pack
- Bulk license: https://colacloud.us/bulk-data
The sample contained 1,000 TTB COLA approval records from July 2–7, 2026,
including 73 whisky approvals.
Whisky completeness:
- Brand: 73/73
- Product name: 72/73
- OCR ABV and volume: 71/73
- Main label image: 73/73
- Rolled-up barcode: 40/73
- LLM age: 39/73
- LLM finishing process: 28/73
- LLM grains: 68/73
- LLM tasting notes: 55/73
Useful fields include TTB identity/status/dates, product and brand name,
regulatory class and origin, domestic/imported status, OCR ABV and volume,
official label image metadata, extracted barcodes/QR codes, and generated
description, tasting notes, grains, finish, and age candidates.
Caveats:
- Approval proves that a label was approved, not that the product launched or
reached retail distribution. - Extracted barcodes are claims. One barcode appeared across seven distinct
Single Cask Nation releases; others appeared across products with different
ages or identities. - LLM traits are hints, not truth. The sample inferred a Cedar Ridge age of 21
from text thanking customers for 21 years of support. It inferred age 2 for a
15-year Strathmill because the label stated a two-year finishing period. - Images and bulk data require a commercial license with explicit storage,
display, derived-data, and refresh terms.
Utah DABS monthly price books
Official catalogs: https://abs.utah.gov/vendors/monthly-price-books/
The downloaded May 2026 numeric price list contained:
- 894 PDF pages
- 14,239 parsed product rows
- 1,031 whisky rows
- A distinguishable second/UPC-like code on 751 whisky rows
Useful fields include control-state item code, UPC where present, size, case
pack, product name, status, price, category, and vendor/distributor.
The catalog was valuable for historical, limited, allocated, and discontinued
discovery, including older Ardbeg committee releases, Supernova, Hypernova,
Balvenie single-barrel releases, and Convalmore 32.
Caveats:
- PDF extraction is less reliable and more expensive.
- Names are abbreviated.
- Some codes are state/internal identifiers rather than consumer UPCs.
- Age and edition often exist only in the name.
- Status codes require source-specific interpretation.
- No explicit open-data license was found; production reuse should be
confirmed.
Generic barcode APIs
A small representative whisky spot-check found no useful results from
UPCitemdb before its free-tier burst limit and no Open Food Facts products for
ten codes. The sample is too small for a universal conclusion, but generic
grocery/barcode APIs appear less promising than alcohol-specific regulatory and
state sources. A paid provider should be tested against a Peated-supplied
benchmark before purchase.
Cross-source findings
Pennsylvania and Iowa shared 846 whisky UPCs:
- Proof agreed exactly for 653
- Proof was within 0.5 for another 48
- Proof materially differed or otherwise did not agree for 100
- One side lacked proof for 45
- Volume agreed exactly for 826
- Volume had no overlap for 20
- 202 records had strong combined agreement on name, volume, and proof
Strong corroboration examples included Redemption Rye, Michter's US*1
American, Four Roses, Widow Jane Apple Wood Rye, and Four Roses Small Batch
Select.
Shared UPC does not prove identity. Material conflicts included:
- One UPC described by Pennsylvania as Glenmorangie A Tale of Spices at 92
proof/750 ml and by Iowa as Glendronach Ode to the Embers at 97 proof/700 ml. - One UPC described by Pennsylvania as a Midnight Moon Apple Pie gift set and
by Iowa as Ardbeg An Oa.
This is why unaccepted source assertions must remain evidence rather than being
written into the globally unique canonical bottle_barcode mapping.
Directional comparison with Peated
These checks used public Peated search and conservative heuristics. They help
choose a benchmark but are not verified exact-identity measurements.
COLA
Of 73 recent whisky approvals, one looked likely to exist, one was ambiguous,
and 71 returned no obvious Peated search result. The likely existing example,
Aberlour 14 Double Cask, lacked ABV in Peated while COLA supplied 40%.
Interpretation: recent COLAs may be valuable for discovery, but approval is not
launch evidence and search misses do not prove that a Bottle is absent.
Pennsylvania
In a rough 100-item clean 700/750 ml non-bundle sample:
- 11 looked like likely existing Bottles
- 13 were ambiguous
- 76 returned no obvious result
- 10 of the 11 likely matches lacked ABV in Peated despite PA supplying proof
- 9 of the 11 lacked images; PA has no images, so it cannot fill that gap
Potential missing-product examples included Bulleit 10, Talisker Distillers
Edition, Knob Creek 18, Old Overholt 11 (2026), Green Spot Quails' Gate,
Penelope Tokaji Cask Finish, WhistlePig Boss Hog VIII, and Wild Turkey Master's
Keep Triumph. Each requires exact-identity adjudication.
Potential value to Peated
Findability
- Accepted consumer GTINs for scanning
- Reviewed source titles as aliases when globally reusable
- Stable source identifiers for refreshes
Existing-Bottle enrichment
- ABV, usually derived deterministically from proof
- Stated age when explicitly structured or label-visible
- Category
- Consumer brand
- Country/region and domestic/import status
- Exact edition/batch/year traits when marketed as identity
- Label imagery under an appropriate license
- Description, finish, grain, and tasting-note evidence, with generated
extraction kept distinct from direct label facts
Missing optional facts should normally become enrichment proposals after
Bottle identity is resolved. They should not cause the classifier to repair or
reject an otherwise correct match.
Missing-Bottle discovery
A source record with marketed name, brand, category, age/proof, package volume,
and identifiers can support a creation candidate. It still must be resolved as
one of:
- a genuinely distinct marketed release
- another size or market package of an existing Bottle
- a gift set, bundle, sampler, or case
- a stale/discontinued listing
- a state/internal SKU with no reusable consumer identity
- an abbreviated row that collapses multiple releases
COLA, state catalogs, and retail observations can provide complementary
evidence that a label was approved, a package was distributed/listed, and a
product was offered.
Package evidence
Volume and packaging are useful even though they are outside Bottle identity.
The barcode capability intentionally permits multiple barcodes per Bottle and
deferred package volume, market, and source metadata. These datasets expose the
need for a future evidence/package model, but package size must not become
Bottle identity.
Pricing and availability
State sources also provide wholesale/cost data, retail price, promotions,
listing/availability, and historical/discontinued status. These could
complement retailer scraping, but a state catalog price is not automatically
comparable to an observed consumer store price.
Proposed system boundary
Treat catalog ingestion similarly to unresolved store-price ingestion, but with
a richer source record:
source snapshot
↓
source-specific adapter
↓
normalized source record and claims
↓
local candidates + corroborating source retrieval
↓
bottle classifier identity decision
├─ match existing
├─ create-bottle proposal
└─ no match / review
↓
observation persistence
↓
deterministic enrichment and barcode proposals
↓
automation gate or moderator review
A source record must exist independently of a Bottle because many rows will be
unresolved. bottle_observation requires a Bottle and is naturally the
post-resolution evidence side, not the complete staging model.
Possible source-record responsibilities:
- source type and immutable source key
- observed/effective date and refresh timestamp
- active/inactive/tombstoned state
- raw payload or durable snapshot reference
- normalized source name
- package claims: GTIN, volume, pack, SCC, and market
- extracted Bottle identity claims
- source URLs and licensing/attribution metadata
- optional matched Bottle id
- match/proposal/review status
- traceable processing version
Avoid prematurely building a universal knowledge graph. A source-record
envelope with source-specific raw payload plus normalized identity/claims may be
enough initially.
Classifier integration
Use these datasets as targeted runtime evidence for the existing classifier,
not as a bulk prompt or initial fine-tuning corpus.
Two paths:
- Classify an imported record: the state/COLA row is the observed reference
being resolved tomatch,create_bottle, orno_match. - Support another classification: retrieve relevant records by
GTIN/name/traits when classifying a store listing, photo, or user submission.
Code should own ingestion, schema parsing, GTIN validation, proof-to-ABV
conversion, volume/date/currency normalization, deduplication, literal
identifier lookup, direct agreement/conflict detection, candidate retrieval,
validation, persistence, permissions, and automation gates.
The model should own semantic decisions:
- exact marketed Bottle versus package/listing
- gift set/bundle versus release
- vendor as brand, bottler, distributor, importer, or none
- whether batch, edition, year, cask, finish, or strength changes identity
- which exact Peated Bottle a record safely matches
- whether a new Bottle can be created without inventing a hybrid
- which facts remain observation-only
After identity resolution, deterministic code can compare claims with the
selected Bottle and create enrichment proposals. The model should not decide
that 92 proof / 2 = 46% ABV.
The current classifier accepts a reference, extracted identity, image evidence,
and local candidates but lacks a first-class structured catalog-evidence
collection. A future contract could conceptually accept:
sourceEvidence: [{
source: "iowa_liquor_catalog",
sourceKey: "12345",
observedAt: "2026-07-07",
rawName: "…",
claims: {
gtin: "…",
volumeMl: 750,
proof: 92,
statedAge: 12,
category: "Single Malt Scotch"
}
}]
Constraints:
- Preserve sources separately so disagreements remain visible.
- Treat retrieved content as data, never prompt policy.
- Keep instructions static; use a typed artifact or narrow catalog-evidence
search tool. - Do not inject catalog facts as freeform
investigationHintinstructions. - Preload the source record currently being classified.
- Retrieve a small relevant set for arbitrary user/store references.
- An accepted canonical barcode/alias may support a deterministic shortcut. An
unaccepted source barcode claim may retrieve candidates but must not bypass
classification solely because it exists.
Claim and promotion policy
Source values should initially be claims, not canonical Bottle fields.
Evidence classes to evaluate:
- Direct label fact: strong evidence for what a readable label states.
- Structured regulatory fact: strong within its administrative meaning.
- State SKU fact: useful for listing/proof/volume/UPC, but not automatically
exact marketed-release identity. - Retail observation: evidence that a named package was offered.
- Generated/OCR fact: retrieval/review hint that retains its extraction
method and conflicts. - Cross-source corroboration: agreement between independent sources can
strengthen promotion eligibility.
Candidate rules to test rather than assume:
- Missing ABV may be automatable only after exact-Bottle resolution and
sufficient source agreement or label support. - Structured age should agree with the marketed name or label.
- Category needs a reviewed mapping into Peated's smaller vocabulary.
- Country/region may belong to an entity rather than the Bottle.
- Barcode acceptance must reject invalid GTINs, conflicts, and package
identities that cannot be tied to one exact Bottle. - LLM-derived COLA fields remain observation evidence until verified.
- New-Bottle creation has a higher evidence bar than adding an observation and
remains reviewable unless a closed-form anchor or corroboration qualifies it.
Evaluation plan
Do not decide source priority or build a production importer until a benchmark
measures actual value against Peated.
Cohorts
- Existing Bottles missing ABV, age, category, country, image, or barcode.
- Well-populated Bottles to measure agreement, stale claims, and harmful
repairs. - Near-neighbor families with batch/year/edition/cask ambiguity.
- Apparently missing source rows, adjudicated as true missing Bottles,
alternate packages, bundles, stale products, or unresolved references. - Known source conflicts and UPC collisions.
- Recent COLA approvals where market availability is unknown.
Comparisons
- Current classifier baseline
- Classifier plus one relevant source
- Classifier plus corroborating sources
- Deterministic exact-identifier retrieval without model reasoning where valid
Metrics
- exact existing-Bottle match precision/recall
- false existing-Bottle match rate (highest-cost error)
- false
no_matchrate - create-bottle precision
- package/gift-set rejection precision
- verified field-fill rate
- accepted-barcode precision and conflict rate
- candidate retrieval recall
- classifier action breakdown
- abstain/review rate
- moderator acceptance/correction/rejection
- unique contribution by source
- latency, token cost, source cost, and review load
Key question:
Does structured catalog evidence reduce false
no_matchand improve
supported creation/enrichment without increasing false existing-Bottle
matches?
Suggested phases
1. Benchmark without production writes
- Freeze evaluated samples.
- Build a manually adjudicated benchmark.
- Create read-only source adapters/scripts.
- Measure overlap, unique information, conflicts, and exact-identity precision.
- Compare single-source and corroborated evidence.
- Resolve licensing questions with Pennsylvania, Utah, and COLA.
2. Source-evidence design
If the benchmark is promising:
- Define the unresolved source-record lifecycle.
- Decide whether to generalize the store-price source pattern or add an
external catalog item model. - Define structured classifier evidence.
- Define post-match observations and enrichment proposals.
- Define refresh, tombstone, attribution, and audit behavior.
- Decide how package metadata relates to canonical barcodes.
3. Limited dry run
- Ingest one legally clear source without canonical writes.
- Generate matches, creates, enrichments, and conflicts.
- Review a meaningful sample.
- Compare against the benchmark and estimate moderator load.
4. Gated production use
- Persist unresolved source records and approved observations.
- Enable reviewed barcode/enrichment proposals.
- Add narrow automation only after measured precision supports it.
- Continuously sample automated outcomes and monitor source drift.
Open questions
- Which source has the highest unique verified contribution after accounting
for retail scraping? - Should the unresolved object be a generic external catalog item, a
generalized nullable observation, or source-specific tables? - Should normalized claims remain JSON initially or become field-level
assertions? - How should snapshots and changes over time be retained?
- What does disappearance from a monthly catalog mean?
- How should proof, volume, package, and market be represented outside Bottle
identity? - Is evidence sufficient, or will Peated eventually need
bottle_package? - Which source classes corroborate one another independently?
- What evidence permits accepting a globally unique canonical barcode?
- What evidence permits an automatic field fill versus a moderator proposal?
- How should attribution be displayed and inspected?
- Can COLA images be stored/displayed, or only referenced/processed?
- Can Pennsylvania and Utah facts be retained and displayed commercially?
- Would a paid alcohol provider add unique coverage after combining these
sources with retail data? - Should state prices become
store_price, a market index, or
observation-only context? - How should catalog retrieval avoid increasing normal Add Bottle latency and
prompt size?
Initial recommendation
Treat this as a retrieval and evidence-quality investigation, not an import
project yet.
The samples contain meaningful data beyond UPCs: proof/ABV, age, category,
brand, country, package facts, label imagery, availability, pricing, and
missing-release candidates. They also contain enough UPC collisions, package
ambiguity, stale/abbreviated naming, documentation errors, and generated-field
mistakes that direct canonical backfill would sometimes make Peated confidently
wrong.
The first deliverable should be a benchmark showing the verified marginal value
of each source and combination. That result should determine whether to build a
source-evidence layer, which source enters a dry run first, and where classifier
reasoning is actually needed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing retail-price scraping, Bottle identity, barcode, and classifier entry points, then build an eval-first benchmark from the Iowa, Pennsylvania, COLA, and Utah samples. Compare exact-identity coverage, conflicts, and enrichment value while documenting licensing and provenance constraints. Done means a measured recommendation and a safe evidence model, not bulk source rows in canonical Bottle records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, data-engineering, databases, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100