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

  1. Open the stack's Knowledge page

    From the dashboard, open your stack and go to its knowledge base section.

  2. 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.

  3. Test with a real question

    Ask something only the document answers, through chat completions with no system message — a system message 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.

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 system message rule that governs when retrieval runs.