Licence codes
Every fetched document, every chunk and every Evidence source carries one of eight licence codes
(LICENCE_CODES in api/app/db/models/documents.py). The code is stored per chunk where a field differs
from the document (an abstract under publisher copyright inside an open-access record), and rendering
follows the code of the chunk being cited. Codes are described individually in copy; the product never
summarises a set of codes as a single clearance word.
| Code | Label in the web app | Rendering in the console | Rendering on export |
|---|---|---|---|
cc0 | Public domain dedication (CC0) | full span | full span |
cc_by | Attribution licence (CC BY) | full span | full span with attribution |
cc_by_sa | Attribution, share-alike (CC BY-SA) | full span | full span with attribution and a share-alike notice |
cc_by_nd | Attribution, no derivatives (CC BY-ND): quote only, do not paraphrase | verbatim excerpt with attribution; the chunk is marked quote_only and the context assembler labels it “quote only, do not paraphrase” | listed separately as quotations |
cc_by_nc | Attribution, non-commercial (CC BY-NC): link and locator only | locator plus outbound link | locator plus link |
publisher_copyright | Publisher copyright: link and locator only | locator plus outbound link | locator plus link |
customer_internal | Internal to your organisation | excerpt to program members (ELN entries, SOP renditions) | locator and hash only |
unknown | Licence unknown: link and locator only | locator plus outbound link | locator plus link |
A paraphrased claim whose only sources are cc_by_nd chunks is a citation-coverage warning. customer_internal
content is scoped by program membership plus the source system’s own project scoping; document_chunks
carries organization_id and program_id, so every vector or text query filters on the chunk row.
Where codes come from
| Source | Metadata | Abstract or full text |
|---|---|---|
| Europe PMC | open | per the record’s license field; abstracts publisher_copyright unless the field is clear |
| Crossref | metadata | abstracts publisher_copyright |
| OpenAlex | cc0 | reconstructed abstracts publisher_copyright unless the location’s licence is clear, then that code |
| PubMed and PMC | abstracts as excerpt plus link | PMC full text from the public open-data bucket, filtered by the article’s license_code |
| ClinicalTrials.gov, openFDA, Open Targets | public or open | as published |
| ChEMBL | cc_by_sa | share-alike notice on export |
| ELN entries, SOP renditions | customer_internal | customer_internal |
Attribution blocks for exports and reports live in shared/knowledge-attributions.json, one per source key
(europe_pmc, crossref, openalex, pubmed, clinicaltrials_gov, openfda, open_targets,
chembl), rendered verbatim when at least one cited source comes from that provider; legal review of that
file is a gate before R2. The openfda block carries the adverse-event disclaimer that the existence of a
report is not proof that the drug caused the event.
Retention of documents
Documents are a read-side cache written as actor_kind = system (document.ingest). On source deletion,
connection disconnect or tenant offboarding, customer_internal documents move to archived; the worker job
purge_documents removes chunks, embeddings and stored objects after programs.settings.document_hold_days
(default 30) and keeps the locator and hash (document.purge). Documents are fetched by identifier only
(DocumentIngest {identifier_scheme, identifier_value}), through one of the eight sources, under 25 MB and
with a content-type restriction; there is no URL field.
Source: api/app/db/models/documents.py, api/app/db/models/evidence.py, web/lib/content.ts (licenceLabels), web/lib/api/types.ts, shared/knowledge-attributions.json, PRODUCT-CONTRACT.md sections 10.4 and 10.10, PRODUCT-PLAN.md Part 4 sections 3.5, 5.4 and 6.3