lossless-group_perplexed-pl.../src
mpstaton 735fbb4a8c fix(find-images): strict domain filter — search_domain_filter + reject off-domain results
Previous version returned third-party stock illustrations (wufoo.com,
thingsup.io, pixelfreestudio.com) instead of actual screenshots from the
entity's site. The "prefer entity domain" instruction in the prompt was
suggestion-only; the model picked whatever Perplexity's image search
indexed against the topic keywords.

Two changes that should compose to fix this:

1. Send `search_domain_filter: [entityDomain]` on the Perplexity request
   when the active file's frontmatter has a `url` field. This restricts
   Perplexity's underlying web search to the entity's domain, so the model
   can only see and reference on-site pages.

2. Strict client-side filter as defense in depth. Any returned image whose
   `origin_url` or `image_url` hostname does not end in the entity domain
   is rejected before placement. Better to surface "no on-domain images
   found" via Notice than to silently insert third-party stock images.

Prompt also tightened: it now instructs the model that searches are
already domain-filtered and that returning fewer images (or none) is
preferred over substituting generic stock content.

Next escalation if this still falls short: direct DOM crawl of the entity
URL (fetch HTML, parse <img> tags by alt-text/context match) — fully
deterministic, no model judgment for image selection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 16:50:47 -05:00
..
docs fix(directory-templates): streaming writes + anti-laziness/anti-hallucination measures 2026-05-09 16:13:38 -05:00
modals feat(directory-templates): v0.2 — folder batch + append-below + arbitrary frontmatter interpolation 2026-05-09 15:58:22 -05:00
services fix(find-images): strict domain filter — search_domain_filter + reject off-domain results 2026-05-09 16:50:47 -05:00
styles chore(marketplace): pass ObsidianReviewBot lint cleanly 2026-05-09 02:39:06 -05:00
types align(requirements): align Perplexed to Obsidian's plugin community 2026-05-02 14:46:59 -05:00
utils chore(marketplace): pass ObsidianReviewBot lint cleanly 2026-05-09 02:39:06 -05:00