Skip to content

docs(destination-pgvector): correct connector documentation - #84386

Draft
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
docs/auto/destination-pgvector
Draft

docs(destination-pgvector): correct connector documentation#84386
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
docs/auto/destination-pgvector

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Triggering Context

Run triggered by: Commit b355a806613b2f4179e9ce42a6b603e00c1c42ce merged to master (CDK bump to remediate CVE-2025-68664 in the langchain dependency, version 0.1.11 → 0.1.12).

Relevant context: #84364

Confidence impact: The trigger is a small, already-merged dependency bump with unambiguous scope, so the triggering context itself is clear (5/5); the documentation work it surfaced is broader than the trigger.

Documentation Confidence Assessment

Overall Confidence: 3/5

Dimension Score Rationale
Code Comprehension of the Documented Surface 4/5 Python CDK baseline (3), raised because the documented behavior lives in pgvector_processor.py, config.py, and the shared vector_db_based CDK, all of which I read end to end.
API Documentation Quality 4/5 Postgres and pgvector both have thorough public docs, as do OpenAI, Azure OpenAI, and Cohere embeddings; metadata.yaml lists only 2 external doc URLs.
Change Scope & Risk 2/5 ~260 lines touched: several sections rewritten rather than patched.
Existing Doc Maturity 4/5 The doc was 215 lines with reasonable structure but a number of incorrect and stale statements.
Connector Sensitivity 4/5 Community connector, beta, ql: 300 / sl: 200.
Triggering Context 5/5 Small merged PR with a clearly scoped dependency change.
Inference Ratio 4/5 Nearly all statements trace to connector code, the shared CDK, or vendor docs; a few operational statements (index guidance, network access) are judgment applied to verified facts.

Weighted composite: 0.15(4) + 0.15(4) + 0.25(2) + 0.10(4) + 0.15(4) + 0.10(5) + 0.10(4) = 3.6 → 3. No hard cap applied. Per the confidence gate, auto-merge is not applied at 3.

Adjustments based on code comprehension

  • Framework leverage: up — the chunking, metadata, and embedding paths are the shared airbyte_cdk.destinations.vector_db_based implementation; only the Postgres write path is connector-specific.
  • Independent corroboration: up — column set, table naming, and embedding dimensions each appear in both connector code and either the generated integration_tests/spec.json or the shared CDK constants.
  • Calibrated self-assessment: neutral — I can state which columns are written, how document_id and chunk_id are produced, and what deduplication does; I have not run a live sync.

What I Verified vs. What I Inferred

  • Verified from code:
    • Table columns and types: document_id, chunk_id, metadata (JSON), document_content, embedding (Vector(embedding_dimensions)) in pgvector_processor.py.
    • chunk_id is a random UUID integer, and document_id is Stream_{stream}_Key_{primary key} or a random UUID integer when the record has no primary key.
    • supports_merge_insert = False: deduplication deletes all rows for the affected document_id values and reinserts the current chunks.
    • Table and schema names are normalized by LowerCaseNormalizer (lower case, non-alphanumerics to underscores, leading digit prefixed), and the connector creates the schema if it doesn't exist.
    • Config fields and defaults in config.py: port 5432, default_schema public, single schema, password is a secret.
    • _ab_stream is always added to metadata; _ab_record_id is added only for append+dedup streams that have a primary key (document_processor.py).
    • Empty text_fields or metadata_fields means all record fields are used (_extract_relevant_fields).
    • The connector never reads omit_raw_text; document_content is always written.
    • Embedding dimensions: OPEN_AI_VECTOR_SIZE = 1536, COHERE_VECTOR_SIZE = 1024 in the shared CDK; OpenAI-compatible dimensions are user-configured.
    • Sync modes from destination.py: overwrite, append, append+dedup.
    • Allowed hosts (api.openai.com, api.cohere.ai, ${embedding.api_base}) from metadata.yaml.
  • Verified from API docs: pgvector requires CREATE EXTENSION vector and provides HNSW and IVFFlat indexes, which the connector does not create; Postgres folds unquoted identifiers to lower case and truncates identifiers at 63 bytes; OpenAI publishes embedding rate limits that bound sync throughput.
  • Inferred:
    • That you should create an HNSW or IVFFlat index yourself on larger tables — correct pgvector practice, but a recommendation rather than connector behavior.
    • That creating the extension typically needs superuser or an equivalent managed-service role. This depends on your Postgres distribution.
    • Airbyte UI step wording in "Step 2"; I did not open the UI to confirm the exact labels.

Areas of Concern

  • The removed claims are as important as the added ones. The old doc stated that metadata must be a string, number, or boolean and that there is a 40 KB metadata size limit. Neither holds for this destination: metadata goes into a Postgres json column with no such limit. It also promised "Coming soon: Hugging Face's e5-base-v2", which does not exist in the code.
  • The note about Do not store raw text having no effect is a behavior gap in the connector, not just a docs gap. If maintainers would rather fix the connector than document the gap, drop that subsection.
  • Changelog dates were checked and left unchanged: the 0.1.12 row (2026-08-13, PR 84364) matches the merge date of the triggering commit, and all recent link texts match their URLs.
  • No migration guide was touched, and no breaking change is involved.

What

The PGVector destination doc described behavior this connector doesn't have. It documented metadata type and size limits from a different vector destination, listed an embedding model that was never implemented, omitted the required pgvector extension step from the prerequisites, and pasted the generic Postgres identifier rules instead of what the connector actually does to stream names. This PR corrects those statements and documents the table layout, deduplication behavior, and embedding options as they exist in the code.

The trigger was the CDK bump in #84364, which needed no doc change of its own beyond the changelog row it already added.

How

Corrections

  • Metadata: replaced the "string, number, boolean only" and "40 KB total" claims with the actual behavior — metadata is written to a json column, so nested objects and arrays survive.
  • Removed "Coming soon: Hugging Face's e5-base-v2".
  • Naming conventions: replaced the copy of the Postgres identifier rules and the Postgres-destination note about raw and final tables (this connector creates neither) with the normalization the connector performs, plus the collision that normalization can cause.
  • Embedding: replaced the partial prose list with a table of method, model, and dimension count, including Azure OpenAI and OpenAI-compatible, which were previously mentioned but not explained.
  • Fixed the broken [Step 1](#step-1-optional-create-a-dedicated-read-only-user) anchor, and the setup steps that were interleaved with the naming-conventions section and numbered 1..8 then 7.
  • Default Schema is one schema, not a comma-separated search path.

Additions

  • CREATE EXTENSION IF NOT EXISTS vector is now part of the Postgres setup rather than an aside, along with the privilege it needs.
  • Host is listed among the values to collect.
  • Outbound access to the embedding service is called out next to the VPC note.
  • Column table for the destination tables, including how document_id and chunk_id are produced and why records without a primary key can't be traced back.
  • Deduplication deletes and reinserts a document's chunks instead of updating rows.
  • No index is created on the embedding column, with a pointer to pgvector's index docs.
  • Default splitting behavior and the alternative splitter options.
  • _ab_record_id is only present for append+dedup streams with a primary key. The old text implied it was always there.
  • Troubleshooting entry for Do not store raw text being ignored by this destination.

Removals

  • The duplicated "For the Host, Port, and DB Name…" instructions that appeared in both the setup steps and the indexing section.
  • The stray #### Target Database section that only said to pick a database.

The changelog is unchanged.

Review guide

  1. docs/integrations/destinations/pgvector.md — the metadata data type section and the naming conventions section are the two places where the old text was wrong rather than incomplete.
  2. The Do not store raw text troubleshooting entry: confirm you want this documented rather than fixed in the connector.
  3. The embedding table: dimension counts come from OPEN_AI_VECTOR_SIZE and COHERE_VECTOR_SIZE in the shared CDK.

User Impact

Docs only. No connector behavior changes.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Note: I am an AI assistant (Devin) and have proposed these documentation updates based on a review of the connector source code and third-party API documentation. Reviewers may merge, modify, or close this PR as they see fit.

Link to Devin session: https://app.devin.ai/sessions/f141ee2f661844ef8995637a4705d44d

…tation

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
      • Bump types: patch (default), minor, major, major_rc, rc, promote.
      • The rc type is a smart default: applies minor_rc if stable, or bumps the RC number if already RC.
      • The promote type strips the RC suffix to finalize a release.
      • Example: /bump-version type=rc or /bump-version type=minor
    • /bump-progressive-rollout-version - Alias for /bump-version type=rc. Bumps with an RC suffix and enables progressive rollout.
  • ❇️ AI Testing and Review (internal link: AI-SDLC Docs):
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-review - AI-powered PR review for connector safety and quality gates.
  • 📝 AI Documentation:
    • /ai-docs-review - AI-powered documentation review for PRs with connector changes.
    • /ai-create-docs-pr - Creates a documentation PR for connector changes, stacked on the current PR.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
    • /enable-autopilot-rollouts - Enables autopilot progressive rollouts for the modified connector(s) in the PR, remediating "autopilot rollouts not enabled for {connector-name}" auto-merge blockers. Sets defaultRolloutMode: autopilot and enableProgressiveRollout: true, preserving any existing autopilotConfig.
      • Optional args: connector=<CONNECTOR_NAME> (defaults to the modified connectors in the PR), strategy=fast|slow|default (defaults to fast).
      • Example: /enable-autopilot-rollouts or /enable-autopilot-rollouts connector=source-faker strategy=slow
  • ☕️ JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
  • 🐍 Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.
  • ⚙️ Admin commands:
    • /force-merge reason="<REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.
      Example: /force-merge reason="CI is flaky, tests pass locally"
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

embedding method you choose.

#### Configure Network Access
#### Configure network access

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.

[markdownlint] reported by reviewdog 🐶
MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h3; Actual: h4]

#### **Permissions**

You need a Postgres user with the following permissions:
#### Permissions

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.

[markdownlint] reported by reviewdog 🐶
MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h3; Actual: h4]

@github-actions

Copy link
Copy Markdown
Contributor

Deploy preview for airbyte-docs ready!

Project:airbyte-docs
Status: ✅  Deploy successful!
Preview URL:https://airbyte-docs-15elxonk6-airbyte-growth.vercel.app
Latest Commit:784d818

Deployed with vercel-action

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

Labels

area/documentation Improvements or additions to documentation team/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants