Find answers from the community

Updated 2 months ago

hi guys does LlamaIndex uses embeddings

hi guys, does LlamaIndex uses embeddings at the underlying level to send the context? I'm trying to figure out how LlamaIndex actually works.
L
Q
4 comments
Yes! If you use GPTSimpleVectorIndex, you input documents get broken into "chunks", and each chunk is embedded.

Then, at query time, the closest matching chunks are sent to the LLM to help generate a response

I recommend checking out the docs, especially this page: https://gpt-index.readthedocs.io/en/latest/guides/index_guide.html
@Logan M Thank you for the reply. I can imagine how that works. But a question is, what if the query is 'summarize the whole book'? All chunk vectors are related to this query...but we cannot send all the context to the prompt.
When you need to summarize, you usually get the best performance using a list index, and response_mode="tree_summarize"

This way, every node is summarized in a sort of tree fashion. It works quite well usually πŸ‘Œ
That's great. Thanks~
Add a reply
Sign up and join the conversation on Discord