[P1] R01: Implement embedding-profile-aware Qdrant indexing and filtered search #20

Open
opened 2026-10-21 20:29:27 +02:00 by amiryahaya · 0 comments
Owner

Backlog ID: R01 | Priority: P1 | Phase: M4 — Consistent indexing and hybrid retrieval

Outcome and scope

Implement VectorIndex with an embedding adapter behind E01 contracts; use deterministic embeddings for adapter tests and select the real profile via E02.

Dependencies and gates

Engineering prerequisites: #15 (E01), #10 (F05), #8 (F03)

Synthetic-data development may proceed. Production use remains subject to the decision gates in the SRS.

Starting points

crates/storage-qdrant/; crates/model-adapters/; tests/integration/qdrant/; docs/search/index-profile.md

These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion.

Acceptance criteria

  • Collections/version aliases bind profile ID and vector dimension; mismatches reject startup/writes/queries.
  • Points contain vectors, opaque IDs and minimum indexed ACL payload; full protected chunk text remains canonical in PostgreSQL.
  • Search always requires server-built authorization filters with SQL-equivalent org/compartment/need-to-know semantics.
  • Upsert/delete/rebuild are idempotent and bounded; unavailable/malformed filters fail closed rather than retrying unfiltered.

Verification

Shared contracts plus real-Qdrant tests cover payload filtering, multiple required compartments, stale payloads, dimension mismatch, duplicate upserts and deletion.

Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence.

Requirements and design

FR-DATA-002, 004–005; FR-AUTH-005; FR-RAG-003; architecture §§5.3, 7–8

Sources: SRS, system design. Local planning context: docs/implementation-plan.md and docs/development-backlog.md (not published by this task).

Security impact: Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue.

Parent roadmap: #1

**Backlog ID:** R01 | **Priority:** P1 | **Phase:** M4 — Consistent indexing and hybrid retrieval ## Outcome and scope Implement VectorIndex with an embedding adapter behind E01 contracts; use deterministic embeddings for adapter tests and select the real profile via E02. ## Dependencies and gates **Engineering prerequisites:** #15 (E01), #10 (F05), #8 (F03) Synthetic-data development may proceed. Production use remains subject to the decision gates in the SRS. ## Starting points crates/storage-qdrant/; crates/model-adapters/; tests/integration/qdrant/; docs/search/index-profile.md These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion. ## Acceptance criteria - [ ] Collections/version aliases bind profile ID and vector dimension; mismatches reject startup/writes/queries. - [ ] Points contain vectors, opaque IDs and minimum indexed ACL payload; full protected chunk text remains canonical in PostgreSQL. - [ ] Search always requires server-built authorization filters with SQL-equivalent org/compartment/need-to-know semantics. - [ ] Upsert/delete/rebuild are idempotent and bounded; unavailable/malformed filters fail closed rather than retrying unfiltered. ## Verification Shared contracts plus real-Qdrant tests cover payload filtering, multiple required compartments, stale payloads, dimension mismatch, duplicate upserts and deletion. Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence. ## Requirements and design FR-DATA-002, 004–005; FR-AUTH-005; FR-RAG-003; architecture §§5.3, 7–8 Sources: [SRS](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/SRS.md), [system design](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/architecture.md). Local planning context: `docs/implementation-plan.md` and `docs/development-backlog.md` (not published by this task). **Security impact:** Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue. **Parent roadmap:** #1
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
primatekuntech/rag-rust#20
No description provided.