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.
Prerequisites
Section titled “Prerequisites”- The
pi-mistral-nativepackage installed - An API key configured (Set up your API key)
-
Create a library and upload the file — ask in plain language:
Create a library called "docs" and upload report.pdf into it.mistral_library_createcreates the library;mistral_document_uploadstarts async processing. Duplicate content returns the existing document. -
Wait for processing, then ask your question:
Poll the document status, then ask the library: what are the three key findings?mistral_document_statuspolls untildone;mistral_document_queryruns the RAG query — answers stream as they generate and come back with citations linking to the source passages.
See Tools · Configuration keys