The problem: a customer types "my internet connection drops every few minutes" into your help-center search. You have the answer, an article called "My Wi-Fi keeps disconnecting", but the two share no words, so LIKE returns nothing. And the customer is on the billing page, so you also want only billing articles, updated this year.
The usual fix is an embedding API, a vector store, and code that queries the store, gets ids back, then filters them in SQL. In SynapCores, EMBED() runs inside the database, so the meaning, the filters and the ranking are one SQL statement. This recipe has Claude Code build the search for you.
We build SynapCores. Everything here runs on the free Community Edition.
What you need
- SynapCores Community Edition 2.4.8 or later, running locally. Download it.
- Claude Code, opened in an empty folder.
SYNAPCORES_URLandSYNAPCORES_API_KEYset in your shell. The memory recipe shows how to create the key.- The nine sample articles, saved as
help_articles.sqlin that folder:
CREATE TABLE help_articles (id INTEGER PRIMARY KEY, category TEXT, updated_on TEXT, title TEXT, body TEXT, embedding VECTOR(384));
INSERT INTO help_articles (id, category, updated_on, title, body) VALUES
(1, 'account', '2026-03-02', 'How do I reset my password?', 'Use "Forgot password" on the login page. The reset link expires after one hour.'),
(2, 'connectivity', '2026-09-14', 'My Wi-Fi keeps disconnecting', 'Move the router away from the microwave and update its firmware.'),
(3, 'billing', '2025-11-20', 'How can I change my billing address?', 'Settings > Billing > Edit address.'),
(4, 'app', '2026-08-01', 'The app crashes when I open it', 'Update to the latest version, then clear the app cache.'),
(5, 'data', '2026-01-10', 'Can I export my data to CSV?', 'Yes: Reports > Export > CSV.'),
(6, 'billing', '2026-07-22', 'How do I cancel my subscription?', 'Settings > Plan > Cancel. You keep access until the period ends.'),
(7, 'billing', '2026-10-03', 'Why was I charged twice?', 'A second charge is usually a pending authorisation. It drops off within 5 business days.'),
(8, 'billing', '2024-06-30', 'How do I get a refund?', 'Refunds are issued to the original card within 30 days of purchase.'),
(9, 'account', '2026-05-18', 'Error E-4012 when signing in', 'E-4012 means your single sign-on session expired. Sign out of your identity provider and sign in again.');
VECTOR(384) matches the built-in embedding model (all-minilm, 384 dimensions). No API key for embeddings, no external service.
Step 1: Paste this prompt into Claude Code
Build a help-center search on SynapCores, an AI-native database that computes
embeddings inside SQL with EMBED(). Do the embedding, filtering and ranking in one
SQL statement; don't call an embedding API or add a vector store.
Connection: SynapCores is running at $SYNAPCORES_URL. Send each SQL statement as
POST $SYNAPCORES_URL/v1/query/execute
Headers: Authorization: Bearer $SYNAPCORES_API_KEY, Content-Type: application/json
Body: {"database": "helpdesk", "sql": "<one statement>"}
Results come back in data.columns (a list of {"name", "data_type"}) and data.rows
(a list of rows, each a list of values in column order). Create the database
first with CREATE DATABASE IF NOT EXISTS helpdesk (send that one with "database": "main").
SQL you'll need:
- Embed every row: UPDATE help_articles SET embedding = EMBED(title || '. ' || body)
- Embed one row: UPDATE help_articles SET embedding = EMBED(title || '. ' || body) WHERE id = <id>
- Search:
SELECT id, title, updated_on,
ROUND(COSINE_SIMILARITY(embedding, EMBED('<query>')), 2) AS score
FROM help_articles
WHERE <optional filters on category / updated_on>
ORDER BY score DESC
LIMIT <n>
- Only good matches: add
AND COSINE_SIMILARITY(embedding, EMBED('<query>')) > <min_score>
Build:
1. Load help_articles.sql from this folder (one statement per request), then embed
every row.
2. search.py (Python 3, standard library only) with
search(query, category=None, updated_since=None, min_score=None, limit=3) and
add_article(id, category, updated_on, title, body), which inserts the row and
embeds just that row. Escape single quotes by doubling them. Read the URL and
key from the environment and never print the key.
3. demo.py that prints the results of:
a. search("my internet connection drops every few minutes")
b. search("I was billed two times this month", category="billing", updated_since="2026-01-01")
c. search("forgot my login", min_score=0.5)
d. search("how do I talk to a human", min_score=0.5)
Run demo.py and show me the output.