KB-7A49

GPT Review — P3D Vector Search Hybrid Boost Design + Prompt rev1

5 min read Revision 1
gpt-reviewvector-searchhybrid-boostprompt-reviewp3d2026-05-11

GPT Review — P3D Vector Search Hybrid Boost Design + Prompt rev1

Date: 2026-05-11 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:

  • knowledge/dev/laws/dieu44-trien-khai/design/p3d-vector-search-hybrid-path-title-boost-design.md
  • knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-vector-search-hybrid-path-title-boost-implementation-prompt.md
  • knowledge/dev/laws/dieu44-trien-khai/reports/p3d-vector-search-hybrid-path-title-boost-design-report.md

Verdict

APPROVE DESIGN DIRECTION. DO NOT DISPATCH IMPLEMENTATION PROMPT rev1.

Opus correctly identifies the production fix class: app-layer hybrid rerank/path-title boost, not Qdrant reindex or IU vector implementation. However, implementation prompt rev1 needs a safety patch before dispatch because it touches production Agent Data code.

Accepted

  1. Root cause is correctly carried forward: SEARCH_RANKING_NO_PATH_TITLE_BOOST_NOT_VECTOR_FRESHNESS.
  2. App-layer rerank is the right first fix.
  3. No Qdrant mutation / no reindex is correct.
  4. Feature flag is directionally correct.
  5. Tests T1–T6 are aligned with the audit.
  6. Pack 1 remains paused until search reliability is addressed.

Required changes before dispatch

1. Preflight must verify modifiability and runtime linkage

Before code patch, agent must verify:

  • actual running container name;
  • actual image;
  • whether /opt/incomex/docker/agent-data-repo is mounted into the running container or used for build only;
  • exact file path inside container and host repo;
  • whether restart will load host repo code or require rebuild.

2. Do not edit docker-compose/env in first patch

rev1 says add SEARCH_RERANK_ENABLED=true to docker-compose or .env. Do not do that in first implementation unless necessary. Default true can be handled in code. Rollback can be code revert. Config mutation should be avoided unless explicitly needed.

3. Preserve vector score explicitly

Do not silently lose original semantic score. Implementation should expose or log:

original_score
boost_score
final_score
boost_reasons

If API response cannot expose debug fields safely, include them only in internal logs/test output. Avoid breaking response schema.

4. Test through the real searchKnowledge/API path

Prompt must specify exact endpoint/tool path used for tests. If MCP searchKnowledge is unavailable to agent, use Agent Data API endpoint equivalent and record request/response.

5. Add backup and rollback before any edit

Before code change:

  • git status --short;
  • copy target file to timestamped backup;
  • capture git diff --stat after patch;
  • rollback command must restore exact file from backup or git checkout -- <file> if repo is clean.

6. Container name must not be hardcoded incorrectly

rev1 uses docker exec qdrant; prior evidence used incomex-qdrant. Prompt must discover container names rather than assume.

7. Restart/deploy must be cautious

Restart is allowed only after code diff and tests are ready. If runtime uses a built image rather than mounted source, agent must STOP and report instead of improvising rebuild/deploy.

8. Latency target should be realistic

AC-9 ≤5ms added may be too strict without instrumentation. Use no_material_regression and record measured before/after latency; target p95 or simple repeated curl timing if available.

9. Implementation must avoid broad keyword fallback side effects

The fix should rerank candidate set, not replace vector search. It may add PG keyword candidates only if designed and tested; first patch should prefer Qdrant candidates + deterministic exact match boost.

Required next action

Opus must create prompt rev2 or GPT may patch directly. rev2 must incorporate the above production safeguards.

Suggested path remains:

knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-vector-search-hybrid-path-title-boost-implementation-prompt.md

with metadata PROMPT rev2 — GPT patched / ready for review.

Dispatch status

design_direction=APPROVED
implementation_prompt_rev1=NOT_APPROVED_FOR_DISPATCH
required_next=PROMPT_REV2_WITH_PRODUCTION_SAFETY
pack1_status=PAUSED
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d-vector-search-boost-design-and-prompt-rev1-2026-05-11.md