> ## Documentation Index
> Fetch the complete documentation index at: https://docs.factagora.com/llms.txt
> Use this file to discover all available pages before exploring further.

# v0.1.6

> Collections API — per-brand private knowledge graph with grounded Q&A

<Update label="2026-06-29" description="v0.1.6 — Collections API">
  ## New: Collections API

  Build a **per-brand private knowledge graph** by ingesting multiple URLs into one unified TKG (Temporal Knowledge Graph), then query it with grounded answers and Q\&A verification.

  ### How it works

  1. **Create** a collection for a brand (e.g. Hyundai UK)
  2. **Ingest** URLs — each page is extracted into claims, predictions, and causal edges that accumulate in one unified TKG
  3. **Ask questions** grounded only in that corpus (`/answer`)
  4. **Verify** existing Q\&A pairs against the knowledge graph (`/qa-verify`)

  ### New endpoints

  | Method   | Path                                     | Description                               |
  | -------- | ---------------------------------------- | ----------------------------------------- |
  | `POST`   | `/api/v1/collections`                    | Create a collection                       |
  | `GET`    | `/api/v1/collections`                    | List your collections                     |
  | `GET`    | `/api/v1/collections/{id}`               | Get collection + ingested URL list        |
  | `DELETE` | `/api/v1/collections/{id}`               | Delete a collection and all its data      |
  | `POST`   | `/api/v1/collections/{id}/ingest`        | Queue URLs for async ingestion (202)      |
  | `GET`    | `/api/v1/collections/{id}/ingest-status` | Poll ingestion progress                   |
  | `GET`    | `/api/v1/collections/{id}/graph`         | Get the unified knowledge graph           |
  | `POST`   | `/api/v1/collections/{id}/answer`        | Ask a question grounded in the collection |
  | `POST`   | `/api/v1/collections/{id}/qa-verify`     | Verify existing Q\&A pairs                |

  ### Key behaviors

  * **Async ingestion** — `POST /ingest` returns `202` immediately with source IDs. Use `/ingest-status` to poll for `processing` → `completed`/`failed`.
  * **Unified TKG** — all ingested URLs share one knowledge graph per collection. Same-title entities are merged automatically.
  * **Semantic search** — `/answer` and `/qa-verify` use pgvector to retrieve the most relevant chunks before generating answers, improving accuracy over naive RAG.
  * **Grounded flag** — if the collection does not contain enough information to answer, `grounded: false` is returned instead of hallucinating.
  * **Tenant isolation** — collections are scoped to personal access tokens. A master key cannot access collection endpoints.

  ### Q\&A verification verdicts

  | Verdict       | Meaning                                                             |
  | ------------- | ------------------------------------------------------------------- |
  | `correct`     | Answer is supported by the knowledge graph                          |
  | `incorrect`   | Answer contradicts the knowledge — a `correction` field is provided |
  | `unsupported` | Not enough information in the collection to verify                  |
</Update>
