Warddocs
Capabilities

Ask

"Which counterparty matched a sanctions list?" "Is any of this fraud?" Ward Ask routes a plain-language question (English or Spanish) to the answer function that builds the table or sentence from the result itself. It never generates text, so it cannot invent a fact.

Endpoint: POST /api/v1/ask · Counts toward the session's context window, not billed

Request

curl https://api.mandatelabs.ai/api/v1/ask -H "X-API-Key: $WARD_API_KEY" -H "Content-Type: application/json" \
  -d '{"question": "which counterparties matched a list?", "context": "statement", "result": { "...": "the result of the decision" }, "session_id": "review_771"}'
a = client.ask("which counterparties matched a list?", decision=d)   # passes d.result, context and session
print(a.intent, a.answer)
const a = await client.ask("which counterparties matched a list?", { decision: d });
console.log(a.intent, a.answer);
Field Description
question (required) The question
context statement, document, screen or none: only the answers that make sense there can win
result The result of the decision the question is about
session_id The chat it belongs to
previous_intent, previous_query The last answer's intent and query: avoids repeating an answer and resolves "those movements"

Answer

Field Meaning
intent Which answer was chosen (stm_flagged, stm_sanctions, list_checks, stm_fraud, …)
confidence Router confidence. Below 0.45 the answer is unsure with the closest questions, never a guess
alternatives The next closest intents
answer The table or sentence, built from the result
model The router's version

Questions it answers include: why the risk, flagged transactions, fraud score of each transaction, could any be fraud, sanctions and list matches, which lists were checked, main counterparties, largest movements, typologies that may apply, document holder and expiry, screening hits, merchant trust, and what each data element of a card export means. A message that describes a new case returns intent: new_case.

If an answer was not what the user meant, send the intent they meant to POST /api/v1/ask/feedback: corrections become training examples for the next router version.