Skip to content

docs: fix critical findings from the docs deep review - #485

Merged
g-despot merged 2 commits into
mainfrom
docs/fix-critical-review-findings
Jul 30, 2026
Merged

docs: fix critical findings from the docs deep review#485
g-despot merged 2 commits into
mainfrom
docs/fix-critical-review-findings

Conversation

@g-despot

Copy link
Copy Markdown
Contributor

What's being changed:

Fixes the 10 critical findings from a read-only audit of docs.weaviate.io (/weaviate, /deploy, /cloud), plus 5 High-tier findings that live in the same files, plus one stale include that contradicted a section fixed here.

Every claim below was checked against Weaviate core or the official client source rather than against the existing docs.

Wrong information a reader would act on

Page Problem
Cloud quickstart, quick tour Both told the reader to sign up for Cohere, while every client snippet required an OpenAI key. Prose and the curl tabs now say OpenAI, matching the CI-executed snippets; the Java and C# collection config were switched to OpenAI to match.
model-providers/google/generative gemini-2.5-flash was marked (default), but omitting the model makes the server fall back to a legacy PaLM model that this same page lists as deprecated. Marker removed, with a caution to always set the model explicitly.
model-providers/google/embeddings The Gemini vectorizer example failed server-side validation. Python passed a keyword the client does not accept (TypeError); Go named the wrong module (text2vec-aws inside the Google example); the TypeScript and Go AI Studio examples omitted the Gemini endpoint, so collection creation failed with projectId cannot be empty.
model-providers/anthropic/generative Documented default and model list were frozen at July 2024. Default corrected. The hand-maintained list is replaced with a link to Anthropic's model-names page, because the module has no allowlist and any hand-copied list will rot the same way.
search/similarity Every MMR example used a parameter and a factory that had both been renamed, so the snippets raised on use. All five call sites and the surrounding prose corrected.
deploy/configuration/env-vars OPERATIONAL_MODE documented values that the parser does not accept. An unrecognized value silently falls back to full read-write, so an operator following this page to restrict a node got a fully writable one. Values corrected and the silent fallback documented.
deploy/faqs/troubleshooting The "nodes won't join a cluster or maintain consensus" answer was a verbatim copy of the unrelated async-replication answer, sending operators down the wrong path during an outage. Rewritten around cluster membership and Raft. Also corrected the case of ASYNC_REPLICATION_DISABLED, which has no effect lowercased.

Snippets that could not run as printed

  • client-libraries/typescript/notes-best-practices — a line of pasted GitHub review UI text (Add commentMore actions) sat inside a JS block, making the snippet a SyntaxError on copy-paste. Also fixed invalid generic syntax (get < Article > "Article").
  • manage-objects/read-all-objects — the Go tab used markers that appear twice in the source, so the snippet component spliced two regions together and leaked raw import lines into non-compiling Go. Unique markers added. Two further Go tabs referenced markers that do not exist and rendered as empty code boxes; those tabs are removed rather than left blank.
  • _includes/feature-notes/v137-preview.mdx — removed a bullet claiming Python client support was unreleased. It has shipped, and this include renders directly into the MMR section corrected above, so it contradicted the working code beneath it.

Test coverage

tests/test_python.py::test_search_mmr is enabled by this PR. It was skipped on the stale grounds that MMR support was not yet in a released client. Support has shipped, and the snippet runs green against a live instance using self-provided vectors, so it needs no provider credentials. It now covers the corrected MMR examples, which is the fix most likely to regress silently.

Type of change:

  • Documentation content updates (non-breaking change to fix/update documentation )
  • Bug fix (non-breaking change to fixes an issue with the site)

How has this been tested?

  • Local build - the site works as expected when running yarn start

