Tutorial #2: OpenAI Vector Embeddings and Pinecone for Retrieval-Augmented Generation

preview_player
Показать описание
LLMs like ChatGPT are known to hallucinate. If we can ground the LLM with an external memory (e.g. document, pdf), this may let the LLM generate more reliable outputs. We can also augment the output with the reference link (like Bing Search)!

For this tutorial, we use OpenAI Embeddings, Tokenizer (tiktoken), PineCone.

Disclaimer: Please do not openly show your OpenAI / PineCone API key like me. I am only showing it for educational purposes and have deleted the exposed key.

~~~~~~~~~~~~~~~~~~~

References:

~~~~~~~~~~~~~~~~~~

0:00 Introduction
0:48 Prepare Documents for Loading
4:15 Generate Embeddings in Chunks
9:40 Retrieval-Augmented Generation
16:04 Conclusion

~~~~~~~~~~~~~~~~~~~

AI and ML enthusiast. Likes to think about the essences behind breakthroughs of AI and explain it in a simple and relatable way. Also, I am an avid game creator.

Рекомендации по теме
Комментарии
Автор

Do let me know if you have any clarifications here!

johntanchongmin
Автор

Great John!!!! I calculated similarity on the way you shared, but also used Spacy similarity to see what would return, but it gives me VERY different results. Do you have any insights or guidance on what is the right one?

leoccleao