feat(docs): add AI apps page and add framework guide referenceso llms.txt#7885
feat(docs): add AI apps page and add framework guide referenceso llms.txt#7885aidankmcalister wants to merge 4 commits intomainfrom
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🍈 Lychee Link Check Report6 links: ✅ All links are working!Full Statistics Table
|
WalkthroughAdds 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. ChangesPostgres AI Documentation & Navigation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdxapps/docs/content/docs/postgres/meta.jsonapps/docs/src/lib/llms.ts
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx
There was a problem hiding this comment.
♻️ Duplicate comments (1)
apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx (1)
23-28:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winReplace invalid pgvector Prisma Client filter example with raw SQL/TypedSQL.
This snippet still uses
similarityin afindManywhereclause, 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 keepcacheStrategyon 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
📒 Files selected for processing (1)
apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx
Adds
best-postgres-for-ai-apps.mdxto 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 postgresmeta.jsonnav. Adds Next.js, SvelteKit, Nuxt, and Hono framework guide links to commonQueries inllms.tsso they surface in the generatedllms.txtwithout creating redundant pages.Linear: DR-8348
Linear: DR-8356
Summary by CodeRabbit