Search configurations
Multiple profiles and pinned selection are implemented. Classification execution and automatic cross-database retirement are not.
A profile defines a vector space. A search configuration selects compatible profiles for legal text, private documents, optional summaries and classification.
flowchart LR Profile["Immutable embedding profiles"] --> Config["Search configuration and fingerprint"] Config --> Default["Supported default"] Default --> New["New project or standalone conversation"] New --> Pin["Pinned configuration"] Pin --> Task["Task and ingestion admission"] Config --> Builds["Retained profile-specific generations"]
Profile contract
Section titled “Profile contract”Record provider, model, dimensions, storage kind, distance and input recipe. A changed model or recipe gets a new profile identity. Validate dimensions in storage and retrieval; never compare incompatible vectors or fall back to another profile’s chunks.
Legal and product registries share immutable configuration IDs and fingerprints. Configuration lifecycle (building, supported, retired) is separate from generation lifecycle. A default is a pointer to a supported configuration, not mutable profile metadata.
For Qdrant legal search, search.qdrant_builds resolves each representation/profile to its selected collection and sparse recipe. The selected configuration cannot silently query another profile’s collection. Model descriptions are registry data, not repeated per-hit payload. SQL hydration rechecks the pinned profile; integration tests cover switching between different-dimensional model profiles without re-embedding or mixing collections.
Workspace behavior
Section titled “Workspace behavior”Projects retain their configuration for future chats and uploads. Standalone conversations capture the default when created. Tasks and ingestion runs capture the configuration at admission, so retries and in-flight work stay consistent after a default change.
Supported legal profiles continue receiving new corpus material, deduplicating configurations that share a profile. Switching the default back reuses retained vectors and indexes. Private uploads inherit their owning scope’s selection.
Readiness and retirement
Section titled “Readiness and retirement”Publish only when required source coverage and enabled derived inputs are complete. Classification needs a complete compatible prototype set. A missing index or required representation is an explicit unavailable/pending result.
Before retiring a configuration, verify project/conversation references and unfinished work across both data domains. Legal SQL alone cannot prove that no product workspace still uses a configuration. Physical profile indexes must match dimensions, distance and supported representations.
Enforcement and current limits
Section titled “Enforcement and current limits”Profile validation is implemented in packages/embeddings-go/profiles.go; SQL guards and index creation live in legal schema/target.sql and product platform/db/embedding-policies.sql. They reject incompatible dimensions because comparing vectors from different spaces produces meaningless rankings.
TestRetrievalPostgres checks separate profiles and switching back; TestEmbeddingConfigurationPinningAndConversationMove checks product scope pinning. Configuration definitions and selection are maintained through database setup; there is no embedding administration CLI.
Classification metadata can reference profiles and prototype sets, but the classification runtime is not implemented. Cross-database retirement remains an operator responsibility: there is no automatic transaction proving that both databases have stopped referencing a configuration.