Loading lesson…
Level 1 · Apprentice0 XP
Store embeddings and find the nearest ones fast, even among millions.
Step 1 / 5
ProblemWith 5 million chunks, comparing a question's embedding with every stored embedding takes seconds per question.
← → step
Before this: Chunking and embedding documents well
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Run PostgreSQL with pgvector in Docker. Store embeddings for your chunks with an HNSW index, and write a query that filters by team and returns the 8 nearest chunks. Time it with and without the index.