Skip to content

ISSUE-154: Backend semantic vector search with pgvector and artisan embeddings#178

Closed
habdullhigh wants to merge 2 commits intoNOVUS-X:mainfrom
habdullhigh:issue-154-vector-search
Closed

ISSUE-154: Backend semantic vector search with pgvector and artisan embeddings#178
habdullhigh wants to merge 2 commits intoNOVUS-X:mainfrom
habdullhigh:issue-154-vector-search

Conversation

@habdullhigh
Copy link
Copy Markdown

@habdullhigh habdullhigh commented Mar 26, 2026

PR Title:
ISSUE-154: Backend semantic vector search with pgvector and artisan embeddings

PR Body:
Summary
This PR implements ISSUE-154 by adding semantic vector search for artisan discovery, integrating pgvector in local backend infrastructure, and adding targeted tests that map to the issue acceptance criteria.

What changed

  • Added vector-capable database runtime for local backend using pgvector-enabled Postgres.
  • Added embedding support and dependencies for OpenAI + pgvector.
  • Added artisan embedding field and wiring for semantic search.
  • Added semantic search endpoint with hybrid ranking:
    • semantic similarity
    • reputation influence
  • Added embedding service for:
    • query embeddings
    • artisan profile text enrichment
    • cache-aware embedding reuse
  • Added focused tests for semantic endpoint behavior and embedding text enrichment.
  • Added env and backend documentation updates for semantic search configuration.
  • Included a small follow-up housekeeping commit for remaining local updates.

Acceptance criteria mapping

  • Vector database is running and integrated into the backend.
    • Achieved by pgvector-enabled DB image and successful migration flow.
  • Profiles and reputation stats are successfully embedded.
    • Achieved by profile text builder including reputation context and covered by tests.
  • Vector search returns relevant artisans for nuanced queries.
    • Achieved by semantic endpoint plus hybrid reranking, with deterministic behavior tests.

Test evidence

  • Targeted tests:
    • docker-compose exec api pytest app/tests/test_semantic_search_feature.py app/tests/test_search.py -v
  • Full backend tests:
    • make test
  • Result:
    • 78 passed

Notes and tradeoffs

  • Reputation enrichment is integrated at the text-building layer and is test-covered.
  • Full on-chain reputation ingestion depth depends on current Soroban data plumbing and can be expanded in follow-up work.

Closes #154

If you want, I can also provide a shorter reviewer-friendly version (compact PR body) and a stricter engineering version (with implementation and verification details split for easier review).

@habdullhigh habdullhigh changed the title chore: commit remaining local updates ISSUE-154: Backend semantic vector search with pgvector and artisan embeddings Mar 26, 2026
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 26, 2026

@habdullhigh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@gabito1451
Copy link
Copy Markdown
Collaborator

HI @habdullhigh PLEASE help look in to Ci fails

@gabito1451 gabito1451 closed this Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ISSUE-13 · 🔵 (Backend) — Vector Database & Artisan Embeddings

2 participants