r/synapcores • • 1d ago

Recipe of the week #4: RAG said "Team plan" from an agent's guess; billing says Enterprise. A memory object in SQL answers from the billing note and knows what was true on any past date (real output)

1 Upvotes

Every Monday: one site recipe, run on the current release, real output inline.

(This sub is run by the SynapCores team. Run this morning on 2.5.1.)

The problem

Ask a RAG pipeline "which plan is Harborline on right now?" and it fetches the notes that sound most like the question. Similarity tells you what's relevant, not what's still true.

1. Fourteen notes about one customer

Nine months, including an agent's guess and a call note filed four months late (INSERTs in the first comment):

CREATE TABLE account_notes (note_id INTEGER PRIMARY KEY, account_id TEXT,
  noted_at TIMESTAMP, filed_at TIMESTAMP, source TEXT, body TEXT, embedding VECTOR(384));
UPDATE account_notes SET embedding = EMBED(body);

2. What plain RAG hands the model

SELECT note_id, noted_at, ROUND(COSINE_SIMILARITY(embedding, EMBED('Which plan is Harborline on right now?')), 3) AS relevance, body
FROM account_notes WHERE account_id = 'harborline'
ORDER BY relevance DESC LIMIT 3;

8  2026-08-01 00:00:00  0.637  Harborline upgraded from Pro to the Enterprise plan.
3  2026-03-04 09:00:00  0.627  Harborline signed the Pro plan, billed annually.
13  2026-10-20 07:00:00  0.614  Usage looks lower this month. Harborline may have downgraded to the Team plan.

Three plans, 0.023 apart. Fed those three, the engine's local model (GENERATE, temperature 0) answers:

Harborline is on the Team plan. [note 13, 2026-10-20 07:00:00]

Billing says Enterprise. Note 13 is a guess; it's just the newest.

3. The usual fix, a recency boost

score = 0.7 * similarity + 0.3 / (1 + age_in_days / 30) (query in the comments):

13  0.644  Usage looks lower this month. Harborline may have downgraded to the Team plan.
8  0.52  Harborline upgraded from Pro to the Enterprise plan.
11  0.482  Harborline completed its move from Azure to AWS (...)

Now the guess ranks first. Recency knows how new a note is, not how much to trust it.

4. Remember the notes with time and authority

CREATE MEMORY account_memory IDENTITY account_id;

REMEMBER account_memory FOR account_id = 'harborline'
  'Harborline upgraded from Pro to the Enterprise plan.'
  WITH (attribute = 'subscription_plan', value = 'Enterprise', source_type = 'system_of_record', event_time = '2026-08-01T00:00:00Z');

REMEMBER account_memory FOR account_id = 'harborline'
  'Usage looks lower this month. Harborline may have downgraded to the Team plan.'
  WITH (attribute = 'subscription_plan', value = 'Team', source_type = 'agent_inference', event_time = '2026-10-20T07:00:00Z');

"warnings": ["'subscription_plan' = 'Team' was not accepted as current: lower source authority than the accepted value"]

The guess is stored but doesn't become the answer. The late call note: equal authority, older validity.

5. What's true now: a lookup, not a similarity search

SELECT attribute, value, authority, valid_from, previous_value
FROM _mem_account_memory_state WHERE identity = 'harborline'
  AND attribute IN ('subscription_plan', 'primary_contact', 'contact_channel', 'cloud_provider')
ORDER BY attribute;

cloud_provider  AWS  user_statement  2026-09-15 18:00:00  Azure
contact_channel  Slack Connect  user_statement  2026-09-02 13:00:00
primary_contact  Priya Raman  user_statement  2026-08-19 10:00:00  Dana Okafor
subscription_plan  Enterprise  system_of_record  2026-08-01 00:00:00  Pro

TRACE ... ATTRIBUTE subscription_plan is the receipt: the upgrade note verbatim, system_of_record, 2026-08-01, supersedes Pro.

6. What was true on a past date

Ticket 4412 was opened 2026-06-30 08:40. What was true then?

RECALL account_memory FOR account_id = 'harborline'
  ABOUT 'Which cloud was Harborline on?' WITH (as_of = '2026-06-30T08:40:00Z');

"intent": "historical"
cloud_provider: Azure  primary_contact: Dana Okafor  subscription_plan: Pro

Five account questions (scoreboard in the first comment): plain RAG 3 right, RAG + recency 4, memory 5, each with its source note.

Recipe (~15 min): https://synapcores.com/recipes/agents/stop-rag-answering-with-outdated-facts?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-recipe-4

Free Community Edition: https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-recipe-4

Join the sub and Recipe of the week #5 lands in your feed next Monday.

When two notes in your RAG store disagree, what decides which one wins: the newest, the source, or nobody?


r/synapcores • • 4d ago

Ask the maintainers #4: if you edit a row, does vector search see the edit? No: a stored vector is a snapshot. One query lists the stale rows, one UPDATE re-embeds just those (real output)

1 Upvotes

Fourth "Ask the maintainers" thread: ask anything about SynapCores (install, a query that misbehaves, "can it do X") or show what you built. We answer here; good questions get a longer answer in the Wednesday build log.

(This sub is run by the SynapCores team. Everything below ran today on 2.5.1 on a Mac mini (Apple M4), real output.)

This week's starter question: "I edited some help articles. Does vector search pick up the edits?"

Not by itself. UPDATE kb SET embedding = EMBED(...) stores a snapshot of the text at that moment. Edit the body later and the row shows the new text, but search still ranks it by the old meaning. Here it is on last week's 10 sample help articles.

1. Embed, then edit 3 articles the way a CMS would

CREATE TABLE kb (id INTEGER PRIMARY KEY, title TEXT, body TEXT, embedding VECTOR(384));
-- the same 10 articles as #3 (full INSERT in the first comment)
UPDATE kb SET embedding = EMBED(title || '. ' || body);

UPDATE kb SET body = 'Email changes now need two-factor authentication. Turn on 2FA under Settings > Security, enter the code from your authenticator app, then type the new address.' WHERE id = 7;
-- id 5: refunds now go to store credit first; id 10: carrier trace after 24 hours instead of 48

2. Search still sees the old text

SELECT id, title, ROUND(COSINE_SIMILARITY(embedding,
       EMBED('how do I turn on two-factor authentication?')), 2) AS score
FROM kb ORDER BY score DESC LIMIT 3;

3  ERR-4012: payment token expired    0.28
7  Change the email on an account     0.2
4  ERR-4021: duplicate order blocked  0.15

Article 7 now explains how to turn on 2FA, and it still ranks below an error-code article.

3. Which rows are stale? Compare each stored vector with a fresh one

SELECT id, title, ROUND(COSINE_SIMILARITY(embedding, EMBED(title || '. ' || body)), 3) AS still_matches
FROM kb WHERE COSINE_SIMILARITY(embedding, EMBED(title || '. ' || body)) < 0.9999
ORDER BY still_matches;

7   Change the email on an account            0.746
5   Refund takes 5 to 10 business days        0.862
10  Order shows delivered but did not arrive  0.998

An unchanged row scores 1.0 (same model, same text, same vector), so anything under 0.9999 was edited after it was embedded. Even the one-number edit (48 hours to 24) shows up, and the score tells you how far the meaning moved.

4. Re-embed just those, then search again

UPDATE kb SET embedding = EMBED(title || '. ' || body) WHERE id IN (7, 5, 10);

rows_affected: 3

-- step 2's search again:
7  Change the email on an account     0.46
3  ERR-4012: payment token expired    0.28
4  ERR-4021: duplicate order blocked  0.15

"can I get store credit instead of a card refund?" moves the same way: the refund article goes from 2nd (0.34, behind "Card payment declined" at 0.42) to 1st (0.54).

One gotcha if you re-embed on write

UPDATE kb SET body = 'When a product is recalled we offer a refund, a replacement or store credit. We email a prepaid return label within 24 hours.',
              embedding = EMBED(title || '. ' || body) WHERE id = 9;

-- step 3's check afterwards:
9   Product recall policy   0.797

