Show HN: CiteNexus – RAG that refuses to answer when evidence doesn't support it

muthuishere1 pts0 comments

I ve been building an evidence-integrity layer for retrieval — for legal, medical and compliance work, where a confidently wrong answer is worse than no answer. Python is the facade; Go and JS ship the same deterministic core.The part worth your time is not the feature list, it s what happened when I tried to break it.The faithfulness gate — the thing that decides whether a generated answer is actually supported by its cited passage — was set containment: is every token in the answer also in the passage? I wrote 9 adversarial answers, each false with respect to its own source. It accepted all 9.Set containment is closed under deletion, and not is a token. The employee shall disclose confidential information is a strict subset of The employee shall not disclose confidential information. Verbatim-sourced, correctly cited, and the opposite of its source. It s also closed under reordering, so inverting the parties to an obligation is a token-set identity.It failed identically in all three ports — 27/27. That s the part I found most instructive. There was no drift; three implementations agreed perfectly on a wrong specification, and the conformance vectors pinned it in place. A single shared implementation would have been exactly as wrong, in one place instead of three.The predicate is now ordered containment with a bounded gap and a polarity guard. All 9 attacks are permanent test cases.Two other things I found this week that might be more useful than the library:Seven of my conformance files computed their expected values by calling the code under test. They pinned whatever the code did rather than what the spec said. Every suite also guarded vector count with a floor (` 0`), so a fixture shrunk from 39 cases to 1 stayed green in all three languages.And an embedding provider returning a wrong-length batch — first response short by one, next long by one, net count correct — silently shifted every text-to- vector pairing. Three of four queries then retrieved the wrong passage, with row counts, scores and citations all looking healthy. That s now an error before anything is written.The known-broken list is in the changelog at the same level of detail as the features. Example: no is in the abbreviations table (for No. 5 ), so The answer is no. It is denied. never splits into two claims — a refusal fuses with whatever follows it. That s shipped with a test pinning the defect rather than quietly carried.There s no bundled model. Embedding, LLM, reranker and vision are injected, and the documented way to bring one is replacing the function that moves bytes.https://github.com/muthuishere/citenexus

quot answer wrong three citenexus passage

Related Articles