Lesson Complete!
Generate Embeddings
What you did in this lesson
- Learned that embeddings are vectors where similar text points in the same direction
- Wrote
configure_gemini()— authenticates with the Gemini API - Wrote
embed_text()— converts one chunk into a 768-float vector - Wrote
embed_all_chunks()— produces a vector for every chunk
What comes next
You have a list of chunks and a matching list of vectors. In Lesson 4, you will write the search function that finds which chunks are most relevant to a given question.