Skip to main content

Knowledge Base Sources

A Knowledge Base can draw from multiple source types. Spectral merges them into a single unified KB.

URL​

Provide one or more URLs and Spectral scrapes them automatically to build the KB. This is the same mechanism used during target setup and can be used to extend or refresh the KB at any time.

Documents​

Upload PDF or DOCX files directly. Use this for product documentation, policy documents, internal guidelines, or any written material that defines how your system should behave.

MongoDB​

Connect a MongoDB instance to pull structured data into the KB. Provide the following:

FieldDescription
Mongo URIConnection string for your instance, including credentials if required. The instance must be publicly reachable.
CollectionsThe collections Spectral should read from.
Query filterOptional filter to restrict which documents are included.
ProjectionOptional projection to include only the relevant fields.
warning

We strongly encourage you to use a read-only account. Spectral only needs read access, and limiting permissions reduces exposure risks.