Skip to content

feat(docs): add AI apps page and add framework guide referenceso llms.txt#7885

Open
aidankmcalister wants to merge 4 commits intomainfrom
feat/best-postgres-for-ai-apps-page
Open

feat(docs): add AI apps page and add framework guide referenceso llms.txt#7885
aidankmcalister wants to merge 4 commits intomainfrom
feat/best-postgres-for-ai-apps-page

Conversation

@aidankmcalister
Copy link
Copy Markdown
Member

@aidankmcalister aidankmcalister commented May 8, 2026

Adds best-postgres-for-ai-apps.mdx to be concise and cover the key signals (pooling, RAG caching, edge driver, pgvector, MCP server) with a corrected competitive comparison table. Adds it to the postgres meta.json nav. Adds Next.js, SvelteKit, Nuxt, and Hono framework guide links to commonQueries in llms.ts so they surface in the generated llms.txt without creating redundant pages.

Linear: DR-8348
Linear: DR-8356

Summary by CodeRabbit

  • Documentation
    • Added guide "Best Postgres for AI apps" covering connection pooling for bursty serverless inference, query caching for RAG pipelines, edge-native connectivity, vector embeddings support, and agent workflow options
    • Added the new page to Postgres docs navigation
    • Added integration examples and quick-start links for Next.js, SvelteKit, Nuxt, and Hono on Cloudflare Workers

…o llms.txt

Rewrites best-postgres-for-ai-apps.mdx to be concise and cover the
key signals (pooling, RAG caching, edge driver, pgvector, MCP server)
with a corrected competitive comparison table. Adds it to the postgres
meta.json nav. Adds Next.js, SvelteKit, Nuxt, and Hono framework guide
links to commonQueries in llms.ts so they surface in the generated
llms.txt without creating redundant pages.

Linear: DR-8348
Linear: DR-8356
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment May 8, 2026 2:56pm
docs Ready Ready Preview, Comment May 8, 2026 2:56pm
eclipse Ready Ready Preview, Comment May 8, 2026 2:56pm
site Ready Ready Preview, Comment May 8, 2026 2:56pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🍈 Lychee Link Check Report

6 links: ✅ 0 OK | 🚫 0 errors | 🔀 1 redirects | 👻 5 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 0
🔀 Redirected 1
👻 Excluded 5
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Review Change Stack

Walkthrough

Adds a new MDX docs page describing Prisma Postgres for AI workloads (pooling, query caching, edge driver, pgvector, MCP server), registers the page in Postgres docs metadata, and adds four framework-specific setup links to the docs navigation.

Changes

Postgres AI Documentation & Navigation

Layer / File(s) Summary
Documentation Registration
apps/docs/content/docs/postgres/meta.json
New page best-postgres-for-ai-apps is registered under the Introduction section in the Postgres docs metadata.
Page Content
apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx
Comprehensive documentation covering frontmatter, opening narrative, built-in connection pooling, query caching for RAG (with TypeScript example), edge-native connectivity via @prisma/ppg, pgvector embeddings support, Prisma MCP server for agent workflows, a Prisma Postgres vs. Neon vs. Supabase comparison table, a short note, and get-started instructions with links.
Navigation Integration
apps/docs/src/lib/llms.ts
Four new entries are added to the commonQueries array linking to Prisma Postgres setup guides for Next.js, SvelteKit, Nuxt, and Hono on Cloudflare Workers.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references adding an AI apps page and framework guide references, which align with the main changes: a new best-postgres-for-ai-apps documentation page and llms.ts updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Timed out fetching pipeline failures after 30000ms


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx`:
- Around line 70-72: Replace the fenced code block language tag from "bash" to
"npm" so the single fenced block uses npm (change the block starting with
```bash title="Terminal" and the subsequent line "npm create prisma@latest" to a
single ```npm fenced block) to allow docs tooling to auto-generate bun/yarn/pnpm
tabs; update the fence marker only (keep the title="Terminal" and command text
unchanged).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3a72716d-8a96-4d2d-9e25-bee18373b8cc

📥 Commits

Reviewing files that changed from the base of the PR and between 7fe85cd and da4ed95.

📒 Files selected for processing (3)
  • apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx
  • apps/docs/content/docs/postgres/meta.json
  • apps/docs/src/lib/llms.ts

Comment thread apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx Outdated
@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented May 8, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - May 8, 2026, 3:03 PM

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx`:
- Around line 23-28: The example uses an invalid Prisma Client where filter
(prisma.documentChunk.findMany with similarity: { gte: 0.8 }) — update the
example and text to show that pgvector similarity must be done with raw
SQL/TypedSQL rather than a Prisma where filter: replace the
prisma.documentChunk.findMany call with a prisma.$queryRaw (or TypedSQL) example
that selects from "DocumentChunk", computes distance with "embedding" <=>
${queryEmbedding}::vector, filters by documentId, orders by the vector distance,
and limits results; keep the mention that cacheStrategy (e.g., cacheStrategy: {
ttl, swr }) is valid and can be applied to $queryRaw via Prisma Accelerate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f8dfad2b-50b8-4cf2-96c2-32a1e1bc48f2

📥 Commits

Reviewing files that changed from the base of the PR and between da4ed95 and 9776d24.

📒 Files selected for processing (1)
  • apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx

Comment thread apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx (1)

23-28: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Replace invalid pgvector Prisma Client filter example with raw SQL/TypedSQL.

This snippet still uses similarity in a findMany where clause, which is not a valid Prisma Client operator for pgvector; readers copying this will hit runtime/API errors. Please switch the example to $queryRaw (or TypedSQL) with vector distance ordering, and keep cacheStrategy on that query.

In official Prisma docs (latest), can pgvector similarity be queried via `prisma.model.findMany({ where: ... })` operators, or must it be done with `$queryRaw`/TypedSQL? Please provide the exact documented pattern and a citation URL.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx` around lines
23 - 28, The current example uses prisma.documentChunk.findMany with a
non-existent similarity filter; replace it with a raw SQL (prisma.$queryRaw) or
TypedSQL example that performs a vector distance/ordering (e.g., ORDER BY
embedding <-> query_embedding LIMIT ...) and retains the cacheStrategy option on
the query call; locate the prisma.documentChunk.findMany usage and the
similarity token and swap it for a prisma.$queryRaw (or TypedSQL) call that
executes a SELECT ... FROM document_chunks WHERE document_id = $1 ORDER BY
embedding <-> $2 DESC (or ASC depending on distance function) LIMIT ... and
ensure cacheStrategy: { ttl: 60, swr: 30 } is passed on the same query
invocation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx`:
- Around line 23-28: The current example uses prisma.documentChunk.findMany with
a non-existent similarity filter; replace it with a raw SQL (prisma.$queryRaw)
or TypedSQL example that performs a vector distance/ordering (e.g., ORDER BY
embedding <-> query_embedding LIMIT ...) and retains the cacheStrategy option on
the query call; locate the prisma.documentChunk.findMany usage and the
similarity token and swap it for a prisma.$queryRaw (or TypedSQL) call that
executes a SELECT ... FROM document_chunks WHERE document_id = $1 ORDER BY
embedding <-> $2 DESC (or ASC depending on distance function) LIMIT ... and
ensure cacheStrategy: { ttl: 60, swr: 30 } is passed on the same query
invocation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d076e548-00cd-404a-8e3c-1fbc51495cb0

📥 Commits

Reviewing files that changed from the base of the PR and between 9776d24 and 06807bb.

📒 Files selected for processing (1)
  • apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants