Embeddings and vector databases #172
-
I'm super excited to discover this package. Big thanks to all the contributors! I'm currently researching how to develop a Retrieval-Augmented Generation (RAG) chatbot. I've come across several frameworks and platforms for this type of AI application, and most of them require a solid Python background. For a RAG application, we need to set up a company knowledge base to retrieve relevant 'context' to send along to LLMs, ensuring that the responses are generated based on these 'contexts'. I've quickly scanned the Prism documentation and noticed that the 'Embeddings' and vector databases seem a bit underdeveloped right now. I'm not quite sure what to do with embeddings in Prism and feel like there might be a gap in the Prism ecosystem. Should I submit the embeddings to a vector database for semantic or hybrid searching? If so, are there any additional Laravel packages I can leverage? I'm also curious if there are any frontend templates I can use with Laravel/Prism for the RAG chatbot, or if I need to develop the frontend from scratch? Thanks for your guidance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Prism generates the embeddings. You could store and search against them with something like pgvector. I think there are a few packages that make working with pgvector in Laravel easier. You could then either pull back search results and include them in your prompt, or use Tools which prism supports. Prism doesn't have a chat UI but there are a few open source OpenAI API compatible front ends. You could pair one up with Prism Server. |
Beta Was this translation helpful? Give feedback.
-
I created a pgvector driver for Laravel Scout for this purpose |
Beta Was this translation helpful? Give feedback.
Prism generates the embeddings.
You could store and search against them with something like pgvector. I think there are a few packages that make working with pgvector in Laravel easier.
You could then either pull back search results and include them in your prompt, or use Tools which prism supports.
Prism doesn't have a chat UI but there are a few open source OpenAI API compatible front ends. You could pair one up with Prism Server.