A full local build was not run. Stating that plainly rather than ticking the box. What was verified:

  • Every modified .md/.mdx compiled with @mdx-js/mdx v3 and the result diffed against main: no new errors. The two files that fail compile in isolation fail identically on main (they rely on the Docusaurus remark pipeline).
  • All 60 FilteredTextBlock markers across the 13 modified pages resolve, each exactly once, with the extracted regions checked for balance. Verified by porting the component's own filter loop and rendering every block at both revisions, which is how the two empty Go tabs were confirmed empty on main too.
  • Python files byte-compile. Go parses and is gofmt-clean. TypeScript/JS snippets parse.
  • Java and C# quickstart tests compile offline against the client versions CI pins (java-client 6.3.0 via mvn -o test-compile; csharp-client 1.1.1 via Roslyn). CI secrets need no change: both jobs already export OPENAI_API_KEY.
  • Two fixes proven against a live Weaviate 1.38.0, not merely inspected: the MMR snippet goes from AttributeError to a clean run with its own assertions passing, and the Google AI Studio vectorizer payload goes from HTTP 422 projectId cannot be empty to HTTP 200.
  • Link targets introduced by this change were resolved by hand: all seven env-var anchors exist, and both SkipLink targets match the OpenAPI spec the site renders.

Residual risk is therefore confined to whole-site build behavior that per-file compilation cannot surface. A yarn build in CI will close that gap.

Known follow-ups, deliberately not in this PR

  • The Go model-provider snippets pass snake_case config keys (project_id, model_id, api_endpoint), but the server matches keys exactly in camelCase and silently drops unrecognized ones. So the Google "Vectorizer parameters" Go example is still non-functional even after the module-name fix here. This is a class of latent bug across the Go provider snippets and wants its own pass.
  • CLUSTER_GOSSIP_BIND_PORT / CLUSTER_DATA_BIND_PORT defaults are stated three different ways across three pages. The new troubleshooting section deliberately asserts no default port rather than pick one.
  • The local quickstart Java and C# snippets still configure Cohere while those pages otherwise use Ollama. Same drift family, different target provider.
  • docs/weaviate/model-providers/google/generative.md still says "The default model is used if no model is specified", now linking to a section that names no default.

Fixes the 10 critical findings from a read-only audit of docs.weaviate.io
(/weaviate, /deploy, /cloud), plus five High-tier findings in the same files
and one stale include that contradicted a section fixed here. Every claim was
checked against Weaviate core or the official client source.

Wrong information a reader would act on:

- Both quickstarts told the reader to sign up for Cohere while every client
  snippet required an OpenAI key. Prose and the curl tabs now say OpenAI,
  matching the CI-executed snippets; Java and C# collection config switched
  to OpenAI to match.
- google/generative marked gemini-2.5-flash as the default, but omitting the
  model makes the server fall back to a legacy PaLM model that the same page
  lists as deprecated. Marker removed, with a caution to set the model.
- google/embeddings: the Gemini example failed server-side validation. Python
  passed a keyword the client rejects, Go named the wrong module, and the
  AI Studio examples omitted the Gemini endpoint, so collection creation
  failed with "projectId cannot be empty".
- anthropic/generative had a default and model list frozen at July 2024.
  Default corrected; the hand-maintained list replaced with a link to the
  provider's model-names page, since the module has no allowlist.
- search/similarity MMR examples used a parameter and factory that had both
  been renamed, so the snippets raised on use. All five call sites and the
  surrounding prose corrected.
- OPERATIONAL_MODE documented values the parser does not accept, and an
  unrecognized value silently falls back to full read-write. Values
  corrected and the silent fallback documented.
- The cluster-consensus troubleshooting answer was a verbatim copy of the
  unrelated async-replication answer. Rewritten around cluster membership
  and Raft. Corrected the case of ASYNC_REPLICATION_DISABLED.

Snippets that could not run as printed:

- typescript/notes-best-practices had pasted GitHub review UI text inside a
  JS block, making it a SyntaxError on copy-paste, plus invalid generic
  syntax.
- read-all-objects used Go markers that appear twice in the source, so the
  snippet component spliced two regions together and leaked raw import
  lines into non-compiling Go. Unique markers added. Two further Go tabs
  referenced markers that do not exist and rendered as empty code boxes;
  those tabs are removed rather than left blank.
