promptable
promptable copied to clipboard
First draft: supabase(pg vector) and promptable example to chat with docs
Hey @cfortuner it's Mayo here. As discussed, here's the draft of the supabase x promptable example starter kit to "chat with docs." I haven't fully implemented the logic or frontend UI yet, but I've laid out the architecture and config for us to discuss as I make changes.
The current architecture requires first running two scripts scrape
and embed
, to extract text from a given url (docs website) then embed those docs into supabase using pg vectors
.
Afterwards, when there is a question asked on the frontend, it is sent to api/search-docs
where the user's request is embedded and then supabase performs a similarity search to retrieve similar docs.
At this point we can either choose to display these similar docs or send them to openai as context to generate a final generated answer.
Let me know your thoughts on the example usecase, current layout and what role you'd like promptable to play in this process. For example, if you'd prefer we load existing docs on disk instead of scraping a website etc.