Displaying Related Content Using Semantic Similarity
summary
Rebuilds Princeton.edu’s “Related Stories” by embedding 10,000 news articles with OpenAI text-embedding-3, comparing vectors via cosine similarity, and initially brute‑forcing scores in PHP (slow) before moving vectors to Pinecone for instant queries. Embedding all article body text generally gives better matches; embedding cost is tiny (~$1 for 10k). Adds Cohere re‑ranking experiments but recommends MMR (diversify top 50 then select) plus editorial manual curation and periodic precompute jobs.
AI-written summary · about
chapters (21)
- 0:00Introduction and background
- 1:05Princeton website and Drupal
- 3:36Lexical vs semantic search
- 8:11How semantic search works
- 12:27Applying semantic search to related content
- 13:30Generating embeddings and models
- 16:21Storing and searching vectors
- 18:07Improving results with full vs partial body
- 23:02Date cutoffs and bias in results
- 25:58Hybrid search and lexical matching
- 29:05Re-ranking and diversification strategies
- 35:48Production setup and vector databases
- 36:49Real-time embeddings and caching
- 38:56Editorial curation and backfill
- 40:02Evaluating performance and user feedback
- 42:55Q&A on intent and audience
- 45:01Comparison with legacy solutions
- 46:28Semantic search vs traditional search
- 47:55Testing on search vs related content
- 49:18Bubble effect in recommendations
- 50:42Future improvements and limitations
