Have you met Ada? Word Embeddings with Laravel
summary
Shows a concrete pipeline: use the OpenAI embeddings endpoint (Ada family) to turn text into 1,1536‑length vectors, observe the 8,191 token per‑request limit, and note a 12,000‑word page tokenizes to ~30,000 tokens and cost $0.0029 to embed. Stores vectors in Postgres with PG Vector, exposes a hasEmbedding trait on models, runs nearest‑neighbor cosine searches, and optionally sends the retrieved context to GPT‑3.5 Turbo. Demo site "Ed love Institute for digital wildlife" returns plausible answers.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:07Speaker background
- 2:33Word embeddings matter
- 6:51Vectors in embeddings
- 8:42Embedding models create vectors
- 13:39PHP text functions fall short
- 15:27Python for real embeddings
- 18:43Ada and OpenAI embeddings
- 21:07Tokenization and limits
- 24:01PostgreSQL with PGVector
- 26:08Demo: Ada Laravel package
- 29:41Semantic search in practice
- 33:41Next steps and ideas
- 34:43Embeddings make apps smarter
- 35:03Q&A: Multiple meanings
- 36:55Q&A: Is a pretzel a cookie?
related talks
01h 03mWhat comes after ChatGPT? Vector Databases - the Simple and powerful future of ML?
27mMachine Learning for Advanced AI Search
28m"Embeddings: How Computers Learned to Read"
48mEnter the Brave New World of GenAI with Vector Search
27mData with Purpose: The Power of Embeddings
31mText and Code Embeddings
50mWhat Comes After ChatGPT? Vector Databases - the Simple & Powerful Future of ML?
50mA fun and absurd introduction to Vector Databases
