3 ms·
Thank you for your insights. AS someone who is absolutely new to this, could you clarify the role of embedding in RAG? Do I need to use OpenAI's OpenAI embeddi
by manishsharan 3y ago
Thank you for your insights. AS someone who is absolutely new to this, could you clarify the role of embedding in RAG? Do I need to use OpenAI's OpenAI embedding model (text-embedding-ada-002) always to use for embeddings ?
Supposing I do use text-embedding-ada-002 model and store the index in a vector database, will I be able use these for RAG with other LLMs such as Claude Haiku etc. ? Or does each LLM have its own text embedding model ?
- esafak 3y agoThe role of the embedding is enabling similarity search. You need to use the same embedding for indexing and retrieval. Beyond that, you want to select an appropriate embedding; optimized for indexing the kind of content you have.
- 0x008 3y agoThe Embedding model is only involved in the "R" part (retrieval). You need to use the same embedding model for indexing and retrieval, though, that is important. The Embedding model is independent of the actual LLM used in generation. You can use any embedding model with any LLM. In fact ada is only one option and there are lot of really good embedding models, also ones you can easily run local, or ones which are a lot of better than ada, readily available. ada is not the best choice in all cases.