- Removed a preview bullet claiming Python client support was unreleased. It
  has shipped, and that include renders into the MMR section corrected here.

Enables tests/test_python.py::test_search_mmr. It was skipped on the stale
grounds that MMR support was not in a released client; support has shipped,
and the snippet runs green against a live instance using self-provided
vectors, so it needs no provider credentials. The test now covers the
corrected MMR examples in CI.
@g-despot
g-despot requested a review from Copilot July 29, 2026 20:47

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Weaviate docs and embedded code snippets to correct high-impact inaccuracies identified in a deep audit, aligning prose, configuration examples, and runnable snippets (plus tests) with current Weaviate/core-client behavior.

Changes:

  • Align RAG/quickstart guidance and snippets to OpenAI (prose + curl + Java + C#), replacing Cohere-specific instructions where they contradicted CI-executed examples.
  • Fix/refresh model-provider docs and snippet APIs (Google Gemini/Vertex vectorizer config, Anthropic model guidance, and MMR parameter/factory renames).
  • Enable and exercise Python MMR snippet coverage in CI by un-skipping test_search_mmr.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_python.py Enables the Python MMR snippet test by removing the skip marker.
docs/weaviate/tutorials/quick-tour-of-weaviate.mdx Updates prerequisites and header guidance from Cohere to OpenAI for the RAG step.
docs/weaviate/search/similarity.md Updates MMR docs to the current diversity_selection + Diversity.mmr(...) API.
docs/weaviate/model-providers/google/generative.md Removes “default” labeling and adds a caution to set the Gemini model explicitly.
docs/weaviate/model-providers/google/embeddings.md Clarifies Google AI Studio requirements and client behavior regarding endpoints/project IDs.
docs/weaviate/model-providers/anthropic/generative.md Replaces a stale hand-maintained model list with a default-model note + upstream link.
docs/weaviate/model-providers/_includes/provider.vectorizer.ts Switches the TS Gemini vectorizer helper to the Gemini-specific configurator.
docs/weaviate/model-providers/_includes/provider.vectorizer.py Fixes the Python Gemini vectorizer parameter name (model).
docs/weaviate/model-providers/_includes/provider.generative.ts Updates Anthropic model examples to claude-haiku-4-5.
docs/weaviate/model-providers/_includes/provider.generative.py Updates Anthropic model examples to claude-haiku-4-5.
docs/weaviate/manage-objects/read-all-objects.mdx Fixes Go snippet markers and removes empty Go tabs where markers didn’t resolve.
docs/weaviate/client-libraries/typescript/notes-best-practices.mdx Removes pasted UI text from a JS block and fixes invalid TS generic syntax.
docs/deploy/faqs/troubleshooting.md Rewrites the cluster membership/consensus troubleshooting section and fixes env var casing.
docs/deploy/configuration/env-vars/index.md Corrects OPERATIONAL_MODE documented values and warns about silent fallback behavior.
docs/cloud/quickstart.mdx Updates Cohere → OpenAI prerequisites and header guidance for RAG.
_includes/feature-notes/v137-preview.mdx Removes stale note about unreleased Python client support.
_includes/code/quickstart/quickstart.query.rag.mdx Updates curl example to use OPENAI_API_KEY / X-OpenAI-Api-Key.
_includes/code/quickstart/quickstart.create_collection.mdx Updates schema curl snippet module config to generative-openai.
_includes/code/java-v6/src/test/java/QuickstartTest.java Switches Java quickstart generative module from Cohere to OpenAI.
_includes/code/howto/search.similarity.mmr.py Updates the Python MMR snippet to the current API (diversity_selection, Diversity.mmr).
_includes/code/howto/go/docs/model-providers/2-usage-text/main.go Fixes Google vectorizer module name and adds the Gemini endpoint in the Go schema example.
_includes/code/howto/go/docs/manage-data.read-all-objects_test.go Introduces unique snippet markers for the Go “read all objects” example.
_includes/code/csharp/QuickstartTest.cs Switches C# quickstart generative config from Cohere to OpenAI.
Comments suppressed due to low confidence (1)

_includes/code/howto/go/docs/model-providers/2-usage-text/main.go:362

  • This Vertex AI vectorizer config still uses snake_case keys (project_id, model_id, api_endpoint) even though the docs on this page describe projectId, modelId, and apiEndpoint. The comment also says "Vertex AU" (typo).
					"text2vec-google": map[string]interface{}{
						"properties":   []string{"title"},
						"project_id":   "<google-cloud-project-id>",  // Required for Vertex AU
						"model_id":     "textembedding-gecko@latest", // (Optional) To manually set the model ID
						"api_endpoint": "<google-api-endpoint>",      // (Optional) To manually set the API endpoint
					},

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/deploy/faqs/troubleshooting.md Outdated
#### Resolving the issue

Check your settings to check if you have asynchronous replication enabled. If `async_replication_disabled` is set to "true" then you'll need to set that variable to "false." Once it is enabled, the logs will show messages that indicate successful peers checks and synchronization for the nodes.
Check your settings to check if you have asynchronous replication enabled. If `ASYNC_REPLICATION_DISABLED` is set to "true" then you'll need to set that variable to "false." Once it is enabled, the logs will show messages that indicate successful peers checks and synchronization for the nodes.
Comment on lines 323 to 327
"text2vec-google": map[string]interface{}{
"properties": []string{"title"},
"model_id": "gemini-embedding-001", // (Optional) To manually set the model ID
"properties": []string{"title"},
"apiEndpoint": "generativelanguage.googleapis.com",
"model_id": "gemini-embedding-001", // (Optional) To manually set the model ID
},
Addresses review feedback on this pull request.

Weaviate matches module config keys by exact string, a plain map lookup with
no case normalization and a silent fallback to the default on a miss. The
snake_case keys these examples used were therefore ignored by the server:
two of the three blocks failed collection creation with "projectId cannot be
empty", and the model each example set was never applied.

The accepted keys are apiEndpoint, projectId and modelId, which is also what
this page's own parameter reference documents, so the snippets contradicted
the prose beside them.

Also corrects a "Vertex AU" typo, and rewrites a troubleshooting sentence
that read "Check your settings to check ..." and referred to "peers checks".
@g-despot
g-despot merged commit b477bc2 into main Jul 30, 2026
13 checks passed
@g-despot
g-despot deleted the docs/fix-critical-review-findings branch July 30, 2026 09:03
g-despot added a commit that referenced this pull request Aug 1, 2026
llms.txt is hand-maintained in weaviate-io, but its code blocks must match the
START/END regions of the snippets in this repo. The only enforcement was the
weekly test_llms_txt_snippets_are_covered job, which fetches the live file. So
PR #485/#487 moved the quickstart snippets to `data.ingest`, nothing here told
the author that weaviate-io/static/llms.txt had to move too, and the break
surfaced days later in a scheduled run. It is still red: 2 of 51 blocks.

Add tests/check_llms_txt_drift.py, run by llms_txt_snippet_sync.yml on any PR
touching a file that matches SNIPPET_GLOBS. It answers one question: once this
PR merges, which llms.txt blocks would the weekly coverage test no longer find?
It reuses that test's globs, regexes, _normalize and _load_llms_txt, so the two
cannot disagree about what "matches" means.

The check is advisory and always exits 0. When a snippet PR is opened,
weaviate-io has not merged or deployed yet, so the live llms.txt legitimately
cannot match; a blocking check would fail every honest PR and would be routinely
overridden, which teaches people to ignore it. Findings are GitHub warning
annotations on the changed marker lines plus a job summary carrying the exact
block to paste into llms.txt.

It stays quiet when there is nothing to do: weaviate-io shipped first and
llms.txt already carries the new block, only scaffolding outside the markers
changed, or a region moved or was renamed with its code intact. It degrades to a
generic reminder, never a failure, if the base ref or llms.txt cannot be read.

The path filter also covers the Java and C# snippets, which live with their
language suites rather than under _includes/code/llms-txt/.

llms_txt_tests.yml is untouched; the scheduled job behaves exactly as before.
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