Hi all,
I’ve just released a Bubble RAG AI plugin. This one is all about using your Bubble database to store data in an appropriate format for Retrieval-Augmented Generation.
It’s a relatively complex plugin, but I’ve tried to keep things as simple as possible, so it’s not too over whelming to setup.
What this plugin allows you to do, is to add an AI-powered question and answer feature to your app. You upload content (plain text, PDFs, or images) and then ask questions about that content using natural language. The plugin uses OpenAI to generate the answers, but the underlying content stays in a dedicated table within your Bubble database.
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 here, no data needs to leave your app in order for it to work.
Demo and Instructions:
https://demo-plugins-13689.bubbleapps.io/version-test/bubble_rag_ai
Plugin:
https://bubble.io/plugin/bubble-rag-1777452579038x327500723103989760
In the demo page, I’ve added a feature where you can upload some content to test with so you can see how it works with your own content rather than just the example content I’ve provided.
The three buttons at the bottom within the “Ingest your own content” area will allow you to upload plain text, PDF files (5 max) and a single image file so you can test it against.
What’s included
You get 6 actions in total within the plugin and a few states/events. Three of the actions are designed for client-side use, the other three for server-side use.
-
An Ingest Content action will take content you give it and store it for later retrieval. Images are passed through OpenAI’s vision model and described in forensic-level detail, making them searchable as text.
-
An Ask Question action that takes a question, finds the most relevant content from what’s been ingested, and returns an AI-generated answer with sources attributed.
The 3 server-side actions are optional and are used for a more secure setup where they run inside a Backend Workflow. You can read more about that in the instructions page.
Data API or Backend Workflow
You get to decide how the plugin talks to your database. It 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.
-
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 extensive browser and server logs for troubleshooting.
Additional Info
The plugin 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. You’ll need your own OpenAI API key though.
There’s no built-in support for other AI providers, and that’s a deliberate decision on my part. The quality of a RAG answer is mostly driven by which content gets retrieved rather than which model writes the final response.
I will be fully supporting the plugin, so any issues/questions etc, just shout.
Hopefully it’s another useful plugin!
Paul


