Integrations/Knowledge Bases/PDF / File Upload
P/
Knowledge Bases

PDF / File Upload

Upload PDFs, Markdown, Word, and text files as a knowledge source

What is PDF / File Upload?

File upload is the fastest way to add static knowledge to BeforeQuery. Upload any combination of PDFs, Markdown files, Word documents (.docx), plain text files (.txt), or HTML files — up to 10 MB per file. BeforeQuery extracts clean text, splits it into heading-aware chunks, embeds each chunk, and makes it instantly searchable. Files are ideal for policy documents, runbooks, internal guides, and any knowledge that does not live on a public URL.

Integration

How BeforeQuery works with PDF / File Upload

Everything you can do once the integration is connected.

PDF text extraction

BeforeQuery extracts full text content from PDF files, preserving heading structure for accurate chunk boundaries. Scanned PDFs with OCR text layers are also supported.

Markdown and MDX support

Upload .md files directly. BeforeQuery respects heading hierarchy when chunking, ensuring each chunk aligns with a logical section of your document.

Word document (.docx) ingestion

Docx files are converted to clean markdown before chunking. Heading styles, bold text, and code blocks are preserved during normalization.

Instant indexing

Files are processed synchronously on upload. Within seconds of uploading, the content is chunked, embedded, and available for search and chat.

Setup

How to set it up

1

In the BeforeQuery dashboard, open your project and go to Sources > Add Source > Files.

2

Upload one or more files (.pdf, .md, .docx, .txt, .html — max 10 MB each). BeforeQuery extracts and indexes the content immediately.

3

Optionally replace a file by re-uploading with the same filename. The previous version is replaced and the index is updated.

PDF / File Upload — Frequently Asked Questions

Common questions about connecting BeforeQuery to PDF / File Upload.

BeforeQuery accepts .pdf, .md, .docx, .txt, .html, and .csv files up to 32 MB each. PDF files with a text layer are fully supported. Image-only PDFs without an OCR text layer cannot be indexed. Word documents (.docx) are converted to markdown before chunking.
Yes. Each uploaded file must be 10 MB or smaller. For very large documents, split them into logical sections before uploading. There is no limit on the number of files per project.
Yes. Re-upload a file with the same name and BeforeQuery replaces the previous version, re-chunks and re-embeds the new content, and removes the old chunks from the index. The update takes effect within seconds.
Yes. Use the POST /api/v1/sources/:id/files endpoint with a multipart/form-data request. This is useful for automated pipelines that generate or update documents and need to push them to BeforeQuery programmatically.
Yes. Uploaded files are stored encrypted at rest and are only accessible within your BeforeQuery workspace. You can scope the file source to a restricted collection so its content only appears in your employee portal or specific client-key-authenticated integrations.

Ready to connect PDF / File Upload?

Start free. No credit card required. Connect your first integration in under 5 minutes.