That embeds the old body: every expression in a SET sees the row as it was before the UPDATE (standard SQL). Row 9's stored vector matches the old text at 1.0. Put the new text in both places (SET body = '...', embedding = EMBED(title || '. ' || '...'), same string twice) and the stale count comes back 0.

On a bigger table: with 1,000 rows and 10 of them edited, the check took 0.04 to 0.07 s and re-embedding the 10 rows 0.05 s. Keep it as two statements: EMBED inside an UPDATE's WHERE isn't supported yet ("AI function executor not available"), and WHERE id IN (SELECT ...) works but took 37 s there.

Free Community Edition: https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-ask-1120

Ask us anything below. Our question for you: how do you keep embeddings in sync today: a full re-embed on a schedule, on every write, or not yet?


r/synapcores • • 6d ago

Build log #3: 2.5.1 is out. Decision payloads written for llama-server now work unchanged, so we triaged 6 app reviews with one call each: topic, "will they leave?" and severity, 0 output tokens, ~0.6 s per review on a laptop CPU (real output)

1 Upvotes

Weekly build log: what shipped and one thing we ran this morning to show it. (This sub is run by the SynapCores team.)

The headline: 2.5.1 (out Saturday) speaks the same decision payload as llama-server

Build log #2 introduced one-call decisions with d1 (POST /v1/systemone): typed questions about a piece of text, answered with a choice, a yes/no probability or a score, and zero generated tokens. In 2.5.1 a yes/no (noul) question can carry a criteria field, like every other question type. llama-server ignores that field, and now so does SynapCores, so a client that builds every question the same way works unchanged.

What we ran this morning (2.5.1-ce on a Mac mini, Apple M4)

Six app-store reviews, one call each, three questions per call. Note criteria on the yes/no question:

"topic":    {"type": "choice", "instructions": "What is this review about?",
             "criteria": {"bug": "something is broken", "feature": "asks for something new",
                          "billing": "charges, refunds, plans", "praise": "happy, no request"}},
"leave":    {"type": "noul", "instructions": "Does the reviewer say they will cancel, uninstall or switch?",
             "criteria": {"yes": "says they will leave", "no": "anything else"}},
"severity": {"type": "score", "instructions": "How bad is the problem for this user?",
             "criteria": ["none", "annoying", "blocks them", "losing money or data"]}

Response for the first review (trimmed):

"topic":    {"choice": "bug", "probabilities": {"bug": 0.677, "billing": 0.312, "praise": 0.006, "feature": 0.004}},
"leave":    {"noul": 0.819},
"severity": {"score": 2.48, "probabilities": {"0": 0.044, "1": 0.110, "2": 0.167, "3": 0.680}},
"usage":    {"input_tokens": 186, "output_tokens": 0}

All six:

review                                              topic           leave  severity
"Crashed three times today while I was paying..."   bug (0.68)      0.82   2.48
"Would love a dark mode for the reading view..."    feature (0.91)  0.01   0.16
"Charged twice for my annual plan and support..."   billing (0.97)  0.06   1.87
"Best budgeting app I've used..."                   praise (0.90)   0.01   0.02
"Since the last update the sync button does..."     bug (0.99)      0.80   2.40
"Is there a way to export everything to CSV?"       feature (0.89)  0.03   0.24

escalate today (leave > 0.7 or severity >= 2): reviews 1 and 5

0.50 to 0.83 s per call once d1 is loaded (the first call after a restart loads it: 7.3 s). Same numbers on three runs.

The first review is the interesting one: d1 says bug, but gives billing 0.31 because the crash happened while paying. The doubt is in the numbers, so anything under ~0.8 confidence can go to a person. Both reviewers who say they're leaving (0.82, 0.80) reported bugs; the feature requests sit at 0.01 to 0.03.

Also in 2.5.1

  • Fresh Apple-Silicon Macs install cleanly: the installer creates the install prefix when /usr/local/bin isn't there yet.
  • The OpenClaw memory plugin package ships its built entry point, so a source install works out of the box.
  • Drop-in upgrade from 2.5.0, no data migration.

New on the other subs today

Coming up: Ask the maintainers #4 on Friday, Recipe of the week #4 on Monday. Join the sub to get them in your feed.

Free Community Edition (2.5.1): https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-buildlog-3

What's the one yes/no question you'd ask about every review or ticket that comes in?


r/synapcores • • 8d ago

Recipe of the week #3: a RAG answer gate in one SQL statement. Top-3 retrieval blocked a correct answer over an HR wiki line; a similarity floor fixed it, and wrong answers still get blocked (real output)

1 Upvotes

Every Monday: one recipe from the site, run on the current release, key query and real output inline.

(This sub is run by the SynapCores team. Run this morning on 2.3.2 with the bundled nli-default model.)

The problem

Your RAG pipeline retrieves passages, an LLM drafts an answer, and it ships whether or not the evidence backs it. Here the whole check is one SQL statement: COSINE_SIMILARITY retrieval feeds NLI_ANCHORS, which feeds NLI_VERIFY, and only a TRUTH verdict gets written.

1. Evidence, relevant and not

CREATE TABLE recipe_raggate_evidence (id INT PRIMARY KEY, source TEXT, body TEXT, embedding VECTOR(384));
-- 1 deploy-log  'The deployment finished at 14:02 with zero failed checks.'
-- 2 deploy-log  'All 46 post-deploy probes passed.'
-- 3 facilities  'Lunch was served in the cafeteria.'
-- 4 hr-wiki     'New hires must complete security training in week one.'
-- embedding = EMBED(body), inside the engine

2. Look at what retrieval returns before you trust it

SELECT id, source, ROUND(COSINE_SIMILARITY(embedding, EMBED('deployment result')), 2) AS sim
FROM recipe_raggate_evidence ORDER BY sim DESC;

1  deploy-log  0.48
2  deploy-log  0.37
4  hr-wiki     0.13
3  facilities  0.01

3. The trap: top-k feeds the verifier junk

Check the answer "The rollout completed without failures." against the top 3 rows:

SELECT NLI_VERIFY('nli-default', 'The rollout completed without failures.', NLI_ANCHORS(body)) AS gate
FROM (SELECT body FROM (SELECT body, COSINE_SIMILARITY(embedding, EMBED('deployment result')) AS sim
                        FROM recipe_raggate_evidence ORDER BY sim DESC LIMIT 3) ranked) top_k;

"verdict": "LIE", "confidence": 0.971,
"violated_anchor": "New hires must complete security training in week one."

A correct answer, blocked by a sentence about onboarding. The unrelated HR line scores as a contradiction, and contradiction outranks entailment, so one junk row outvotes two good ones. Top-k guarantees k rows, not relevant ones.

4. The fix: a similarity floor decides what the verifier sees

SELECT NLI_VERIFY('nli-default', 'The rollout completed without failures.', NLI_ANCHORS(body)) AS gate
FROM (SELECT body, COSINE_SIMILARITY(embedding, EMBED('deployment result')) AS sim
      FROM recipe_raggate_evidence) scored
WHERE sim > 0.3;

"verdict": "TRUTH", "confidence": 0.998,
"matched_anchor": "The deployment finished at 14:02 with zero failed checks."

Only the two deploy-log rows clear 0.3. Pick the floor from step 2 on your corpus; 0.3 is right for this data, not a universal constant.

And the floor doesn't make the gate soft. A wrong answer, "Two checks failed during the rollout.", through the same query:

"verdict": "LIE", "confidence": 0.999,
"violated_anchor": "The deployment finished at 14:02 with zero failed checks."

5. The gate as an INSERT: nothing unverified reaches the answers table

INSERT INTO recipe_raggate_answers (id, question, answer, verdict, confidence)
SELECT 1, 'Did the rollout succeed?', '<answer>', JSON_UNQUOTE(JSON_EXTRACT(gate, '$.verdict')), ...
FROM (<the step 4 query>) verified
WHERE JSON_UNQUOTE(JSON_EXTRACT(gate, '$.verdict')) = 'TRUTH';

correct answer:      rows_affected: 1   (TRUTH, 0.998)
"Two checks failed": rows_affected: 0

