← Work

Case study 02

HindSite

Semantic search over the pages you actually read, with a two-stage retrieval pipeline.

Role
Personal project
Period
2026
Stack
FastAPIPostgreSQLpgvectorCohere embeddingsCross-encoder rerankingChrome extension

Problem

Browser history search matches titles and URLs, but people remember content: "that ML article from last week". HindSite indexes the pages you actually read and lets you search them in natural language.

Architecture

HindSite ArchitectureA Chrome extension measures reading time and scroll depth and sends only pages that were actually read to a FastAPI service, which embeds them with Cohere and stores them in PostgreSQL with pgvector. A query router either runs two-stage retrieval (pgvector shortlist, then cross-encoder rerank) or switches to an open tab directly.CaptureIndexQueryreads01Chrome extensionreading time, scroll depth02Engagement filterindex only pages actuallyread03FastAPI ingest04Cohere embeddings1024-dimensional05PostgreSQL + pgvector06Query routersemantic search or livetab-switch07Stage 1: similaritypgvector shortlist08Stage 2: rerankcross-encoder over theshortlist09Result or tab switchvoice or text
  • external
  • compute
  • store
  • llm
  • check
  • ui
  1. Capture

    01

    Chrome extension

    reading time, scroll depth

  2. 02

    Engagement filter

    index only pages actually read

  3. Index

    03

    FastAPI ingest

  4. 04

    Cohere embeddings

    1024-dimensional

  5. 05

    PostgreSQL + pgvector

    reads

  6. Query

    06

    Query router

    semantic search or live tab-switch

    ↺ open-tab path

  7. 07

    Stage 1: similarity

    pgvector shortlist

  8. 08

    Stage 2: rerank

    cross-encoder over the shortlist

  9. 09

    Result or tab switch

    voice or text

Architecture as built. Dashed lines are feedback paths.

Key decisions

01

Index what was read, not what was visited

The extension tracks reading time and scroll depth and only sends pages the user actually engaged with, which keeps noise out of the index.

02

Two stages: recall, then precision

A bi-encoder shortlist from pgvector over 1024-dimensional Cohere embeddings is re-scored by a cross-encoder, so the more expensive model only sees a handful of candidates.

03

Route before retrieving

A query router decides whether a request is a semantic search or a live tab switch, so switching to an open tab never has to touch the vector index.