Browse this section
Getting started

Your first query

How a question becomes a cited answer, and how to read the result.

What happens when you ask

  1. Identity. The agent resolves who is asking (Slack user → workspace user → principals such as groups).
  2. Scope. It determines which knowledge bases the channel or user can access.
  3. Retrieval. It runs hybrid retrieval (semantic + keyword) with the permission filter applied inside the query, then re-ranks candidates.
  4. Answer. It composes an answer grounded in the retrieved passages only. If nothing sufficiently relevant is found, it says it can't find the answer and suggests who or where to ask.
  5. Citations. Every claim is tied to the chunk it came from. Citations open the exact passage.
  6. Log. The query, answer, citations and confidence are recorded for the asker and for admins.

Reading the result

{
  "id": "qry_01j9x3k2m7",
  "answer": "Supplier invoices above €5,000 require approval by a Finance lead before posting. [1] New suppliers require approval regardless of amount. [2]",
  "confidence": 0.91,
  "citations": [
    { "n": 1, "document": "Approval policy v3", "source": "notion", "url": "https://…", "excerpt": "Invoices above 5 000 € …" },
    { "n": 2, "document": "#finance-approvals", "source": "slack", "url": "https://…", "excerpt": "For new suppliers we always…" }
  ],
  "knowledge_bases": ["ops-eu"],
  "as_user": "marja@example.com",
  "latency_ms": 1840
}

Confidence is the agent's own estimate that the answer is fully supported by the citations. Below 0.6 the agent adds a caveat; below 0.4 it declines to answer and explains what it did find.

Asking well

  • Ask complete questions with context: "What's our refund policy for corporate bookings cancelled under 14 days?" beats "refund policy".
  • Ask in any language. Documents can be in any language too.
  • Follow up in the same thread — the conversation keeps context.
  • Use @brewmycode /sources in a thread to see everything the agent considered, not only what it cited.

When the answer is wrong

Click Flag on an answer (or POST /queries/{id}/feedback). Flags go to knowledge base editors, who can fix or add the source document. Feedback also feeds the evaluation set for the knowledge base.