The gate is the WHERE clause (full statement in the first comment). Retrieval, verification and the write are one round trip, and both models (embeddings and NLI) run inside the engine, next to the data.

6. No evidence, no pass

Ask about something the table doesn't cover ("quarterly revenue figures") and the floor leaves 0 rows. NLI_VERIFY then refuses outright (NLI truth_anchors requires 1..=32 entries) instead of returning a verdict, so check the count first and treat "nothing retrieved" as its own answer: serve nothing, or serve it marked unverified.

Full recipe (every statement, ~15 min): https://synapcores.com/recipes/ml/029_rag_answer_gate?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-recipe-3

Run it yourself: free Community Edition, https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-recipe-3

Join the sub and Recipe of the week #4 lands in your feed next Monday.

In your RAG setup, what does the system do today when retrieval comes back with nothing relevant: answer anyway, refuse, or something else?


r/synapcores • • 11d ago

Ask the maintainers #3: "keyword search or vector search?" Both, in one SELECT. Meaning finds "phone wallet" = Apple Pay, an exact match pins ERR-4012 to the right article (real output)

1 Upvotes

Third "Ask the maintainers" thread: ask anything about SynapCores (install, a query that misbehaves, "can it do X") or show what you built. We answer here; good questions get a longer answer in the Wednesday build log.

(This sub is run by the SynapCores team. Everything below ran this morning on 2.3.2, real output.)

This week's starter question: "For a help-center search, should I use keyword search or vector search?"

Both, without two systems. Customers describe problems in their own words (meaning search), but they also paste exact codes: error codes, SKUs, order numbers, and then the article with that code should win. In SynapCores both signals are columns in one SELECT, so you add them.

1. Ten help articles, embedded in one statement

CREATE TABLE kb (id INTEGER PRIMARY KEY, title TEXT, body TEXT, embedding VECTOR(384));
-- 10 articles: card declined, Apple Pay, ERR-4012, ERR-4021, refunds,
-- slow checkout, change email, SKU-77310 recall, recall policy, missing delivery
UPDATE kb SET embedding = EMBED(title || '. ' || body);

rows_affected: 10

EMBED() runs a model inside the engine, no API key.

2. Meaning handles the customer's own words

"my payment keeps failing on my phone wallet". No article contains "phone wallet":

SELECT id, title FROM kb WHERE body LIKE '%phone wallet%' OR title LIKE '%phone wallet%';

(0 rows)

SELECT id, title, ROUND(COSINE_SIMILARITY(embedding,
       EMBED('my payment keeps failing on my phone wallet')), 2) AS score
FROM kb ORDER BY score DESC LIMIT 3;

2  Apple Pay and Google Pay troubleshooting  0.58
1  Card payment declined                     0.45
3  ERR-4012: payment token expired           0.38

3. Exact codes want an exact match too

"customer gets ERR-4012 when paying with Apple Pay", by meaning only:

2  Apple Pay and Google Pay troubleshooting  0.60
3  ERR-4012: payment token expired           0.52

The general wallet article edges out the ERR-4012 one, since most of the words are about Apple Pay. Same with "is SKU-77310 affected by the recall?": the general recall policy (0.50) edges out the article about that exact SKU (0.40).

4. Both signals in one query

Score = meaning + 0.5 if the article contains the exact code:

SELECT id, title, ROUND(sim, 2) AS meaning, exact, ROUND(sim + 0.5 * exact, 2) AS score
FROM (SELECT id, title,
             COSINE_SIMILARITY(embedding, EMBED('customer gets ERR-4012 when paying with Apple Pay')) AS sim,
             CASE WHEN title LIKE '%ERR-4012%' OR body LIKE '%ERR-4012%' THEN 1 ELSE 0 END AS exact
      FROM kb) x
ORDER BY score DESC LIMIT 3;

id  title                                     meaning  exact  score
3   ERR-4012: payment token expired           0.52     1      1.02
2   Apple Pay and Google Pay troubleshooting  0.60     0      0.60
1   Card payment declined                     0.34     0      0.34

A 30-line script pulls codes out of the question with a regex ([A-Z]{2,5}-\d{3,6}) and builds that query. Three questions:

customer gets ERR-4012 when paying with Apple Pay   (exact terms: ERR-4012)
   1.02  meaning 0.52  exact 1  #3 ERR-4012: payment token expired
is SKU-77310 affected by the recall?   (exact terms: SKU-77310)
    0.9  meaning 0.4   exact 1  #8 SKU-77310 recall: blender lid
my payment keeps failing on my phone wallet   (exact terms: none)
   0.58  meaning 0.58  exact 0  #2 Apple Pay and Google Pay troubleshooting

Code questions land on the exact article; the plain-language one works as before (no codes, so exact is 0 everywhere). The wallet article stays second, in case that's the real problem.

Why 0.5? Similarity here tops out around 0.7, so +0.5 lets an exact match win without ignoring meaning. Tune it on your own questions, like a similarity threshold. Script + the 10 INSERTs are in the first comment.

Free Community Edition: https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-ask-1113

Your turn: what do you want to ask us? And in your own docs search, do users mostly paste error codes or describe the problem in words?


r/synapcores • • 13d ago

LLM, NLI, ML or a Decision Model? Pick the Right AI by the Output You Need

Thumbnail
youtube.com
1 Upvotes

r/synapcores • • 13d ago

SynapCores 2.5.0 is out: ML, NLI, LLM and now one-call decisions via /v1/systemone, in one database

1 Upvotes

Data used to go to one place, models to another and decisions to a third. With 2.5.0, SynapCores covers the whole loop in a single engine:

  • ๐Ÿ“Š ML: train, evaluate and predict with AutoML, right in SQL
  • ๐Ÿ” NLI: fact-check answers against your own data before you trust them
  • ๐Ÿ’ฌ LLM: generation, RAG with citations and AGENT_RUN, on a built-in local model
  • โšก Decisions, new in 2.5.0: POST /v1/systemone

Decisions in one call

Most "should the agent do X?" questions don't need a chat reply. They need an answer your code can act on. /v1/systemone returns a typed decision instead of prose:

  • a routing choice, with a probability for every option
  • a yes/no probability
  • an urgency score

It runs in a single forward pass and generates zero tokens. It's powered by d1, a model built for making decisions.

One call, one customer complaint ("charged twice, still not shipped"):

route โ†’ billing (0.93) ยท angry โ†’ 0.78 ยท urgency โ†’ "today" (0.79) ยท output_tokens: 0

Use it for routing, triage, guardrail checks and priority scoring, with results returned as structured JSON.

Also in 2.5.0

  • One default chat model (qwen2.5:7b) for chat, AGENT_RUN and natural-language tools
  • Cypher CREATE accepts comma-separated patterns
  • Faster batch embeddings when running against Ollama
  • A drop-in upgrade from 2.4.x: your existing data and vectors work as they are

Get started

docker pull synapcores/community:v2.5.0-ce
synapcores --config gateway.toml pull d1:latest

Community Edition, free. Tell us what you build with it ๐Ÿ‘‡


r/synapcores • • 13d ago

Build log #2: 2.5.0 is out. One HTTP call returns "route to billing (0.92), angry 0.78, urgency today" with 0 output tokens in ~0.5 s on a laptop CPU (real output), plus what else landed

1 Upvotes

Weekly build log: what shipped and one thing we ran this morning to show it. (This sub is run by the SynapCores team.)

The headline: 2.5.0 is out (today), with one-call decisions: POST /v1/systemone

Most "should the agent do X?" questions don't need a chat completion. You don't want a paragraph, you want something you can if on: which team, is the customer angry, how urgent. The new endpoint returns exactly that, from d1, a small decision model: a choice with a probability for every option, a yes/no probability, or a score on a scale you define. It reads the options instead of writing text, so every answer reports output_tokens: 0.

What we ran this morning (2.5.0-ce build 575 on a Mac mini, Apple M4)

One-time pull, about 2.7 GiB:

synapcores --config gateway.toml pull d1:latest
installed library/d1:latest (architecture=lfm2, size=2.7 GiB, digest=sha256:fe008a6acf70)

Then one call per support ticket, three questions each:

curl -s -X POST localhost:8080/v1/systemone -H "Authorization: Bearer $TOKEN" \
  -H 'content-type: application/json' -d '{
  "model": "d1:latest",
  "state": "You charged my card twice and still have not shipped my order. I need this sorted TODAY or I am disputing the charge.",
  "questions": {
    "route":   {"type": "choice", "instructions": "Which team should handle this?",
                "criteria": {"billing": "payments/refunds", "shipping": "delivery", "technical": "bugs"}},
    "angry":   {"type": "noul", "instructions": "Is the customer angry?"},
    "urgency": {"type": "score", "instructions": "How urgent?",
                "criteria": ["can wait", "this week", "today", "right now"]}}}'

Response (trimmed):

"route":   {"choice": "billing", "probabilities": {"billing": 0.922, "shipping": 0.065, "technical": 0.013}},
"angry":   {"noul": 0.777},
"urgency": {"score": 2.20, "probabilities": {"0": 0.001, "1": 0.001, "2": 0.792, "3": 0.206}},
"usage":   {"input_tokens": 188, "output_tokens": 0}

Same three questions on four tickets:

ticket                                              route            angry  urgency           time
"charged my card twice ... TODAY or I dispute"      billing (0.92)   0.78   today (2.20)      622 ms
"change the delivery address on order 4471?"        shipping (0.97)  0.01   today (2.27)      475 ms
"app logs me out on the settings page, annoying"    technical (0.96) 0.19   this week (0.67)  534 ms
"tracking says 'label created' for 9 days. ridic."  shipping (0.91)  0.98   today (1.80)      479 ms

The polite address change and the furious tracking complaint both go to shipping, but only one of them should be flagged for a senior agent, and angry (0.01 vs 0.98) is the number you branch on. urgency is fractional on purpose: 2.20 means "today, leaning toward right now".

Use it as if confidence > 0.8: assign(choice) else: human_triage().

Full guide (choice / noul / score, using other models): https://synapcores.com/blog/decision-model-d1-systemone

Also in 2.5.0

  • DROP MODEL name; and the other model/experiment commands handle a trailing ;, so teardown scripts re-run cleanly.
  • The embedded local provider defaults to qwen2.5:7b everywhere.
  • Cypher CREATE (a), (b)-[:R]->(c) accepts a comma-separated pattern list, like standard Cypher.
  • Faster batch embeddings against Ollama via /api/embed.
  • Drop-in upgrade from 2.4.x: no on-disk format change.

New on the other subs today

Coming up: Ask the maintainers #3 on Friday, Recipe of the week #3 on Monday. Join the sub to get them in your feed.

Free Community Edition (2.5.0): https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-buildlog-2

What would you route with one call first: support tickets, alerts, or PRs?


r/synapcores • • 15d ago

Recipe of the week #2: 6 new facts for an agent's memory, 3 contradict it. One SQL query sorts them into CONFLICT / ALREADY_KNOWN / NEW before anything is stored (real output)

1 Upvotes

Every Monday: one recipe from the site, run on the current release, key query and real output inline.

(This sub is run by the SynapCores team. Run this morning on 2.3.2 with the bundled nli-default model.)

The problem

An agent's memory gets written by many hands: the chat, a CRM sync, a scraper, another agent. Sooner or later two disagree. The office is in Denver and Chicago. The plan has 14-day returns and "does not allow returns". Store both and recall serves whichever is closer to the question; the agent never knows it holds two beliefs that can't both be true.

This recipe checks a batch of incoming facts before they're written, in one SQL statement.

1. Two tables: what it believes, what just arrived

Both have fact TEXT, embedding VECTOR(384), filled with EMBED(fact).

  • memories: (1) contact by email, never by phone; (2) Aurora plan, includes a 14-day return window; (3) manages procurement at a logistics company; (4) office is in Denver
  • incoming: 101 chat: asked us to call them by phone from now on; 102 crm-sync: works in logistics procurement; 103 webinar-tool: attended the October webinar; 104 scraper: office is in Chicago; 105 agent-b: plan does not allow returns; 106 chat: is learning the cello

2. Why it takes two signals

An NLI model reads two sentences and scores whether they contradict. Hand it two sentences about different things and it often still says "contradiction". Every pair scoring above 0.6 (query in the first comment):

incoming memory similarity contradiction
104 4 0.740 0.999  real (office)
105 2 0.524 1.0    real (returns)
101 1 0.502 0.999  real (contact)
104 2 0.408 0.76   office vs plan
103 3 0.366 0.888  webinar vs job
106 1-4 0.13-0.24 0.996-1.0  cello vs everything

Nine "contradictions", three real. The contradiction score can't separate them; similarity can (real 0.50โ€“0.74, the rest 0.41 or below). So only ask NLI about memories on the same topic. The recipe sets the floor at 0.45, read from this data.

3. The whole batch in one query

EMBED similarity picks the related memories, NLI_ANCHORS gathers them per fact, NLI_VERIFY checks the fact against them, and a LEFT JOIN keeps facts with nothing related as NEW:

SELECT i.id, i.source,
       CASE g.verdict WHEN 'LIE' THEN 'CONFLICT' WHEN 'TRUTH' THEN 'ALREADY_KNOWN' ELSE 'NEW' END AS status,
       g.conflicts_with
FROM recipe_memcheck_incoming i
LEFT JOIN (
  SELECT c.id AS cand_id,
    JSON_UNQUOTE(JSON_EXTRACT(NLI_VERIFY('nli-default', c.fact, NLI_ANCHORS(m.fact)), '$.verdict')) AS verdict,
    JSON_UNQUOTE(JSON_EXTRACT(NLI_VERIFY('nli-default', c.fact, NLI_ANCHORS(m.fact)), '$.violated_anchor')) AS conflicts_with
  FROM recipe_memcheck_incoming c CROSS JOIN recipe_memcheck_memories m
  WHERE COSINE_SIMILARITY(c.embedding, m.embedding) > 0.45
  GROUP BY c.id, c.fact
) g ON g.cand_id = i.id
ORDER BY i.id;

id  source        status         conflicts_with
101 chat          CONFLICT       ...contacted by email, never by phone.
102 crm-sync      ALREADY_KNOWN
103 webinar-tool  NEW
104 scraper       CONFLICT       The customer's office is in Denver.
105 agent-b       CONFLICT       ...Aurora plan, which includes a 14-day return window.
106 chat          NEW

All six sorted correctly, each conflict naming the memory it collides with. 0.16 s on our lab box, no API calls: both models run inside the engine, next to the memories.

4. Store what's safe, queue what conflicts

Save the triage, insert only NEW rows into memory (2 rows: webinar, cello), and the review queue is 101, 104, 105. Which side wins is your policy: 101 ("from now on") is likely a real preference change, so supersede; 104 is a scraper, so keep the CRM value. No contradiction gets stored unseen.

Full recipe (every INSERT, triage table, the same check on MEMORY_STORE / MEMORY_RECALL; ~20 min): https://synapcores.com/recipes/ml/036_agent_memory_contradiction_check_on_write?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-recipe-2

Run it yourself: free Community Edition, https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-recipe-2

Join the sub and Recipe of the week #3 lands in your feed next Monday.

When your agent learns something that contradicts what it already knows, which should win by default: the newest fact, or the most trusted source?


r/synapcores • • 15d ago

