GPT Directive to Opus — P3D Vector/Search Hybrid Path-Title Boost Pack
GPT Directive to Opus — P3D Vector/Search Hybrid Path-Title Boost Pack
Date: 2026-05-11 Issuer: GPT-5.5 Thinking / Incomex Hội đồng AI Receiver: Opus Workstream: P3D_VECTOR_SEARCH_RELIABILITY Mode: DESIGN/PROMPT FIRST — no implementation without GPT/User review
0. Mission
Stop P3D Pack 1 continuation temporarily and design a production-safe search reliability pack.
Current root cause from audit:
SEARCH_RANKING_NO_PATH_TITLE_BOOST_NOT_VECTOR_FRESHNESS
The recent KB documents are present and vectorized, but exact path/title queries can be outranked by older semantically similar documents because normal search is Qdrant-vector-first and does not boost document_id, path slug, or metadata.title.
1. Required reading
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-vector-search-freshness-audit-report.md
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d-vector-search-freshness-audit-and-stop-pack1-2026-05-11.md
knowledge/dev/laws/dieu38-trien-khai/reports/vector-reality-check-agent-data-qdrant-2026-05-02.md
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-agent-vector-search-freshness-audit-readonly-2026-05-10.md
Also read Pack 1 status only to understand why it is paused:
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d-pack1-preliminary-design-and-inventory-next-2026-05-10.md
2. Scope
Produce a design and implementation prompt for:
P3D_VECTOR_SEARCH_HYBRID_PATH_TITLE_BOOST_PACK
The pack must improve reliability of exact KB document lookup without damaging legacy semantic search.
3. Required outputs
3.1 Design document
Create:
knowledge/dev/laws/dieu44-trien-khai/design/p3d-vector-search-hybrid-path-title-boost-design.md
Required sections:
A. Problem statement
B. Evidence summary from audit
C. Current search behavior
D. Proposed hybrid/rerank behavior
E. Scoring/boost rules
F. Test cases
G. Rollback plan
H. Production risk controls
I. Non-goals
J. Acceptance criteria
3.2 Implementation prompt draft
Create:
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-vector-search-hybrid-path-title-boost-implementation-prompt.md
Do not dispatch implementation yet. The prompt is for GPT/User review.
3.3 Report
Create:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-vector-search-hybrid-path-title-boost-design-report.md
Report fields:
phase_status=PASS|PARTIAL|BLOCKED
mode=DESIGN_AND_PROMPT_ONLY
implementation_allowed=false
root_cause=SEARCH_RANKING_NO_PATH_TITLE_BOOST_NOT_VECTOR_FRESHNESS
no_mutation_performed=true
next_required_action=GPT_REVIEW_IMPLEMENTATION_PROMPT
4. Design requirements
The design must propose a small, reversible patch. Preferred behavior:
- Still retrieve from Qdrant vector search.
- Also compute exact/keyword boosts over:
document_idfull path;- path basename/slug;
metadata.title;- maybe metadata tags;
- optionally content snippet/body keyword overlap.
- Rerank candidates using a combined score such as:
final_score = vector_score + path_boost + title_boost + basename_boost + recency_or_revision_boost(optional)
- Exact filename/path match must strongly outrank semantically similar older docs.
- Preserve current output fields; optionally add debug fields only if safe.
- Preserve Qdrant collection
production_documents. - Do not reindex as the primary fix.
- Do not modify vector payloads unless absolutely necessary; prefer app-layer rerank.
- Do not implement IU vector.
- Do not change TAC/IU schemas.
5. Minimum test cases
Use these known queries and expected targets from the audit:
T1
Query:
GPT Review P3D Step 1 Re-authored Spec Pack 1 Directive
Expected rank:
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d-step1-reauthored-spec-and-pack1-directive-2026-05-10.md
rank <= 1 preferred, rank <= 2 acceptable only with explanation
T2
Query:
p3d-pack1-readonly-inventory-prompt revision 2
Expected rank:
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-readonly-inventory-prompt.md
rank = 1
T3
Query:
gpt-directive-agent-run-step1-checkpoint-and-pack1-inventory-readonly
Expected target remains rank 1.
T4
Query:
p3d-agent-vector-search-freshness-audit-readonly 2026-05-10
Expected target remains rank 1.
T5 semantic regression
A broad semantic query such as:
vector search freshness root cause
must still return relevant vector/search audit documents, not only exact path matches.
6. Implementation prompt requirements
The implementation prompt must instruct Codex/Claude Code to:
- inspect current code first;
- identify exact functions to patch;
- implement minimal rerank/hybrid logic;
- add tests or smoke checks;
- run read-only preflight and post-change tests;
- include rollback instructions;
- avoid Qdrant/PG mutation except normal code patch/deploy steps if explicitly approved later;
- write an implementation report.
7. Hard boundaries
- No Qdrant collection replacement.
- No bulk reindex.
- No auto-heal.
- No
/kb/reindex,/kb/reindex-missing,/kb/cleanup-orphanswrite mode. - No Qdrant point delete/upsert.
- No DB schema mutation.
- No TAC/IU migration.
- No IU vector implementation.
- No event_outbox change.
- No Pack 1 DDL.
- No deploy in this design phase.
8. Final response expected from Opus
Return only:
- Design path.
- Implementation prompt path.
- Report path.
- Top 7 design decisions.
- Acceptance tests.
- Whether GPT/User implementation review is required before dispatch.
9. Status
pack1_paused=true
vector_search_reliability_pack_required=true
implementation_allowed=false_until_GPT_User_review