Skip to content

feat: pure-visual MobileCLIP embeddings + query-intent ranking - #5

Merged
saariuslystoned merged 1 commit into
mainfrom
feat/clip-modality-gap-and-query-intent
Dec 2, 2026
Merged

saariuslystoned merged 1 commit into
mainfrom
feat/clip-modality-gap-and-query-intent

Conversation

@saariuslystoned

Copy link
Copy Markdown
Contributor

Summary

  • Pure-Visual CLIP Modality-Gap Fix (MobileClipOnnxEncoder.kt): Stores pure runVisionTower(bitmap) embeddings in the CLIP image cone (removing the 0.22 * ocrTextEmbed text-cone blend) so pure photos and text-bearing screenshots are ranked apples-to-apples by visual cosine similarity, while OCR text is searched via SQLite FTS5 BM25.
  • Query-Intent Weighting & Calibrated Scoring (RecallDatabase.kt): Distinguishes code/numeric/identifier queries (4829, 1Z999..., $27.50, Gate B14) from descriptive visual queries (blue van, misty lake), suppressing unrelated visual-only noise on exact code hits and calibrating CLIP cross-modal cosine scores cleanly.
  • Schema Upgrade (DB_VERSION = 6): Automatically re-indexes existing screenshots with pure-visual MobileCLIP-S0 embeddings.

Verification

  • ./gradlew --no-daemon testDebugUnitTest assembleDebug bundleDebug — 18/18 unit & Robolectric tests PASS.
  • ./scripts/check-zero-permissions.sh — 0 <uses-permission> in source manifest, 0 platform permissions in merged manifests & APK.
  • ./scripts/check-16k-alignment.sh — all 4 native libs ZIP_STORED, PT_LOAD 0x4000, zipalign -P 16 PASS.
  • ./scripts/clean-room-audit.sh — PASS across 59 files (0 errors).
  • Live 493-image Pixel verification: 4829 returns the exact single Guest Wi-Fi card (69% match, 0 false positives) and visual queries surface real photos at the top.

@saariuslystoned
saariuslystoned merged commit 11f0202 into main Dec 2, 2026
3 of 4 checks passed
@saariuslystoned
saariuslystoned deleted the feat/clip-modality-gap-and-query-intent branch December 2, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant