Skip to content

RAG: pgvector store + embeddings schema (documentation-system) #174

Description

@qiuethan

Sub-issue of the RAG retrieval epic (#125). Stage 2 of 3: index.

Scope

  • Enable the pgvector extension on the documentation-system database via an Alembic migration.
  • Embeddings table keyed to document + chunk, storing the vector, chunk ordinal, and source offsets.
  • Record the embedding model and dimensionality per row so a model change is detectable rather than silently corrupting similarity.
  • Index appropriate for the expected corpus size.

Acceptance

  • Migration applies cleanly on a fresh database and in CI (documentation-system-test already runs migrations against Postgres).
  • A vector can be written and read back with its document/chunk linkage intact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docs-systemdocumentation-system service & content pipelinearea/serviceBackend API services (generic/cross-cutting)type/featureNew capability or enhancement

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions