Your PDF is already embedded and indexed in your assistant’s vector store
OpenAI manages context window, retrieval scoring, etc.
📦 Storage in Supabase
You store raw documents in Supabase Storage (rag-documents bucket)
Keep metadata in a table (e.g., file name, tags, upload date, owner)
🎯 Benefits of This Setup ✅ Easier updates — Just re-upload files or sync to OpenAI manually ✅ Audit & control — Files stay in your storage, not just OpenAI ✅ RLS and privacy — You can control who accesses which files ✅ Future migration path — You can eventually run your own embedding pipeline if needed
🔄 How the Flow Would Work
Upload a PDF → Supabase Storage (rag-documents)
(Optional) Sync to OpenAI Assistant (manually or via Edge Function)
In chat:
Your app uses the Assistant API
OpenAI handles the RAG using the vector store tied to the assistant
4. Store metadata, chats, and thread IDs in Supabase 5. Preview files or sources using Supabase Storage links
Justin Sheehan
Chief Journey Officer
Troy
what's the system prompt we're using for the Doden Bot?
To adjust the style, length, etc.
Troy Pastoral
AI Whisperer
Edited
Justin
const modePrompts = { coach: "You are a leadership coach. Provide guidance on leadership development, team management, and professional growth.", family: "You are a family advisor. Focus on family relationships, parenting, work-life balance, and family values.", investor: "You are an investment advisor. Provide insights on financial decisions, investment strategies, and business opportunities.", ambassador: "You are a diplomatic ambassador. Focus on relationship building, representation, and strategic communication.", faith: "You are a faith counselor. Provide guidance grounded in spiritual wisdom and values-based decision making." };
supabase/functions/pinecone-rag-chat/utils/openai.ts Shall we use Raunek's prompt?
🧠 RAG in OpenAI
✅ Easier updates — Just re-upload files or sync to OpenAI manually
✅ Audit & control — Files stay in your storage, not just OpenAI
✅ RLS and privacy — You can control who accesses which files
✅ Future migration path — You can eventually run your own embedding pipeline if needed
🔄 How the Flow Would Work
5. Preview files or sources using Supabase Storage links
To adjust the style, length, etc.
coach: "You are a leadership coach. Provide guidance on leadership development, team management, and professional growth.",
family: "You are a family advisor. Focus on family relationships, parenting, work-life balance, and family values.",
investor: "You are an investment advisor. Provide insights on financial decisions, investment strategies, and business opportunities.",
ambassador: "You are a diplomatic ambassador. Focus on relationship building, representation, and strategic communication.",
faith: "You are a faith counselor. Provide guidance grounded in spiritual wisdom and values-based decision making."
};
supabase/functions/pinecone-rag-chat/utils/openai.ts
Shall we use Raunek's prompt?
errors showing up on this account