Skip to content

" experiment · ../

wp-semantic-search

Ask a WordPress news site questions in plain Portuguese, with answers that cite their sources

Want something like this for your business? → work with me

status
local
started
2025-04
repo
github.com/nunseik/wp-semantic-search
link
retrieval eval in CI
PythonSentence Transformersmultilingual-e5FAISSClaude APIOllamaOpenAIGitHub Actions
0.989recall@5 (multilingual-e5)
0.700recall@5 (English MiniLM)
45eval questions
A real run of the retrieval eval: it builds a fresh index from the 100-article snapshot, checks the 45 questions (one partial miss), and passes with recall@5 0.989. The index build is sped up 12x

A RAG command-line tool for WordPress sites. I built it in April 2025, and in November 2026 I came back to fix what I’d skipped the first time: chunking, citations and a way to measure retrieval.

Pipeline

The eval

I wanted a number, not a feeling. The eval is a fixed snapshot of 100 articles from a Brazilian city’s news site (Itanhaém, June to August 2025) and 45 questions I wrote the way residents would ask them, each paired with the article(s) that answer it. It builds a fresh index and checks the top 5 results.

model recall@5 hit@5 MRR
all-MiniLM-L6-v2 (the original) 0.700 0.733 0.610
intfloat/multilingual-e5-base (now the default) 0.989 1.000 0.978

The site is in Portuguese and MiniLM is an English model. It finds articles that share words with the question but misses paraphrases: “camelô” vs. “ambulantes”, or “doar roupas de frio” vs. “Campanha do Agasalho”. GitHub Actions runs the eval for both models on every push and pull request, and the build fails if recall@5 drops below its baseline.

A bug the upgrade found

The index was built with normalized embeddings, but queries weren’t normalized, so the “cosine” scores weren’t cosine at all. It’s a one-line fix, and the kind of bug you only notice once you’re measuring retrieval.

The honest part

The eval set is small and I wrote it myself. It measures retrieval only, not answer quality. The tool is still a CLI and has never been deployed.


← thermal-bench-macos · world-cup-players →

Need something like this? → work with me

:help portfolio

j / k
scroll down / up, selecting links as you reach them
Enter
open the selected link
gg / G
top / bottom
Ctrl-d / Ctrl-u
half page down / up
/text · n / N
search the page · next / previous match
Ctrl-o / Ctrl-i
jump back / forward
1–4
switch buffer (tabs)
-
go up a directory
:e <name>
open a project, e.g. :e sentinel, :e memoryctl or :e work
:ls
list projects
:q
close the buffer (back to index.md), then try it again

Mouse and touch work too. Esc closes this.