Printer compatibility recommendations for the Foomatic directory (GSoC 2026) - #224
Open
gativarshney wants to merge 33 commits into
Open
Printer compatibility recommendations for the Foomatic directory (GSoC 2026)#224gativarshney wants to merge 33 commits into
gativarshney wants to merge 33 commits into
Conversation
…ence-aligned confidence tiers
…ation reproducible
# Conflicts: # yarn.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a printer recommendation feature to the Foomatic printer directory. Every printer page now shows up to three similar printers, each with an explanation of why it was suggested, a confidence tier, and expanded capability information. A compact teaser next to the "Recommended driver" card in the page header makes the feature discoverable without scrolling; it links down to the full section.
Everything is generated offline at build time. There is no backend, no external API, and no data leaves the static site. This is an engineered similarity pipeline, not a trained model, which is what keeps every recommendation fully explainable.
Screenshots
Printer page
The compact teaser makes similar printers discoverable directly from the printer header, while the full section provides the detailed recommendations.
Similar printer recommendations
Each recommendation shows the similarity score, evidence tier, Linux support grade, and reasons for the recommendation.
Implementation
The pipeline runs as part of
yarn generate:necp6, 8 printers) counts for much more than sharingpostscript(1,746 printers).Output is one small JSON shard per printer (median 3.3 KB). A printer page fetches its own printer record and recommendation shard, about 6 KB of JSON in total; the browser never downloads the 24 MB aggregate file or the full printer index. The teaser and the full section share a single request.
The UI presents scores as "N% similarity" under four evidence-aligned tiers (High confidence, Good match, Moderate match, Limited evidence). The score is a similarity value, not a probability and not a compatibility guarantee, and the wording avoids implying either. Each card also labels the candidate's own Foomatic grade as "Linux support:" so it cannot be confused with the similarity result.
Supporting work included in this PR:
tools/eval/docs/covering architecture, data formats, regeneration, UI extension, and measured recommendation qualityCI note: PR builds skip similarity generation for speed (
FOOMATIC_SKIP_SIMILARITY=1); the site builds and renders correctly without the artifacts. Deploy builds run the full pipeline, and a weekly cron regenerates recommendations as upstream foomatic-db changes. Please confirm the scheduled deploy is acceptable policy for this repository.Validation
yarn foomatic:evalrecomputes the dataset metrics below from the generated artifacts and fails if any documented constant drifts from the source. Numbers reflect the current foomatic-db snapshot and are regenerated with the data.docs/foomatic-recommendation-quality.md)node tools/eval/pairs.mjsprints real recommendation pairs with full source and target capabilities next to the explanation shown to users, for manual inspection.Limitations
These are documented in detail in
docs/foomatic-recommendation-quality.md:Follow-up
A local natural-language assistant for the printer directory (queries like "colour laser printer with duplex for Linux") is planned as a separate branch built on the artifacts this PR produces. It is intentionally not part of this PR.