Ask documents
ask_documentsAnswer a question from your own documents (your knowledge base), citing its sources. Reads every matching document across all dates unless from/to narrow it. Returns a short written answer that cites its sources as [1], [2], and the evidence: each cited quote with its document id, metadata and score. Use search_documents instead when you want every match rather than an answer. Takes the same from, to, metadata, dry_run and read_limit_usd as search_documents; the limit includes the answer fee, and mode (fast reads only the best-matching results; complete reads every match; by default the question decides). coverage says how the answer read and how many documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Only documents whose timestamp is before this: an ISO 8601 date-time, or a YYYY-MM-DD date (through its end, UTC). | |
| from | No | Only documents whose timestamp is at or after this: an ISO 8601 date-time, or a YYYY-MM-DD date (from its start, UTC). | |
| mode | No | fast = read only the best-matching results (a lookup: quicker and cheaper, may miss matches). complete = read every matching document, up to read_limit_usd (lists, counts, "every" questions). Default: chosen from the question. | |
| query | Yes | The question, in plain language. | |
| dry_run | No | true = return how many documents match and how many tokens this call would scan, and its price, without searching. Free; reads no text. | |
| metadata | No | Exact metadata matches, e.g. {"client": "acme"}. A list matches any of its values. | |
| read_limit_usd | No | The most this one call may spend from your balance, in US dollars. Over it, the best-matching documents are read first. |