Real-Time Fraud Detection API in Under 10 Minutes (Train in SQL, Predict...

Thumbnail
youtube.com
1 Upvotes

r/synapcores • • 18d ago

Ask the maintainers #2: ask anything about SynapCores. To start: "do I need an OpenAI key to use EMBED?" (No. 1,000 tickets embedded in 1.8 s on a laptop, real output)

1 Upvotes

Second "Ask the maintainers" thread. Ask anything about SynapCores here: install trouble, a query that doesn't behave, "can it do X", or show something you built. We answer in this thread, and the good questions get a fuller answer in the Wednesday build log.

(This sub is run by the SynapCores team. Everything below was run this morning on 2.3.2 on a Mac mini (Apple M4), real output.)

This week's starter question: "Do I need an OpenAI key (or any API key) to use EMBED?"

No. The embedding model ships with the engine and runs inside it, so EMBED() is just a SQL function. No key, no per-token bill, and the text you embed stays on your machine. Here it is on 1,000 support tickets.

1. A table with a vector column

CREATE TABLE tickets (id INTEGER PRIMARY KEY, subject TEXT, embedding VECTOR(384));
-- 1,000 rows from a small generator (in the first comment):
SELECT subject FROM tickets WHERE id <= 3;

FYI app crashes when I upload a photo (#5001)
Please fix: password reset email never arrives (#5002)
Hi, order stuck in processing for 3 days (#5003)

2. Embed all 1,000 in one statement

UPDATE tickets SET embedding = EMBED(subject);

1000 rows affected, 1802 ms

That's the whole setup. Under two seconds on a Mac mini (Apple M4), cold.

3. A customer writes in with different words

"I got billed two times for the same purchase." A keyword search finds nothing, because nobody else used those words:

SELECT COUNT(*) AS keyword_hits FROM tickets
WHERE subject LIKE '%billed%' OR subject LIKE '%two times%';

0

Search by meaning instead:

SELECT id, subject,
       ROUND(COSINE_SIMILARITY(embedding, EMBED('I got billed two times for the same purchase')), 2) AS score
FROM tickets ORDER BY score DESC LIMIT 3;

306  Customer says charged twice for one order (#5306)  0.75
404  Customer says charged twice for one order (#5404)  0.75
 38  Customer says charged twice for one order (#5038)  0.74

30 ms, and the question gets embedded in the same query.

4. How many tickets are the same problem?

We know the right answer here (109 tickets are "charged twice"), so we can check where the scores land:

SELECT CASE WHEN subject LIKE '%charged twice%' THEN 'charged twice' ELSE 'everything else' END AS kind,
       COUNT(*) AS tickets, ROUND(MIN(s), 2) AS lowest, ROUND(MAX(s), 2) AS highest
FROM (SELECT subject, COSINE_SIMILARITY(embedding, EMBED('I got billed two times for the same purchase')) AS s
      FROM tickets) x
GROUP BY kind ORDER BY kind;

charged twice     109   lowest 0.53   highest 0.75
everything else   891   lowest -0.05  highest 0.39

A clean gap between 0.39 and 0.53, so a cut-off of 0.45 counts them exactly:

SELECT COUNT(*) AS same_problem FROM tickets
WHERE COSINE_SIMILARITY(embedding, EMBED('I got billed two times for the same purchase')) > 0.45;

109

So "is this a known issue, and how big is it?" is one query against your own table, with no API key anywhere in the setup.

Free Community Edition: https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-ask-1106

What should we answer next? Drop your question below, even if it's "how do I install this on X".


r/synapcores • • 20d ago

Build log #1: 2.4.4 is out. 50 parallel writers into a table with UNIQUE + FOREIGN KEY, 50 commits, 0 retries (real output), plus what else landed in 2.4.x

1 Upvotes

First weekly build log: what shipped, one thing we ran this morning to show it, and the best question from the community this week. (This sub is run by the SynapCores team.)

The headline: 2.4.4 (Nov 3), concurrent writes the way you expect them from Postgres or InnoDB

Two clients inserting different rows into the same table now both commit, even when the table has a UNIQUE column or a FOREIGN KEY. You only get a conflict when two writes really collide: the same key, the same row.

We checked it this morning on a fresh 2.4.4 with a typical multi-tenant shape:

CREATE TABLE tenants (id INTEGER PRIMARY KEY, name TEXT);
INSERT INTO tenants (id, name) VALUES (1, 'acme');
CREATE TABLE users (id INTEGER PRIMARY KEY, tenant_id INTEGER REFERENCES tenants(id), email TEXT UNIQUE);

Then 50 threads, each signing up a different user under the same tenant, all at once (parallel_inserts.py, 20 lines, in the first comment):

def signup(i):
    return sql(f"INSERT INTO users (id, tenant_id, email) VALUES ({i}, 1, 'user{i}@example.com')")

with ThreadPoolExecutor(max_workers=50) as pool:
    results = list(pool.map(signup, range(1, 51)))

Three runs from a clean table:

50 parallel signups: {'committed': 50}
50 parallel signups: {'committed': 50}
50 parallel signups: {'committed': 50}

SELECT COUNT(*) AS users, COUNT(DISTINCT email) AS emails FROM users;
users | emails
50    | 50

And the constraints still do their job:

INSERT INTO users (id, tenant_id, email) VALUES (99, 1, 'user7@example.com');
-> Constraint violation: Duplicate key: row violates a UNIQUE or PRIMARY KEY constraint on table 'users'

INSERT INTO users (id, tenant_id, email) VALUES (98, 42, 'new@example.com');
-> Constraint violation: Foreign key violation: 'main.users' has no matching row in 'main.tenants'

No retry loop in the app. This matters most for agent workloads, where many small writers hit the same tables at once.

Also in 2.4.4: SERIALIZABLE isolation, and REPEATABLE READ that is safe from write skew, the same guarantees you get from SQLite and InnoDB.

Also landed in the 2.4 line

  • 2.4.3: a composite FOREIGN KEY (a, b) matches a composite key whatever the column order, and CREATE TRIGGER IF NOT EXISTS makes migrations safe to re-run.
  • 2.4.0: COPY (SELECT ...) TO LAKE 'path/' WITH (PARTITION_BY = (...)) writes any query result to your object store as Hive-partitioned Parquet in one statement. Read it back with CREATE EXTERNAL TABLE.
  • 2.4.0: SynapCores speaks the Ollama API, so the official ollama Python client works against it unchanged. Our three tutorials on that are here: https://www.reddit.com/r/synapcores/comments/1xgwv6q/

Best question this week (from r/devops7)

On Automate it #4 ("disk full in N days"), u/tom_shafer pointed out that inodes often run out long before disk % looks scary. The answer needed no new table: store df -Pi as its own mount, /:inodes, and the same slope query flags it. In our test, a box at ~41% disk showed app-02 /:inodes 84.1% used, +1.10/day -> full in 14 days. Full reply with the collector line: https://www.reddit.com/r/devops7/comments/1xmveqc/automate_it_4_disk_full_in_n_days_from_one_sql/

New on the other subs today

Coming up: Ask the maintainers #2 on Friday, Recipe of the week #2 on Monday. Join the sub to get them in your feed.

Free Community Edition (2.4.4): https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-buildlog-1

Which one do you want as a full walkthrough next: SERIALIZABLE transactions, COPY TO LAKE, or the Ollama API?


r/synapcores • • 22d ago

Recipe of the week #1: the anomaly model calls a 5-account fraud ring "normal", one graph query from a single chargeback finds all five (real output)

1 Upvotes

First Recipe of the week: every Monday, one recipe from the site, run on the current release, key queries and real output inline.

(This sub is run by the SynapCores team. Everything below was run this morning on 2.3.2.)

The problem

Fraud models score one transaction at a time. That catches the lone fraudster whose payments look strange: huge, 3am, cross-border. It misses a fraud ring: five accounts that each spend like a normal customer but share the same phone and the same stolen cards. The fraud is in the connections, not in any single row.

This recipe builds both views on the same data, in the same database.

1. 123 transactions, one anomaly model, no labels

40 accounts make three ordinary payments each ($20โ€“$199, daytime, domestic). ACC-33 also makes three ~$3,000 payments at 3am, cross-border. The ring (ACC-11 to ACC-15) is hidden among the ordinary accounts; nothing in the table marks it.

CREATE TABLE recipe_ring_tx (tx_id INT PRIMARY KEY, account_id TEXT,
  amount DOUBLE, hour_of_day INT, cross_border INT);
-- 123 rows, full INSERT in the recipe

CREATE EXPERIMENT recipe_ring_exp AS
  SELECT amount, hour_of_day, cross_border FROM recipe_ring_tx
WITH (task_type = 'anomaly_detection', algorithms = ['isolation_forest'],
      max_trials = 5, random_seed = 42);
DEPLOY MODEL recipe_ring_model FROM EXPERIMENT recipe_ring_exp;

2. Score every transaction inside a SELECT

SELECT account_id, amount, hour_of_day, cross_border,
       ANOMALY_SCORE('recipe_ring_model', amount, hour_of_day, cross_border) AS score
FROM recipe_ring_tx ORDER BY score DESC LIMIT 5;

ACC-33   2840.0   3   1   0.82
ACC-33   3120.0   3   1   0.82
ACC-33   2975.0   3   1   0.81
ACC-36    198.0  19   0   0.53
ACC-39     23.0  17   0   0.52

The lone fraudster is on top. Now the ring:

SELECT account_id, amount, ANOMALY_SCORE('recipe_ring_model', amount, hour_of_day, cross_border) AS score
FROM recipe_ring_tx WHERE account_id IN ('ACC-11','ACC-12','ACC-13','ACC-14','ACC-15')
ORDER BY score DESC;

All 15 ring payments score 0.45 to 0.51, exactly like honest customers. The model is right: each payment is ordinary.

3. Same database, a graph of accounts, devices and cards

The ring shares identifiers in a chain: ACC-11 and ACC-12 share a phone, ACC-12 and ACC-13 share a card, and so on. ACC-21 and ACC-22 share a household tablet (honest, not linked to the ring).

MERGE (acc_12:Account {id: "ACC-12", src: "recipe-012"})
MERGE (card_4242:Card {id: "CARD-4242", src: "recipe-012"})
MERGE (acc_12)-[:PAYS_WITH]->(card_4242)
-- 23 nodes, 18 edges in the recipe

ACC-13 has a confirmed chargeback. Walk 2โ€“4 hops out from it:

MATCH p = (s:Account {id: 'ACC-13'})-[*2..4]-(x:Account)
WHERE x.id <> 'ACC-13'
RETURN x.id AS linked_account, [n IN nodes(p) | n.id] AS via
ORDER BY length(p);

ACC-14   ACC-13 > DEV-778 > ACC-14
ACC-12   ACC-13 > CARD-4242 > ACC-12
ACC-15   ACC-13 > DEV-778 > ACC-14 > CARD-9001 > ACC-15
ACC-11   ACC-13 > CARD-4242 > ACC-12 > DEV-777 > ACC-11

One chargeback, the whole ring, and the chain that proves each link. The household pair isn't returned.

4. One review queue: model OR graph

Save the ring as a table (recipe_ring_members), then one SQL query joins it with each account's highest anomaly score:

account   max_anomaly   linked_via
ACC-33    0.82          NULL  <- caught by the model
ACC-15    0.51          DEV-778 > CARD-9001
ACC-12    0.51          CARD-4242
ACC-13    0.49          chargeback
ACC-14    0.48          DEV-778
ACC-11    0.48          CARD-4242 > DEV-777

Five of those six would never cross a 0.7 threshold. The model found one fraudster, the graph found five.

The full recipe (every INSERT, the full graph, the queue query, cleanup; ~12 minutes): https://synapcores.com/recipes/anomaly-detection/012_fraud_rings_ml_misses?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-recipe-1

Run it yourself: free Community Edition, https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-recipe-1

Join the sub and Recipe of the week #2 shows up in your feed next Monday.

Which signal does your team have today: a score per transaction, a list of shared devices or cards, or neither?


r/synapcores • • 25d ago

Ask the maintainers #1: ask anything about SynapCores. To start: "if two notes score 0.88 similarity, do they agree?" (real output)

1 Upvotes

First "Ask the maintainers" thread. Ask anything about SynapCores here: install trouble, a query that doesn't behave, "can it do X", or show something you built. We answer in this thread, and the good questions get a fuller answer in the Wednesday build log.

(This sub is run by the SynapCores team. Everything below was run this morning on 2.3.2, real output.)

To start, a question that comes up every time someone builds on embeddings: "if two notes score 0.88 similarity, do they agree?"

No. Similarity means "about the same thing", not "says the same thing". Four pairs of status notes, earlier vs later:

CREATE TABLE status_notes (id INTEGER PRIMARY KEY, earlier TEXT, later TEXT);
INSERT INTO status_notes (id, earlier, later) VALUES
 (1, 'The nightly backup finished successfully at 02:14.', 'The nightly backup failed at 02:14.'),
 (2, 'The nightly backup finished successfully at 02:14.', 'Last night''s backup completed without errors.'),
 (3, 'The deploy to production was rolled back.', 'We reverted the production release.'),
 (4, 'The deploy to production was rolled back.', 'Version 2.8 is live in production.');

Score each pair two ways: embedding similarity, and an NLI model that reads both sentences and says whether the second contradicts the first. Both run inside the query:

SELECT id, later,
       ROUND(COSINE_SIMILARITY(EMBED(earlier), EMBED(later)), 2) AS similarity,
       ROUND(JSON_EXTRACT(NLI_CLASSIFY('nli-default', earlier, later), '$.scores.contradiction'), 2) AS contradiction
FROM status_notes ORDER BY id;

1  The nightly backup failed at 02:14.               similarity 0.88  contradiction 1.0
2  Last night's backup completed without errors.     similarity 0.74  contradiction 0.0
3  We reverted the production release.               similarity 0.64  contradiction 0.0
4  Version 2.8 is live in production.                similarity 0.39  contradiction 0.99

The top similarity score (0.88) is the pair that says the opposite: one word changed, so the embeddings barely move. The true paraphrase scores lower (0.74). And pair 4 has low similarity but is a flat contradiction. Pick any similarity threshold and you get one of these wrong.

So when you need "does this new fact conflict with what we already have?" (agent memory, runbooks, status pages, RAG answers), filter on the contradiction score:

SELECT id, later FROM status_notes
WHERE JSON_EXTRACT(NLI_CLASSIFY('nli-default', earlier, later), '$.scores.contradiction') > 0.9;

1  The nightly backup failed at 02:14.
4  Version 2.8 is live in production.

A practical pattern: use similarity to find the few notes that are about the same thing, then run the contradiction check on just those. No API calls, no tokens; the NLI model runs locally next to your data.

Free Community Edition: https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-ask-1030

What would you like us to answer next? Drop your question below, even if it's "how do I install this on X".


r/synapcores • • 28d ago

New in v2.4.0: 3 Ollama tutorials (rag with one option, plain-English SQL that keeps PII private, a support bot that's just a model name)

1 Upvotes

This sub is run by the SynapCores team.

SynapCores v2.4.0 serves the Ollama API (/api/chat, /api/generate, /api/embed, /api/tagsโ€ฆ), so the official ollama Python client works against it unchanged. We recorded three short tutorials on what that buys you. Same client, same model (qwen2.5:7b) in all three. Every output below is pasted from the real runs; the docs and CRM data are synthetic.


1. One option makes your Ollama app answer from your docs (2:45) โ€” https://youtu.be/ZTyk7vSzIu4

SynapCores watches a folder (orbit_support, 4 markdown files) and indexes it. Your chat call adds one option:

client = ollama.Client(host=SYNAPCORES_URL, headers={"Authorization": "Bearer " + API_KEY})
r = client.chat(model="qwen2.5:7b",
                messages=[{"role": "user", "content": q}],
                options={"rag": {"source": "filesystem:orbit_support", "top_k": 2}})

"How many years of warranty does the Orbit X2 Pro have?"

  • Plain call: "Typically, consumer routers come with a one-year warranty as standard."
  • With rag: "The Orbit X2 Pro router has a 5-year warranty." Source header: filesystem:orbit_support/warranty.md#0

No loader, no chunker, no separate vector database.


2. Ask your database in plain English; emails and cards stay private (2:34) โ€” https://youtu.be/3Za0jzLzJU4

A ReadOnly API key is granted three columns of one table: orbit_crm.customers(company, plan, mrr_usd). Same client, with that key and "rag": {"source": "database:orbit_crm"}. The engine writes the SQL, runs it under the key's grants, and returns the SQL it ran.

raw SQL with this key: HTTP 403 This API key can only ask questions from its permitted database data

Q: Which customer pays us the most per month?
A: The customer that pays us the most per month is Harbor Logistics [SQL 1].
   ran: SELECT company FROM customers ORDER BY mrr_usd DESC LIMIT 1

Q: Give me the contact email and card last 4 digits for Harbor Logistics.
A: Cannot answer from the permitted data.

Q: Which customers have a high churn risk?
A: Cannot answer from the permitted data.

The churn column exists; the key just doesn't include it. It's per-column permissions, not a keyword filter.


3. Ship a support bot as just a model name (2:19) โ€” https://youtu.be/mF608gh62wk

The operator adds an alias to the engine config:

[ollama.aliases.orbit-support]
model = "qwen2.5:7b"

[ollama.aliases.orbit-support.grounding]
source = "filesystem:orbit_support"
mode = "inject"
top_k = 2
strict = true

orbit-support now shows up in every Ollama client's model list. Pick it, and answers come from the docs, with no rag field and no code change.

"What does error E-700 mean on the Orbit X2 Pro?"

  • qwen2.5:7b: guesses a firmware problem and suggests a factory reset that erases the device.
  • orbit-support: "the mesh backhaul signal is too weakโ€ฆ move the M1 node within 10 meters of the router or use a wired backhaul."

On a question the docs don't cover (price matching), it says the context doesn't contain that instead of inventing a policy. With strict = true, a retrieval failure returns an error instead of an answer from model memory.


Recorded on the v2.4.0 release candidate (the on-screen tag says v2.3.4); it works the same on v2.4.0.

Free Community Edition: https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-02

Which of the three would you try first, and on what docs or data?


r/synapcores • • 29d ago

Start here: what SynapCores is, how to install it, the 5 recipes to try first, and what gets posted here each week

1 Upvotes

If you landed here from a video or a recipe link: welcome. This post is the map.

What SynapCores is, in 3 lines

  • A self-hosted SQL database with the AI parts built into the engine: embeddings, similarity search, anomaly models, fact-checking (NLI), agent memory and a graph, all callable from SQL.
  • Runs on a laptop or one server (macOS, Linux, Docker). The models run locally, so no API keys and your data stays on your machine.
  • Free Community Edition. (Disclosure, since you're on our sub: this sub is run by the SynapCores team.)

What it looks like

Five error messages from a real on-call week, and a question that shares no words with the right one:

CREATE TABLE known_errors (id INTEGER PRIMARY KEY, msg TEXT, embedding VECTOR(384));
-- insert your rows, then:
UPDATE known_errors SET embedding = EMBED(msg);

SELECT msg, COSINE_SIMILARITY(embedding, EMBED('the database is unreachable')) AS score
FROM known_errors ORDER BY score DESC LIMIT 3;

connection refused to db-primary:5432                      0.53
OOMKilled: container worker exceeded memory limit 512Mi    0.15
timeout waiting for upstream payments-api after 30s        0.11

That's the whole idea: the model runs inside the database, so "search by meaning" is one SELECT, next to your normal WHERE and JOIN. (Real output from SynapCores 2.3.2, run this morning.)

Install

Download page (one-line installer, Docker image, macOS/Linux): https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-start-here

The 5 recipes to start with (each one is copy-paste, ~10-20 min, with expected output)

  1. Semantic search in a SQL table: the 5-statement version of the query above. https://synapcores.com/recipes/core-foundations/011_semantic_search_sql_table
  2. Fraud rings your ML model misses: an anomaly model in SQL catches the lone fraudster, one graph query finds the ring. https://synapcores.com/recipes/anomaly-detection/012_fraud_rings_ml_misses
  3. RAG answer gate: retrieve, verify the answer against the evidence with NLI, and only then write it. https://synapcores.com/recipes/ml/029_rag_answer_gate
  4. Agent memory that refuses contradictions: a new "fact" that contradicts what the agent already knows gets caught on write. https://synapcores.com/recipes/ml/036_agent_memory_contradiction_check_on_write
  5. MySQL table to Parquet in S3, queried in place: the data-lake setup behind our Snowflake cost video. https://synapcores.com/recipes/data-lake/001_mysql_table_to_s3_parquet

What gets posted here every week

  • Monday: Recipe of the week #N. One recipe walked through with the real output inline.
  • Wednesday: Build log #N. What changed in the engine, what broke, what we fixed. Including the embarrassing bugs.
  • Friday: Ask the maintainers. Ask anything; show what you built.

If that's useful, join the sub and Recipe of the week #1 shows up in your feed next Monday. Want to learn the SQL side from zero? r/SQLv2 has a numbered beginner series (Lesson 1: search by meaning, not keywords).

Ground rules: questions of any level are welcome, bug reports are welcome (please include your version, it is on the first lines the server prints at startup), and criticism is welcome too.

What would you try first: search, anomaly detection, fact-checking, or agent memory?


r/synapcores • • Oct 18 '26

Your RAG Verifier Called a TRUE Answer a LIE

Thumbnail
youtube.com
1 Upvotes

An anomaly model scores 5 ring accounts as normal customers, then one graph query starting from a single chargeback finds the whole ring.

Full tutorial: https://synapcores.com/fraud

#frauddetection #machinelearning #graphdatabase #cypher #shorts


r/synapcores • • Oct 17 '26

Fraud Detection with Machine Learning Misses This (Graph Fix)

Thumbnail
youtube.com
1 Upvotes

Your fraud model scored five accounts as perfectly normal. They were one fraud ring. In this fraud detection tutorial, machine learning (an isolation forest anomaly model) catches the lone fraudster, and a single graph query finds the ring it missed โ€” both in one database, in plain SQL and Cypher.

โ–ถ Free download: https://synapcores.com/download
โ–ถ Run this exact demo (12 min): https://synapcores.com/recipes/anomal...

What you'll learn:
โœ… Why per-transaction machine learning fraud detection can't see fraud rings
โœ… Anomaly detection without labels: train an isolation forest in SQL
โœ… Score every transaction with ANOMALY_SCORE() inside a SELECT (new in SynapCores 2.2)
โœ… Build an identity graph of accounts, devices and cards in Cypher
โœ… Start from one chargeback and find every linked account in under a millisecond
โœ… Merge both signals into one fraud review queue
โœ… The honest limits: seeds, evidence vs proof, and thresholds

โฑ Chapters
00:00 ML scored these 5 accounts "normal"
00:10 The problem: ML scores rows, fraud lives in connections
00:32 The data: 40 accounts and a lone fraudster
00:48 Train an anomaly model in SQL (no labels)
01:03 ANOMALY_SCORE() in a SELECT
01:19 The model can't see the ring
01:38 Build the identity graph in Cypher
01:57 One chargeback โ†’ the whole ring
02:27 One review queue: ML + graph
02:45 Honest limits
03:03 Run it yourself, free

๐Ÿ”— More
โ€ข SynapCores Community Edition (free โ€” macOS, Linux, Docker): https://synapcores.com/download
โ€ข Recipe: https://synapcores.com/recipes/anomal...
โ€ข Fraud ring detection with cycles: https://synapcores.com/recipes/graph/...
โ€ข Anomaly detection in SQL: https://synapcores.com/recipes/anomal...

This video includes AI-generated narration. The demo is real: every query runs live on SynapCores 2.2.0.

#FraudDetection #MachineLearning #AnomalyDetection #GraphDatabase #Cypher


r/synapcores • • Oct 16 '26

Snowflake Too Expensive? Cut Your Data Warehouse Bill 89%

Thumbnail
youtube.com
1 Upvotes

Your Snowflake bill isn't a storage bill โ€” it's a compute bill. A typical marketing agency pays ~$4,800/month to analyze its own data, and only $23 of that is storage. Here's how to run the same reports from Parquet in your own AWS S3 bucket for ~$505/month.

โ–ถ Free download: https://synapcores.com/download
โ–ถ Step-by-step recipe (MySQL โ†’ S3 Parquet โ†’ SQL, ~20 min): https://synapcores.com/recipes/data-l...

In this data engineering breakdown we follow a performance-marketing agency: 3 million ad events a day, ~90 million new rows a month, 40 client dashboards refreshing every hour. We split the bill line by line:
๐Ÿ’ธ Storage: ~$23/month โ€” the same on Snowflake or S3
๐Ÿ’ธ Moving the data: ~$1,800/month in per-row ETL fees
๐Ÿ’ธ Running reports: ~$3,000/month in data warehouse compute

Then we rebuild it: export straight from the app database to Parquet in your S3 data lake on an hourly schedule, query the files in place with SQL, and run it all on one fixed-price server. Result: ~85โ€“89% lower cost โ€” up to ~$80,000 a year โ€” with a fixed monthly bill instead of a variable one.

What you'll learn:
โœ… Why Snowflake costs grow with dashboards and refreshes, not with data size
โœ… How per-row (monthly active rows) ETL pricing scales with your growth
โœ… How to query Parquet in S3 directly with partition filtering
โœ… The real trade-offs: hourly batch vs streaming, fixed capacity vs auto-scaling
โœ… When you should KEEP Snowflake (and when you're overpaying)
โœ… How to test it risk-free: one table, one dashboard, one month

โฑ Chapters
00:00 The $4,800 analytics bill
00:39 Where the money actually goes
01:20 It's an architecture problem
01:33 Trap #1: per-row ETL pipelines
02:22 Hourly batch vs streaming
02:48 Trap #2: data warehouse compute
03:10 Query Parquet directly in S3
03:34 Fixed server vs auto-scaling
04:10 Setup in 3 steps (with self-verification)
04:39 $4,800 vs $505: the savings
04:57 The trade-off: you run the server
05:15 When to keep Snowflake
05:57 Try it: one dashboard, one month

Numbers are an illustrative scenario using public list prices (checked October 2026): Snowflake $2โ€“$4 per credit and $23/TB/month storage, Amazon S3 $0.023/GB-month, an AWS m7g.4xlarge server (~$477/month on-demand), and an assumed ETL rate of $0.01โ€“$0.03 per 1,000 monthly active rows. Your costs depend on your workload โ€” run the free recipe and compare against your own bill.

๐Ÿ”— More
โ€ข SynapCores Community Edition (free โ€” macOS, Linux, Docker): https://synapcores.com/download
โ€ข Recipe: https://synapcores.com/recipes/data-l...
โ€ข Replace Fivetran + Snowflake (blog): https://synapcores.com/blog/replace-f...

This video includes AI-generated visuals and narration.

#Snowflake #DataEngineering #DataWarehouse #AWSS3 #Parquet


r/synapcores • • Oct 16 '26

The Top K Trap Fixing RAG Hallucinations with One Query final

Thumbnail
youtube.com
1 Upvotes

Your RAG pipeline just called a correct answer a LIE โ€” and one irrelevant passage is to blame. In this RAG tutorial, you'll see why AI hallucinations slip through retrieval-augmented generation, and how to stop them with ONE SQL query.

โ–ถ Try it free: https://synapcores.com/download
โ–ถ Run this exact demo (15 min): https://synapcores.com/recipes/ml/029...

Most RAG tutorials retrieve the "top k" passages and ship whatever the LLM writes. We tested that on a real example: a true statement โ€” "The rollout completed without failures" โ€” was marked LIE with 97.1% confidence because a single unrelated HR passage sneaked into the top 3. Flip the same mistake around and a hallucinated answer reaches your users.

One change fixed it: TRUTH, 99.8% confidence, backed by the right evidence.

What you'll learn:
โœ… What AI hallucination in RAG really is โ€” with a real example
โœ… Why top-k retrieval feeds your verifier junk (and how to spot it)
โœ… How to verify LLM responses with natural language inference (NLI)
โœ… The similarity-floor fix that turns LIE into TRUTH
โœ… Verify-then-write: AI guardrails that make it impossible for unverified answers to reach your app
โœ… How to fail closed when retrieval finds no evidence

Everything runs inside the database โ€” vector search, LLM evaluation and the gated write in a single SQL statement. No guardrail sidecar, no second vector store, no extra service.

โฑ Chapters
00:00 A correct answer marked LIE
00:00 Why RAG apps hallucinate
00:00 Retrieve โ†’ verify โ†’ ship in one SQL query
00:00 What does retrieval actually return?
00:00 The top-k trap
00:00 The fix: a similarity floor
00:00 Verify-then-write: 1 row vs 0 rows
00:00 No evidence? Fail closed
00:00 3 takeaways + try it free

๐Ÿ”— Resources
โ€ข SynapCores Community Edition (free โ€” macOS, Linux, Docker): https://synapcores.com/download
โ€ข Full runnable recipe: https://synapcores.com/recipes/ml/029...
โ€ข GraphRAG vs Neo4j: https://synapcores.com/blog/graphrag-...
โ€ข Best AI-native databases in 2026: https://synapcores.com/blog/best-ai-n...

โ“ FAQ
How do you detect hallucinations in a RAG answer? Check the answer against the retrieved evidence with an NLI model โ€” only answers the evidence entails should ship.
What similarity threshold should I use? Calibrate it on your own data: look at real scores and set the floor between relevant and irrelevant passages (0.3 in this demo).

This video includes AI-generated visuals and narration.

#RAG #RAGTutorial #AIHallucination #RetrievalAugmentedGeneration #LLM


r/synapcores • • Oct 14 '26

We Caught an AI Hallucination with SQL ๐Ÿคฏ #Shorts

Thumbnail
youtube.com
1 Upvotes

An AI chatbot invented a feature that doesn't exist. Watch SynapCores catch the contradiction using Natural Language Inference (NLI), directly through SQL.

SynapCores compares AI-generated claims against trusted evidence, helping developers identify hallucinations before users see them.

โœ… AI hallucination detection
โœ… Natural Language Inference (NLI)
โœ… SQL-based claim verification
โœ… Self-hosted AI inference

Explore SynapCores:
https://synapcores.com

NLI documentation:
https://docs.synapcores.com/nli/

#AIHallucination #RAG #SQL #AI


r/synapcores • • Sep 12 '26

v1.15.0-ce is out โ€” real columnar tables, speech-to-text in SQL, and searchable video

1 Upvotes

New release, drop-in upgrade, no migration needed. Highlights:

  • Columnar tables actually work now. ENGINE = SYNAPCORES_COLUMNAR was previously just recorded and ignored โ€” you got a row table. Now it's real: column-pruned reads, parallel scans, inserts/updates/deletes all supported.
  • Direct Parquet import โ€” POST /v1/data/import/parquet, no more CSV/JSON-over-HTTP with a size cap.
  • TRANSCRIBE() โ€” speech-to-text as a SQL function. Upload audio from a browser, query the transcript like any other text.
  • Video understanding โ€” frame-level descriptions with timestamps, searchable alongside the transcript.
  • Vector search accuracy fix โ€” recall went from 0.776 to 0.976. Filters/thresholds were silently being ignored before; now they apply.
  • GPU memory auto-tuning on NVIDIA โ€” sizes concurrency off actual free VRAM instead of a fixed guess of 2.
  • Saved queries now persist server-side (previously lived in-browser and vanished on sign-out).
  • SELECT o.*, c.name FROM ... JOIN ... now works (previously rejected).

Also fixed some rough ones worth knowing about if you're upgrading from an older version โ€” a watched-folder media indexer that was writing fabricated placeholder transcripts instead of real ones, primary keys that silently stopped enforcing after a restart, and indexes that weren't durable across restarts. Full details: https://docs.synapcores.com/releases/

curl -fsSL https://get.synapcores.com | sh or docker pull synapcores/community:v1.15.0-ce


r/synapcores • • Aug 25 '26

GitHub - SynapCores/synapcores-aerospace-rca: AIDB vertical demo: aerospace anomaly investigation memory + DCU telemetry detection.

Thumbnail github.com
1 Upvotes

r/synapcores • • Aug 25 '26

GitHub - SynapCores/synapcores-soar: Open-core SOAR platform for the autonomous SOC. Tier-1 triage agents, immutable audit, MCP portal for examiners. Built on SynapCores.

Thumbnail
github.com
1 Upvotes

r/synapcores • • Aug 21 '26

AI-native database Synapcores / done for you recipes

Thumbnail
youtube.com
1 Upvotes