Karyo
Documentation/ Decision records

ADR 0055: Karyo has no document AI and no semantic search

Karyo 2.1.1rendered at build time
On this page

Status: Accepted. Supersedes the pre-1.0 designs ADR-017 (pgvector for vector storage) and ADR-018 (a retrieval-augmented generation architecture for AI features). Neither was built, and neither is in this decision set: they lived in the design register archived before 1.0.0, so this record is where their supersession is written down.

Context

Before 1.0.0 the design register accepted two records as a future design: ADR-017 stored embeddings in PostgreSQL through the pgvector extension, and ADR-018 fed stored documents to a model through retrieval, for document AI and semantic search over the document archive. Neither was implemented. The item was parked on 2026-07-12, and both records carried a "parked, not implemented" banner from 2026-09-08.

This decision set was written from 0001 at 1.0.0 and did not carry the two records over. ADR 0027 listed retrieval over a vector store as an alternative it did not build, and ADR 0041 decided that Karyo calls no model. The parked item still stood as an open decision: keep it parked, re-scope it, or close it.

What Karyo has is two deterministic document features. The document archive stores generated documents and finds them by Facility, entity type, entity id and document type. Document templates keep each goods owner's override versions of the templates that documents render from. Neither reads a document's content for meaning or calls a model.

Decision

  • Document AI and semantic search are out of scope for Karyo. There is no pgvector extension, no embedding column or table, no vector store, no document index and no retrieval or model call over documents, and none is planned.
  • The document archive and the document templates stay as they are. The archive finds a document by its metadata only.
  • The database stays the stock PostgreSQL image. No migration enables an extension for this feature, and the Compose files, Dev Services and the test profile use postgres:16-alpine.

The product owner decided that the feature does not fit Karyo and would not have given meaningful output. No further reason is recorded.

Consequences

  • Nothing changes at runtime. No code, dependency, image, migration or setting ever existed for the feature, so this record removes none.
  • A question about what a stored document says, or about a document that is not in the database, such as a procedure or a manual, is not answered by Karyo.
  • A future proposal for document AI or semantic search needs a new record that supersedes this one; the earlier designs are not a plan to resume.

Alternatives considered

  • Keep the item parked. Rejected by the product decision above. A parked design reads as a plan, and this one was not going to be built.
  • Re-scope it to work that fits the no-model direction. Not taken. The product decision removes the feature instead, and no re-scoped form was proposed.

Evidence

  • services/document-service/karyo-docstore-core/src/main/kotlin/com/karyo/docstore/repository/StoredDocumentRepository.kt, StoredDocumentRepository.searchMetadata - the archive's lookup, by metadata only
  • services/document-service/karyo-doctemplates-core/src/main/kotlin/com/karyo/doctemplates/service/DocumentTemplateService.kt, DocumentTemplateService - template override versions, with no model in the path
  • infrastructure/docker/docker-compose.prod.yml, services.postgresql.image - the stock postgres:16-alpine image, with no vector extension
  • ADR 0027 - the retired copilot, which chose tool calls over retrieval
  • ADR 0041 - Karyo calls no model
  • ADR 0046 - the document archive works in a Facility
  • The engine boundaries - the document templates capability in the one distribution