Skip to content

Query your documents

Upload a file once, then ask questions about it with answers that cite the source passages. You need this when the agent should answer from your own documents.

  1. Create a library and upload the file — ask in plain language:

    Create a library called "docs" and upload report.pdf into it.

    mistral_library_create creates the library; mistral_document_upload starts async processing. Duplicate content returns the existing document.

  2. Wait for processing, then ask your question:

    Poll the document status, then ask the library: what are the three key findings?

    mistral_document_status polls until done; mistral_document_query runs the RAG query — answers stream as they generate and come back with citations linking to the source passages.

See Tools · Configuration keys