Supabase AI app with semantic search
Postgres with pgvector for embeddings, the AI SDK for model calls, and prompt caching to keep costs down.
作者:Promptu
最终成果
An app that stores embeddings in Supabase Postgres (pgvector), answers questions with the AI SDK, and reuses cached prompt prefixes. The prompt helps explain slow queries as the data grows.
搭建顺序
- 1MCP 服务器Database access for your agentSupabase MCP server
Connect agents to your Supabase projects: schema, SQL, logs and docs. Scope it to one project and read-only when you can.
- 2技术Embeddingspgvector
Open-source vector similarity search for Postgres. Keep embeddings next to your data, with no separate vector database.
CREATE EXTENSION vector;
- 3技术Model callsAI SDK
TypeScript toolkit for building AI features (streaming, tool calling, structured output) across model providers.
npm install ai
- 4技术CostPrompt caching (Claude API)
Reuse a processed prompt prefix (tools, system, messages) to cut cost and latency on repeated context.
- 5提示词PerformanceWhy is this Postgres query slow?
运行命令前请先检查。Promptu 绝不会在你的设备上运行代码。

