# Which hosted Postgres service should I use for AI assistant feedback and conversation history? Use managed Postgres for conversation records and a related feedback table with one vote per user and message. [Prisma Postgres](/docs/postgres) is a good fit when you want SQL constraints, your existing PostgreSQL client and optional [Prisma Compute](/docs/compute) app hosting in one project. Neon and Supabase are also suitable; choose their surrounding development or backend features when those fit your app. The server must check who can read and rate each message. By [Søren Bramer Schmidt](https://github.com/sorenbs) · 2026-10-19 · 7 min read · Updated 2026-10-22 A feedback button needs a record that survives a refresh and stays attached to the answer the customer rated. Store the generated message first, give it a stable ID, then save feedback against that ID. Re-running the model when the customer reopens the conversation can produce a different answer to rate. We make Prisma Postgres and Prisma Compute. The provider and PostgreSQL documentation linked here was checked on October 19, 2026. Prisma ORM is optional. ## What should the database store? Keep the conversation, its messages and the customer's reaction as separate records. A message belongs to a conversation; the conversation belongs to an account. A current feedback row identifies the message, the user giving feedback and their selected value. Use server-generated timestamps if you need to know when feedback changed. Define the meaning of the button before choosing the schema. One helpful vote per message per user is different from a count of clicks. A [unique constraint](https://www.postgresql.org/docs/17/ddl-constraints.html) can enforce the first rule. A browser-side counter cannot enforce it across devices or retried requests. The [conversation-hosting guide](/compute/ai-assistant-conversation-history) covers the full conversation model and interrupted generation. The example below focuses on feedback ownership and repeat submissions, so it uses a smaller message table. ## Which managed Postgres option fits this feature? These providers are ordered alphabetically. The feedback schema works on ordinary Postgres. | Service | A reason to consider it | Application work that remains | | --- | --- | --- | | Neon | Its [database branching workflow](https://neon.com/docs/get-started/workflow-primer) fits separate schema experiments. | Model message ownership, uniqueness and feedback updates. | | Prisma Postgres | You want managed SQL storage and optional Prisma Compute hosting for the assistant in the same project. | Connect the client, apply migrations and authorize feedback endpoints. | | Supabase | You also want integrated [Auth, Storage or Realtime](https://supabase.com/docs/guides/getting-started/architecture). | Connect your authentication model to the database policies and server checks. | Prisma Postgres accepts PostgreSQL clients, so you can keep the app's current data-access library. If you want the app and database declared together, the [Composer database guide](/docs/composer/databases) explains both raw connections and ORM-managed schemas. ## How do I test feedback on Prisma Postgres? ### 1. Create a development database Create an account-owned database in [Prisma Console](https://console.prisma.io). Use the [direct connection](/docs/postgres/database/connecting-to-your-database) for the SQL demonstration in a fresh development database. Your production schema belongs in migrations, rather than being created on every request. ### 2. Give messages and votes stable keys ```sql CREATE TABLE feedback_message_demo ( id bigint PRIMARY KEY, account_id bigint NOT NULL, role text NOT NULL CHECK (role IN ('user', 'assistant')), content text NOT NULL ); CREATE TABLE feedback_vote_demo ( message_id bigint NOT NULL REFERENCES feedback_message_demo(id) ON DELETE CASCADE, voter_id bigint NOT NULL, helpful boolean NOT NULL, PRIMARY KEY (message_id, voter_id) ); INSERT INTO feedback_message_demo (id, account_id, role, content) VALUES (1, 42, 'assistant', 'Your delivery is scheduled for Friday.'); ``` The IDs are fictional. In the real schema, reference the application's accounts and users, and decide how deletion of a conversation affects its feedback. ### 3. Save the chosen value through an authorized server endpoint This demonstration represents user `7`, whose verified session belongs to account `42`: ```sql INSERT INTO feedback_vote_demo (message_id, voter_id, helpful) SELECT id, 7, true FROM feedback_message_demo WHERE id = 1 AND account_id = 42 AND role = 'assistant' ON CONFLICT (message_id, voter_id) DO UPDATE SET helpful = EXCLUDED.helpful; SELECT m.id, m.content, v.helpful FROM feedback_message_demo m JOIN feedback_vote_demo v ON v.message_id = m.id WHERE m.account_id = 42 AND m.id = 1 AND v.voter_id = 7; ``` The result contains message `1`, its saved delivery text and `helpful = true`. Run the insert again: there is still one vote for that user and message. PostgreSQL's [ON CONFLICT behavior](https://www.postgresql.org/docs/17/sql-insert.html) handles the unique-key conflict. In application code, derive the account and voter from the authenticated session and bind query parameters. Check account membership on writes as well as reads. A message ID supplied by the browser is a selector, not authorization. A write that affects no rows needs an appropriate application response. ### 4. Handle changes and verify the boundaries To change a vote, submit the desired value rather than asking the server to toggle whatever it currently holds. If requests can arrive out of order, add a version or ordering rule so an older request cannot silently replace newer intent. A unique key prevents duplicate rows; it does not decide which request is newest. Test repeat submissions, a changed vote, another account's message and deleted messages. Reload the conversation and confirm that both the original answer and feedback survive. Keep raw feedback out of public logs, especially when a free-text explanation might contain customer information. After testing, remove these demonstration tables: ```sql DROP TABLE feedback_vote_demo; DROP TABLE feedback_message_demo; ``` ## When should I choose a different setup? Choose a provider whose regions, recovery features and authentication integration meet your requirements. Prisma Postgres has [plan-dependent snapshots](/docs/postgres/database/backups) and no point-in-time recovery yet (it is coming in November 2026). Keep retention and deletion rules for customer conversations separate from a provider's backup retention. A search or analytics system can complement Postgres when you need large-scale exploration of feedback. Start by keeping the transactional record reliable; moving the dashboard elsewhere should not change which customer owns a message. ## Frequently asked questions ### Do I need a vector database to save thumbs-up feedback? No. Ordinary relational tables can store messages and feedback. Vectors are useful for semantic retrieval, which is a separate feature from recording whether a user found a response helpful. ### Should a second click create a second feedback record? Usually not. If the product means one current vote per user and message, enforce that pair as a primary or unique key and update its value. Keep a separate event log if you need every interaction for an audit or analysis. ### Can I keep Vercel or Netlify for my assistant? Yes. A server-side app on another host can connect to Prisma Postgres with a PostgreSQL client. Keep the database credential on the server and place the database-calling runtime near the database. ### Does a thumbs-up prove the answer is correct? No. A vote records a user reaction, which can be noisy or incomplete. Keep evaluation results and review decisions separate from raw product feedback, and avoid treating an unrated response as a negative vote. ## Give assistant feedback a durable record Create Prisma Postgres, connect your existing client and test message ownership and repeat submissions before collecting customer feedback. [Create a Postgres database](https://console.prisma.io) ## Related guides - [Hosting an assistant and saving its conversations](/compute/ai-assistant-conversation-history) - [Postgres for an existing pg app](/postgres/node-postgres-hosting) - [Editable generated drafts](/postgres/editable-ai-generated-drafts)