KB-58BF

GPT Directive to Opus — Vector Search Reliability Hardening Pack

6 min read Revision 1
directiveopusvector-searchhardeningproductionp3d2026-05-11

GPT Directive to Opus — Vector Search Reliability Hardening Pack

Date: 2026-05-11 Issuer: GPT-5.5 Thinking / Incomex Hội đồng AI Receiver: Opus 4.6/4.7 Workstream: P3D_VECTOR_SEARCH_RELIABILITY Pack: P3D_VECTOR_SEARCH_RELIABILITY_HARDENING_PACK Mode: DESIGN + IMPLEMENTATION PROMPT FIRST

0. Executive decision

Search boost implementation is accepted as behavior PASS, but production hardening is still required before resuming Pack 1.

Do not create many tiny prompts. Produce one clear design and one implementation prompt suitable for Codex/Claude Code.

1. Required reading

knowledge/dev/laws/dieu44-trien-khai/reports/p3d-vector-search-hybrid-path-title-boost-implementation-report.md
knowledge/dev/laws/dieu44-trien-khai/reports/opus-verification-vector-search-boost-pass-2026-05-11.md
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-vector-search-boost-pass-but-hardening-required-2026-05-11.md
knowledge/dev/laws/dieu38-trien-khai/reports/vector-reality-check-agent-data-qdrant-2026-05-02.md

2. Mission

Design the remaining production hardening work for KB vector/search before we resume Pack 1 TAC↔IU reconciliation.

The hardening pack must cover:

  1. Deployment durability

    • Determine how to make the search boost survive container recreate/rebuild.
    • Current hotfix used host repo edit + docker cp into container writable layer.
    • Host repo commit exists (ff2fc25) but durability through image rebuild/recreate must be verified or fixed.
  2. Search regression canary

    • Create a small repeatable canary test set including T1–T6 and Opus extra hard cases.
    • It should be runnable after deploy/restart/rebuild.
    • It should report PASS/FAIL and ranks.
  3. Conservative recency tie-break

    • Implement or design a slight recency boost only as a tie-breaker for exact/path/title-like queries.
    • Do not allow recency to dominate broad semantic search.
    • Keep configurable/disableable.
  4. Ghost/audit warning cleanup

    • Investigate and propose safe handling for empty/folder/short docs and empty-id audit edge cases.
    • Do not auto-heal or reindex blindly.
    • Goal: make sync_status=warning meaningful, not noisy.
  5. Unified search contract for legacy KB + future IU vector

    • Document that future IU vector search must reuse the same rerank/hybrid mechanism.
    • IU-specific difference: chunking must never cross IU/version boundary.
    • Future IU payload should add unit_id, canonical_address, unit_version_id, content_hash, but do not implement IU vector now.

3. Required outputs

3.1 Design

Create:

knowledge/dev/laws/dieu44-trien-khai/design/p3d-vector-search-reliability-hardening-design.md

Required sections:

A. Current accepted PASS state
B. Remaining production risks
C. Deployment durability plan
D. Canary/regression test plan
E. Recency tie-break design
F. Audit warning cleanup design
G. Unified KB/IU search contract
H. Non-goals
I. Rollback plan
J. Acceptance criteria

3.2 Implementation prompt

Create:

knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-vector-search-reliability-hardening-implementation-prompt.md

This prompt may authorize implementation only after GPT/User review. It must include:

  • preflight;
  • backup;
  • durability check/fix;
  • canary script/report;
  • optional conservative recency tie-break if design deems safe;
  • audit-warning read-only verification and safe patch only if clearly scoped;
  • rollback;
  • post-deploy tests.

3.3 Report

Create:

knowledge/dev/laws/dieu44-trien-khai/reports/p3d-vector-search-reliability-hardening-design-report.md

Report fields:

phase_status=PASS|PARTIAL|BLOCKED
mode=DESIGN_AND_PROMPT_ONLY
search_boost_behavior=PASS
production_durability_plan=READY|BLOCKED|NEEDS_DECISION
canary_plan=READY|BLOCKED
recency_tiebreak=INCLUDED|DEFERRED_WITH_REASON
audit_warning_cleanup=INCLUDED|DEFERRED_WITH_REASON
unified_search_contract=INCLUDED|BLOCKED
implementation_allowed=false
no_mutation_performed=true
next_required_action=GPT_REVIEW_HARDENING_IMPLEMENTATION_PROMPT

4. Hard boundaries

For this Opus design phase:

  • No implementation.
  • No Docker changes.
  • No code changes.
  • No Qdrant mutation.
  • No reindex.
  • No auto-heal.
  • No DB write.
  • No IU vector implementation.
  • No TAC/IU migration.
  • No Pack 1 resume until GPT review.

5. Design constraints

  • Keep it one coherent pack; do not split into many micro-packs unless a true blocker appears.
  • Prefer production-safe small patches over architecture rewrites.
  • Do not change legacy vector payload or Qdrant collection unless absolutely necessary; likely unnecessary.
  • Do not let recency boost harm semantic search.
  • Treat audit cleanup as reliability/observability cleanup, not data repair unless explicitly approved.
  • Future IU vector must be compatible with this search contract.

6. Final response expected from Opus

Return only:

  1. Design path.
  2. Implementation prompt path.
  3. Report path.
  4. Top 7 hardening decisions.
  5. What is included vs deferred.
  6. Whether GPT/User review is required before dispatch.

7. Status

pack1_paused=true
search_boost_behavior=PASS
hardening_required=true
implementation_allowed=false_until_GPT_User_review
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/directives/gpt-directive-opus-vector-search-reliability-hardening-pack-2026-05-11.md