Skip to main content

Recipe: answer a contract question

Ask what a contract says and get an answer that quotes the clause and links to the page, in one call. For legal, procurement and anyone who needs a term out of a contract quickly.

Tell your agent

"What is the notice period for ending our agreement with Acme, and by when do we have to give notice to stop it renewing?"

What the agent does

  1. Find the contract (optional). talonic_search with a short keyword ("Acme") to get the document_id, so the question looks only at that contract.
  2. Ask. talonic_ask with the question and scope.document_ids. Talonic answers with citations quoting the clause.
  3. If it takes longer. When the answer says processing, talonic_get_answer with the ask_id until it is completed.
  4. Follow up. "And the liability cap?" goes to talonic_ask again with the same conversation_id.
  5. Read the clause in full (optional). talonic_to_markdown returns the contract's text.
Ask about one contract
{
  "question": "What is the notice period to terminate, and the last date to give notice before auto-renewal?",
  "scope": { "document_ids": ["<document_id from talonic_search>"] }
}

The answer's citations[] give the quote, the document and a link to open it in the web app. verification says whether every claim was backed by a source; if not, correction says what changed.

Limits and cost

  • Each question uses credits; usage.credits_charged on the answer says how many. Search and reading text from a stored document are free.
  • An answer waits up to 55 seconds (wait_seconds) before handing back an ask_id to collect later.

Frequently asked questions

Can I ask about all contracts at once?+
Yes. Leave out the scope, or scope by document_type or tags, and ask "Which of our supplier contracts renew automatically in the next 90 days?".