Look

Auto follows your local time: Aurora by day, Neural in the evening, Terminal after midnight.

Selected work 1 of 5

Magic Search

Natural-language creator discovery for TikTok Shop brands

Client work Pias TechAI Backend Engineer (Contractor)Nov 2025 – Jan 2026 2025–26

Results

Semantic search over 64,000+ creator profiles: brands describe who they want in plain language and get ranked matches with reasons.

  • 64,000+

    creators searchable in natural language

    Source: Résumé — Pias Tech, Magic Search

  • 1536-d

    OpenAI embeddings in pgvector

    Source: Résumé — Pias Tech, Magic Search

  • hours to seconds

    time to find the right creators

    Source: Résumé — Pias Tech, Magic Search (business impact)

01

Problem

Brands were finding creators by hand, which took hours per search—and keyword filters can’t express intent like “fitness creators whose audience would buy a protein snack” (an illustrative query).

02

How it works

  1. Profile every creator

    A multi-stage pipeline uses the Claude Messages API to analyze each creator’s niche, audience demographics, content style and commercial potential, producing a consistent text profile.

  2. Embed and index

    Profiles are embedded with OpenAI (1536 dimensions) and stored in PostgreSQL with pgvector for cosine-similarity search.

  3. Rewrite the query

    A brand’s query is rewritten into the same format as the profile text before it is embedded, so queries and profiles land in comparable regions of the vector space.

  4. Rerank with reasons

    GPT-4o-mini reranks the nearest candidates and writes a short, contextual explanation for each recommendation.

Offline: profile → embed → index. Online: rewrite → embed → nearest neighbours → rerank. Creator data to Claude profiling; Claude profiling to OpenAI embeddings · 1536-d; OpenAI embeddings · 1536-d to PostgreSQL + pgvector; Brand query to Rewrite to profile format; Rewrite to profile format to Embed query; Embed query to PostgreSQL + pgvector (cosine top-k); PostgreSQL + pgvector to GPT-4o-mini rerank + reasons; GPT-4o-mini rerank + reasons to Ranked creators. Offline: profile → embed → index. Online: rewrite → embed → nearest neighbours → rerank. Creator data to Claude profiling; Claude profiling to OpenAI embeddings · 1536-d; OpenAI embeddings · 1536-d to PostgreSQL + pgvector; Brand query to Rewrite to profile format; Rewrite to profile format to Embed query; Embed query to PostgreSQL + pgvector (cosine top-k); PostgreSQL + pgvector to GPT-4o-mini rerank + reasons; GPT-4o-mini rerank + reasons to Ranked creators.
Schematic Offline: profile to embed to index. Online: rewrite to embed to nearest neighbours to rerank.

03

Decisions worth explaining

Why rewrite the query?

Brand queries are short and creator profiles are long, so embedding the raw query compares two different kinds of text. Rewriting the query into the profile format first makes the cosine search compare like with like.

Retrieve cheaply, rerank carefully

Vector search narrows 64,000+ profiles to a short candidate list; only that list goes to the LLM reranker, which adds the explanations brands actually read.

04

Stack

  • Python
  • Claude Messages API
  • OpenAI embeddings
  • PostgreSQL
  • pgvector
  • GPT-4o-mini
  • RAG

Client work

Client work at Pias Tech, described at the architecture level. Code and data are proprietary.