Plugin details
This plugin allows you to add an AI-powered question and answer feature to your Bubble app. You upload content (plain text, PDFs, or images) and can then ask questions about it in plain English. The plugin uses OpenAI to generate the answers, but the underlying content stays in your Bubble database.
Specifically, it uses the gpt-4o-mini model to generate answers and the text-embedding-3-small model to handle the retrieval matching behind the scenes, both are extremely cheap to run. There's no built-in support for other AI providers, a deliberate decision made by me since the quality of a RAG answer is mostly driven by which content gets retrieved rather than which model writes the final response.
This is a pure Bubble RAG plugin, meaning all of the storage and retrieval happens inside your own Bubble database. There's no Pinecone or any other external vector storage in use.
You get to determine the database connection route. The plugin can be configured to run through Bubble's Data API for a fast client-side flow, or routed through your own Backend Workflows for more security and control. Both paths work for both uploading and asking, so you can mix and match depending on what each part of your app needs.
Features included:
- Upload from plain text, PDF files, or image files (images are described by OpenAI's vision model so they're searchable too).
- Streaming and non-streaming answer modes.
- Source attribution returned with every answer.
- Multi-turn conversation support, with follow-up questions automatically rewritten before retrieval so context carries between turns.
- Per-user data isolation via a namespace field.
- Filtering by source type at query time.
- Configurable chunk size, chunk overlap, embedding model, top K, similarity threshold, temperature, and system prompt.
- Token usage returned after every action.
- Debug mode with browser and server logs for troubleshooting.
There are 3 client-side actions (Ingest Content, Ask Question, Clear States) and 3 server-side actions (Generate Embedding, Find Matches, Generate Answer) which you can compose into your own backend workflows however you like.
A note on complexity: Under the hood this is a fairly involved plugin, but I've tried to design it so the setup stays as simple as possible. That said, you will need a basic understanding of what Bubble's Data API is and some experience configuring Backend Workflows for the data side of things, there's no way around that part.
Full step-by-step examples are on the instructions page.
You'll need your own OpenAI API key.
This plugin comes with full support from me. If anything's missing, broken, or unclear, drop me a message and I'll get it sorted.
Paul