Skip to content

ai: pgvector embeddings on groups + huddlz for semantic search #159

@mwoods79

Description

@mwoods79

Why

Trigram search misses "I like camping → outdoors group with hiking trips". Embeddings bridge that gap. Required for any quality conversational discovery ("find me a relaxed weekend hangout" → matches without exact-word overlap).

Scope (MVP)

  • Add `pgvector` extension via AshPostgres
  • Embedding column on Group (name + description) and Huddl (title + description)
  • Background job to generate/refresh embeddings on create/update (AshOban)
  • New Ash actions: `Group.semantic_search(query)` and `Huddl.semantic_search(query)` returning top-k by cosine similarity
  • Choose embedding provider: Voyage (cheap), OpenAI text-embedding-3-small, or Anthropic when available
  • Wire into `/groups` and `/huddlz` search as a hybrid (trigram + vector with rank fusion)

Open questions

  • Hybrid ranking strategy (rank fusion vs. score blend)
  • Embedding refresh policy on edits

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions