noob saibot
noob saibot3w ago

I'm not sure how to integrate AI with my convex app

This is more of a need for advice or guidance I've built my application (react-native and next) with a convex backend. Now I would like to offer my stakeholders an AI chat interface where they can query the application data with natural language. For example a query could: "Give me the average amount spent by users in the last 4 months". I'm not sure how I can go about and "integrate" AI with my convex application. This is obviously perhaps a very broad question. I'm looking for top level suggestions on where to start to look for. I've read some articles from here https://www.convex.dev/can-do/rag, not sure if this is where I should start. My main difficulty is perhaps: how to go about and "expose" my database so that "ai entities" can access and query them at runtime (be it LLMs or AI Agents...etc) I saw the new "Convex MCP Server" announcement and I've been ready about MCP in general. From what I understand, it seems like mcp servers are meant to be used with "development" tools such as "cursor". Can they also be used at runtime and "connect" with LLMs or AI Agents? I'm learning to navigate into the new AI landscape and things may still be a little confusing especially with the onslaught of innovations. Any help, advice, guidance will be greatly appreciated.
2 Replies
Convex Bot
Convex Bot3w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
erquhart
erquhart3w ago
This sums up the use case pretty well, using OpenAI Assistants specifically. It covers ingesting the data from your database to the assistant and setting up a chatbot that can answer questions based on the data: https://stack.convex.dev/ai-chat-using-openai-assistants-api
Build AI Chat with OpenAI's Assistants API
On November 7th OpenAI released its Assistants API, enabling chat bot with context retrieval implementations without needing a messages or vector data...

Did you find this page helpful?