Copy/Paste Agent Prompt — P3D Vector Search Hybrid Boost Implementation
Copy/Paste Agent Prompt — P3D Vector Search Hybrid Path/Title Boost Implementation
Date: 2026-05-11 Recommended effort: high Mode: Production code patch with strict safety gates
Prompt
Implement the approved P3D Vector Search Hybrid Path/Title Boost pack.
Recommended effort: high.
Reason: The patch is small, but it touches production Agent Data search. Use careful preflight, backup, safe restart, tests, and rollback discipline.
Read first:
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-final-approval-p3d-vector-search-boost-prompt-rev2-2026-05-11.md
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-vector-search-hybrid-path-title-boost-implementation-prompt.md
knowledge/dev/laws/dieu44-trien-khai/design/p3d-vector-search-hybrid-path-title-boost-design.md
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-vector-search-freshness-audit-report.md
Then execute exactly the implementation prompt:
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-vector-search-hybrid-path-title-boost-implementation-prompt.md
Goal:
Add an app-layer rerank/path-title boost to Agent Data search so exact path/title/document-name queries rank the correct KB document first, while preserving semantic search quality.
Root cause:
SEARCH_RANKING_NO_PATH_TITLE_BOOST_NOT_VECTOR_FRESHNESS
Hard boundaries:
- No Qdrant collection replacement.
- No Qdrant point delete/upsert.
- No bulk reindex.
- No auto-heal.
- No
/kb/reindex. - No
/kb/reindex-missing. - No
/kb/cleanup-orphanswrite mode. - No PG schema mutation.
- No DB INSERT/UPDATE/DELETE.
- No trigger/function/index/permission changes.
- No TAC/IU migration.
- No IU vector implementation.
- No event_outbox change.
- No Pack 1 DDL.
- No docker-compose or
.envedit in this first patch. - Do not deploy/restart until preflight, backup, and code diff are complete.
Required safety behavior:
- Discover actual container names; do not assume
qdrantoragent-data. - Confirm runtime linkage before code patch. If unclear, STOP and report
BLOCKED_RUNTIME_LINKAGE_UNCLEAR. - Run baseline T1–T6 tests and record ranks.
- Backup target files before editing.
- Patch minimal app-layer rerank logic only.
- Run
py_compilebefore restart. - Restart Agent Data only if safe.
- Confirm Qdrant point count before/after is unchanged.
- Run post-patch T1–T6 tests.
- Roll back immediately if health fails or semantic regression occurs.
Expected report path:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-vector-search-hybrid-path-title-boost-implementation-report.md
Final response format:
vector_search_boost_status=PASS|FAIL|ROLLED_BACK|BLOCKED
report_path=knowledge/dev/laws/dieu44-trien-khai/reports/p3d-vector-search-hybrid-path-title-boost-implementation-report.md
files_changed=<list>
qdrant_points_before=<n>
qdrant_points_after=<n>
health_after=<status>
acceptance_summary=<short>
rollback_performed=true|false
no_qdrant_mutation=true
no_pg_schema_mutation=true
Return only the final response format plus critical blocker notes. Do not write a long essay.