Uploading documents
Documents are uploaded to a dataset. A dataset is a named container for your documents. Each document in a dataset is identified by a document ID.- CLI
- Python SDK
- JavaScript SDK
Supported formats
Attaching metadata
Each document can be associated with its own metadata. You can attach additional information about the document, such as title, author, date, or category.- Python SDK
- JavaScript SDK
Metadata values can also include lists of strings or numbers, for example
tags or categories.See all supported metadata types here.Processing documents
After a document is uploaded, TopK returns a processing handle — a reference to the processing job. The document is not ready for retrieval until it has been processed. Processing happens asynchronously in the background and may take a few seconds to a few minutes, depending on document size and complexity.Your documents might not be ready for retrieval immediately after upload.
Checking the status
After uploading a document, you can check whether it has been processed using the processing handle.- Python SDK
- JavaScript SDK
Waiting for completion
Alternatively, you can wait for the document to be processed using the processing handle:- CLI
- Python SDK
- JavaScript SDK
Pass
--wait to block until processing is complete:Next Steps
Ask Questions
Get grounded, evidence-backed answers from your documents
Search Chunks
Retrieve the most relevant passages from your documents.