Brian Hung
Projects
Prism
The media backend behind YapGPT and other apps: it describes, embeds and searches any photo or video.
Ways in and out
one per media item
a hash seen before is linked, not redone
ScrapeWorkflow
a whole profile
IngestWorkflow
one URL, text or file
ENRICH_Q
uploads, fair per owner
TransformWorkflow
dedup-check, describe, embed
D1 · R2 · Vectorize
media rows and enrichment JSON
bytes by sha256, 1408-dim vectors
POST /v1/search
similar, places_like
GET /v1/places
pins for a map
POST /v1/chat
RAG over an owner
GET /v1/r/{url}
LLM-ready text
Enriching one media item
not yet enriched
Load and hash
sha256, mime, EXIF
dedup-check
hash enriched before?
Already enriched
link the run, stop
persist-bytes
R2 key by sha256, media row
describe
Gemini, image or video
embed
Vertex, best effort
persist-segments
windows: FTS rows, vectors
persist-enrichment
enrichment JSON, vector
resolve places
GPS, or agentic if asked
Each box is a checkpointed step. Steps hand on R2 keys, never bytes.
Pinning a place
matches, each with a gate
pins only
Agentic resolver
model searches Places
Extract and geocode
fallback, and non-images
Video places
backfill-video-places.ts
enrichments.places
gate: auto, review or hidden
a pin is auto, with a location
places_fts
search by words
segment_places
moments to windows
PLACE_VECTORS
POST /v1/places/index
GET /v1/places
pins for a map
Finding places for an answer
vector
words
three rankings
Retrieved windows
each post's best first
The question
text and its vector
segment_places
places in those windows
rankByMeaning
reorders, never adds
places_fts
name, address, what was said
Fuse by rank
RRF, keeps the top 40
Attach to posts
plus up to 8 posts that did not rank