~/talk

Have you met Ada? Word Embeddings with Laravel

Talkat Laracon EU 2025 · 2025-02-03..02-04· [machine-learning, php]
links:none on file
slides:none on file

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

  1. 0:00Introduction
  2. 1:07Speaker background
  3. 2:33Word embeddings matter
  4. 6:51Vectors in embeddings
  5. 8:42Embedding models create vectors
  6. 13:39PHP text functions fall short
  7. 15:27Python for real embeddings
  8. 18:43Ada and OpenAI embeddings
  9. 21:07Tokenization and limits
  10. 24:01PostgreSQL with PGVector
  11. 26:08Demo: Ada Laravel package
  12. 29:41Semantic search in practice
  13. 33:41Next steps and ideas
  14. 34:43Embeddings make apps smarter
  15. 35:03Q&A: Multiple meanings
  16. 36:55Q&A: Is a pretzel a cookie?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.