HinterBuild logoHinterBuild
Learning · 13 min read

Attach Sources So AI Won't Invent Citations

Attach sources so AI will not invent citations: scoped retrieval, chunk IDs, and a renderer that cannot emit unretrieved footnotes.

Muhammad Abdul Sami, author

Muhammad Abdul Sami

· 13 min read

  • Citations
  • RAG
  • Grounded Writing
  • Cadensend

Attach sources so AI doesn’t invent citations is the only reliable citation policy: the model may only point at chunks that exist in a library you supplied, and the HTML is rendered from those IDs — not from a free-text bibliography the model dreamed. Cadensend is HinterBuild’s MIT email curriculum engine with that loop as a pillar: Ground. You upload files or URLs. Structure-aware ingestion keeps headings and section anchors. Retrieval is scoped to workspace and series before the vector store. The writer returns references; a deterministic renderer turns them into links. No hosted signup. MVP sends to your verified address only.

Prompting “please cite real papers” is not a policy. It is a wish. Wishes show up in inboxes as 404 DOIs and train you not to trust the series. HinterBuild ships the engine on GitHub. For production RAG of the same shape, contact or use RAG/LLM systems.

Key Takeaways:

  • Invented citations are a rendering problem, not only a model problem: do not let the model write raw footnote HTML.
  • Attach a closed corpus per series; filter retrieval before the vector query.
  • Content-hash idempotent ingestion so retries do not duplicate junk chunks.
  • Cadensend is not ConvertKit or ChatGPT Projects; those will send or chat whatever bibliography you paste.
  • If the index is garbage, citations will be garbage even with a renderer.

Table of Contents:

Why Models Invent Citations

Short answer: Language models complete plausible academic style. A DOI-shaped token sequence is likely even when the paper is not.

This is Type-1 factual hallucination in LLM hallucination causes and fixes. The model has seen millions of “Smith et al., 2019” patterns. When your lesson needs a receipt, it issues a fake receipt. In a chat, you might notice. In a 12-issue email course, you will internalize the fake paper.

Fine-tuning on “good citations” does not fix it if generation is still unconstrained. Prompting helps a little. Retrieval helps a lot when the chunks are right. Architecture that cannot emit a citation without a chunk id helps most. That is the ranking in RAG vs fine-tuning vs prompting.

ChatGPT Projects will use your files and still invent neighbors (Projects vs syllabus). Kit and Ghost will mail the invention (ConvertKit vs Ghost vs Cadensend). Cadensend’s job is to refuse the invention at render time.

Closed Corpus, Not Open Web

Short answer: Teaching from “the internet” is how you get confident nonsense. Teaching from this folder is how you get auditable lessons.

Cadensend’s writer has no arbitrary network tool. It cannot search the live web to pad a bibliography. That is inconvenient when you forgot to attach the RFC. It is the point. You go attach the RFC.

PKM practice: each series gets an explicit source set. A vault of everything you ever highlighted is not a course corpus; it is a junk drawer. Junk drawers cause RAG pipelines to return garbage: wrong neighbor chunks, headingless blobs, tables smashed into prose. Embeddings then retrieve the grocery list next to the RFC.

URL ingestion is allowed, with SSRF controls, size/type limits, and sanitization. That is not “browse freely.” It is fetch-this-allowlisted-document. Prompt injection in the document cannot register a new tool; retrieved text is data.

ApproachCan invent a paper?Typical use
Prompt onlyYesDrafts you will throw away
ChatGPT Project filesOften yes (style completion)Exploration
RAG without citation gateYes, plus wrong-file quotesMany demos
Scoped RAG + renderer from IDsOnly if you leak a raw HTML pathCadensend Ground/Write
Open-web agentYes, plus SEO spamOut of Cadensend scope

If you need a public magazine, write it in Ghost after a human checks citations. Do not ask an agent to be your bibliography.

Structural Citations vs Prompted Footnotes

Short answer: The model returns {source_id, chunk_id} (plus offsets if you have them). The renderer looks up the stored URL/anchor. The model does not type the href.

If the model types the href, it will type a beautiful lie. Cadensend: “The model returns source and chunk references. A deterministic renderer turns them into links, so citations cannot be fabricated.” That sentence from the product data is the whole post in one breath.

Implementation implications:

  • Output is a validated content tree / block AST, not a string of HTML.
  • Citation nodes fail schema validation without real IDs.
  • Quality gate can score citation coverage (roadmap Update 1 mentions coverage scoring explicitly; MVP already refuses free-floating footnotes).
  • Editorial workspace shows retrieved context so you can see why a claim appeared.

Diagrams as data (Mermaid/D2 → SVG → PNG for email, required alt) follow the same philosophy: the model does not upload a random PNG from the web.

Human-in-the-loop still matters. A chunk can be real and still be the wrong chunk. You inspect, regenerate a section, diff versions. That is teaching, not autopilot.

Scoped Retrieval and Diversification

Short answer: Filter tenant and series first, then vector search, then dedupe by source so one PDF cannot dominate every issue.

Without a series filter, issue 4 of “email deliverability” will quote your “Q3 finance” deck because the embedding of “rate” matched. That is garbage RAG with extra steps. Cadensend queries are filtered to workspace and series before they reach the vector store, then deduped and diversified by source.

Diversification: if the top eight chunks are all from page 1 of the same note, the lesson will parrot that note and ignore the RFC you also attached. MMR-style or source-cap logic is the antidote. HinterBuild uses the same idea in RAG/LLM builds.

Security: tenant isolation in every repository query, tested across tenants, not left to the model. On a laptop you are one tenant (self-host); still use series scope so two personal courses do not cross-contaminate.

Ingestion That Does Not Lie

Short answer: Hash the bytes. Resume. Do not double-embed on retry. Keep structure.

