Understanding Embeddings in LLMs (ft LlamaIndex + Chroma db)

preview_player
Показать описание
We do a deep dive into one of the most important pieces of LLMs (large language models, like GPT-4, Alpaca, Llama etc): EMBEDDINGS! :) In every langchain or llamaindex tutorial you'll come across this idea, but they can feel quite "rushed" or opaque, so this video presents a deeper look into what embeddings really are, and the role it plays in a world dominated by large language models like GPT.

In Chroma's own words, Embeddings are "the A.I-native way to represent any kind of data, making them the perfect fit for working with all kinds of A.I-powered tools and algorithms. They can represent text, images, and soon audio and video. There are many options for creating embeddings, whether locally using an installed library, or by calling an API".

LlamaIndex (GPT Index) is a project that provides a central interface to connect your LLM’s with external data.

LangChain is a fantastic tool for developers looking to build AI systems using the variety of LLMs (large language models, like GPT-4, Alpaca, Llama etc), as it helps unify and standardize the developer experience in text embeddings, vector stores / databases (like Chroma), and chaining it for downstream applications through agents.

Mentioned in the video:
- Chroma Embeddings database (vector store):

- Watch PART 2 of the LangChain / LLM series:

- Watch PART 3 of the LangChain / LLM series
LangChain + HuggingFace's Inference API (no OpenAI credits required!)

- HuggingFace's Sentence-Transformer model

All the code for the LLM (large language models) series featuring GPT-3, ChatGPT, LangChain, LlamaIndex and more are on my github repository so go and ⭐ star or 🍴 fork it. Happy Coding!
Рекомендации по теме
Комментарии
Автор

I am in the office laptop and here we are dicussing about harry potter first kiss

ShashankSharma-kghu
Автор

This was so well explained, I was learning so much that all the time I kept hovering the video to see if it's not ending yet. It's been ages since I've watched a entire 30min video on 1x speed. Congrats!

leonardogrig
Автор

Very few are as knowledgeable and thorough as you on this topic. Thank you

kingofaces
Автор

Great video. And no they are NEVER too short. Your detail and extra insights is good 🎉

AI-LLM
Автор

Great video. It covered several items in detail that I've been wondering about, so thank you. I struggled some to keep up with your fast pace, but if you'd gone slower the video would have been twice as long and I probably wouldn't have started watching! 😀

I work for a government organization, and I'm trying to figure out how to index our large corpus of documents. I need to come up with a schema for a vector store, and will probably follow the State's cataloging format for the administrative codes, which follows the "Title-Chapter-Section" format, with each Section being a single document, which can then be broken up into Subsection, Paragraph, and Sentence, with appropriate metadata at each layer. Your video helped me understand how to do that, or at least get started, so thank you.

jdray
Автор

Seeing videos after video all things flying off the brain 🧠🧠🧠🧠🧠

SMCGPRA
Автор

In this example, When we are doing method. Is it going to call OpenAI embedding APIs to create embeddings? Or only during query part it is going to call open AI. I am little bit confused with how it works from cost perspective.

aniketkalamkar
Автор

Legitimately finally a very well paced and yet easy to follow guide! Subscribed, please do lots more and thank you!

pabloandres
Автор

Fantastic explanation, keep up the great work Samuel.

SamAnuRhea
Автор

When I try loading in GPTSimpleVectorIndex, it goesn't get found and it isn't styled which indicates that it is not importaed

Bubbalubagus
Автор

Hey Samuel, can i ask, is llama_index only usable for GPT with openai? It looks like llama_index is LLM independent, but all the examples i seen in internet seems to only use llama_index with openai with modules like GPTxxxx, and it also seems like i need openai key to access the modules in llama_index. If that is the case, is there any alternative with other LLM?

unknownpig
Автор

Thanks for the content Bro. UVloop is not supporting Windows. Do you have any workaround?

larst
Автор

Thank you for the succinct explanations!
One question - I am currently using a GPTVectorStoreIndex for my simple use case of indexing a few simple docs. I persist the index to local storage, then in a separate scipt, I load it, and set it as my query engine.

Does this mean that my embeddings go to OpenAI every time I query the query engine? If so, does this send ALL of the contents of all of my docs in embedding format? Or is there some "smarts" that only sends the relevant bits, like in your examples? Just trying to understand if that behaviour is exclusive to Chroma db.


Thanks again!

bongimusprime
Автор

how can i store json data? like dataset from the datasets package, like for pinecone i saw in colab example they had stored the youtube-transcriptions dataset

M-ABDULLAH-AZIZ
Автор

why my llama_index does not have GPTChromaIndex in it? Im using colab

fragileandweak
Автор

Thanks a great video on Embeddings. Many times you mentioned that you do not want to spend a lot of money. I am not sure, why you said that as creating of embeddings, storing them in db and querying is done using open source. Right ? So where is the question of spending money here. Are we sending some data to ChatGPT model inernally ?

kevinin
Автор

You explained that really well! It was easy to understand

piyakornmunegan
Автор

Am I right in saying that vector databases just allow you to query them using natural language (by using similarity scores based on the dot product of the embeddings), but have nothing to do with LLMs? or is the LLM somehow being used to generate the embeddings? (perhaps via an encoder?).

And I also don't understand how pinecone claims that it gives "Long-term Memory for AI", isn't it more like "AI powered search"? Given an LLM today like LLaMA I'm not sure how I could empower it and make it do things that it otherwise could not using vector databases.

STorz
Автор

Nice work on this tutorial, it really helped clear up all the questions I had.

sanjayplays
Автор

Hi Sam,
I have a doubt,
Which embedding is the best?
(OpenAi Embeddings or Hugging face embeddings)

kajasheriff