Guides
Knowledge base
Upload documents in the dashboard and let retrieval happen automatically at request time.
A stack can answer from your own documents without you building a retrieval pipeline yourself. Upload files from the dashboard; retrieval then happens automatically on every chat request, with no extra parameters on your side.
Uploading is a dashboard action, not an API call — there's no public endpoint for adding or removing knowledge-base documents. Retrieval, once documents are indexed, works through the normal chat endpoints.
Uploading
Open the stack's Knowledge page
From the dashboard, open your stack and go to its knowledge base section.
Upload your files
.txt,.md, or.pdf(PDFs must have embedded text — scanned, image-only PDFs aren't supported yet). Indexing runs in the background after upload. Files are limited to 10MB each, and the number of files depends on your plan — see Pricing.Test with a real question
Ask something only the document answers, through chat completions with no
systemmessage — asystemmessage you send bypasses both your configured prompt and the knowledge base for that request.
How retrieval works
At request time, Stac embeds the last user message and searches the
stack's indexed documents for the closest matching chunks, then injects them
into the prompt ahead of the user's message. This only happens when you send
no system message — see Core concepts and
Chat completions for the
exact rule.
Retrieval is best-effort: if the similarity search fails for any reason, the chat request still goes through normally, just without the extra context. A knowledge-base outage never turns into a failed chat request.
What it's for
The knowledge base is meant for grounding chat answers in your own reference material — policies, product docs, FAQs. It's not used by the structured extraction endpoints: those work from the single file you send in that request, on purpose, so a field is never filled from an unrelated document.
Next steps
- Core concepts — how the system prompt and knowledge base are scoped to a stack.
- Chat completions — the
systemmessage rule that governs when retrieval runs.