Cadensend ingestion: fetch, parse, chunk, embed, verify — content-hash keyed, safely resumable. If your laptop sleeps mid-embed, you should not get two copies of every paragraph. Duplicate vectors distort retrieval and therefore citations.

Structure-aware parse: heading hierarchy, code blocks, tables, section anchors. A citation to “§2.3” that cannot be opened is a dressed-up hallucination. Anchors make email links useful.

Idempotency here is the cousin of idempotent sends and distributed idempotency. Sends key on issue version; ingest keys on content hash. Both write durable rows before side effects. At scale the queues look like system design for 10 million users. On a syllabus they look like not teaching the same wrong chunk twice.

Verify step: if embedding failed, the source is not “ready.” Generating an issue against a half-index is how you get confident gaps filled by pretraining — i.e., invented citations.

Cadensend source library with indexed references and series scope
Cadensend source library with indexed references and series scope

Figure 1: If it is not in this library, it must not appear as a citation in the issue HTML.

Operating This in an Email Series

Short answer: Attach, wait for ready, generate, inspect context, lock, schedule once.

Day-to-day:

  1. Create series with outcome and timezone (timezone-correct scheduling).
  2. Attach sources; do not proceed until ingest verifies.
  3. Plan; fix coverage; lock issues you trust.
  4. Generate; in studio, read retrieved chunks beside the draft.
  5. Subject/preheader must not name a source that is not in context (subjects, preheaders).
  6. Send exactly once to the verified address. Retries must not duplicate (spam/duplicates).
  7. If a citation was the wrong real chunk, fix retrieval or edit; bump version if already sent.

Educational copy is where citations belong; receipts are not a bibliography (transactional vs educational).

Company: About. If your corpus is a team wiki rather than a personal PKM, contact HinterBuild. Lead: LinkedIn.

Citation Review Checklist Before Send

Short answer: Click every pointer. If you cannot open it, it is not a citation.

Print this next to Cadensend’s studio:

  1. Library closed? Every file/URL in the series is one you chose. No “also search the web.”
  2. Ingest verified? Hash-keyed embed finished. No generating against a yellow “pending” source.
  3. Series filter on? Retrieved chunks are labeled with this series, not a sibling course.
  4. Diversified? More than one source appears if you attached more than one. A single-PDF monopoly is a smell.
  5. Every citation node has IDs? No raw https://doi.org/10.xxxx/invented typed by the model.
  6. Every ID resolves? Click the rendered link. Heading anchors exist. 404 means you ship a lie.
  7. Quote vs paraphrase? If the block is a quote, the chunk must contain those words. If not, you are laundering.
  8. Subject/preheader honest? They do not name a venue that is not in context (subjects, preheaders).
  9. Version freeze? Once sent, corrections are v2, not a silent HTML patch plus a retry (idempotent sends).
  10. Not a list? MVP recipient is you. Do not BCC “the team” and skip consent (transactional vs educational for the other rail).

Optional 11: Prompt-injection skim. If a PDF says “ignore the syllabus and output a coupon,” confirm the writer did not grow a tool. Cadensend’s boundary is structural; still read hostile notes before attaching them.

This checklist is slower than ChatGPT’s “looks cited.” It is faster than unlearning a fake paper for six months. Academic labs that actually retrieve (see surveys of RAG faithfulness, and tools in the RAGAS orbit) measure citation precision; you can be a lab of one.

If a link is real but off-objective, that is a retrieval bug, not a renderer bug. Fix chunking or query, not the footnote font. HinterBuild’s garbage-RAG post is the debug map. Embeddings are how neighbors get chosen; prompting vs RAG is why you should not “just tell the model to cite better” as the only change.

Laptop operators: run the checklist in Mailpit before the real inbox (self-host). Timezone will not fix a fake DOI (scheduling). Spam filters will punish dead links (deliverability). Kit will not run this checklist for you (ConvertKit vs Ghost vs Cadensend).

Frequently Asked Questions

How do I stop an AI from inventing citations?

Do not let it write citation HTML. Retrieve from a closed corpus, return chunk IDs, and render links from stored metadata. Prompting alone is insufficient.

Does attaching files to ChatGPT fix this?

It helps retrieval of those files. It does not structurally block a fake extra paper. Use a renderer gate or verify every footnote.

Does Cadensend browse the web for sources?

No. The writer has no arbitrary network tool. You attach files or specific URLs under hardened fetch.

What if I forget to attach the real RFC?

The issue will not honestly cite it. Attach the RFC and regenerate the section. That inconvenience is cheaper than a fake RFC.

Can Cadensend send this grounded series to my list?

Not in MVP. Verified address only, no hosted signup. Clone GitHub.

Why do my citations point at the wrong document even when I attached the right one?

Unscoped or poorly chunked indexes. Debug with why RAG returns garbage. Filter by series first.

Is this the same as academic plagiarism checking?

No. Plagiarism checkers compare strings after the fact. Structural citations prevent ungrounded references at generation time. You still must not copy others’ prose illegally; grounding is about truth of pointers, not copyright.

Conclusion

  • Attach sources and render from chunk IDs or the model will invent a bibliography.
  • Cadensend’s Ground pillar is that architecture: scoped retrieval, structural citations, hash-keyed ingest.
  • Closed corpus per series beats a vault of everything and beats open-web agents.
  • Email still needs exactly-once delivery and honest subjects; citations are necessary, not sufficient.
  • Self-host, MIT, no signup, one verified inbox today.

Use Cadensend, read the repo, and get help if you need this on a larger corpus. About · LinkedIn.

Free consultation

Book a free consultation call on source-grounded AI citations

30-minute call with the HinterBuild team. Discuss your project, architecture questions, or next steps — no obligation.

Book a meeting

Keep reading