Skip to main content
2026-06-29
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

MethodPathDescription
POST/api/v1/collectionsCreate a collection
GET/api/v1/collectionsList 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}/ingestIngest a single URL (synchronous)
DELETE/api/v1/collections/{id}/sources/{sourceId}Remove a source URL from the collection
GET/api/v1/collections/{id}/ingest-statusPoll ingestion progress
GET/api/v1/collections/{id}/graphGet the unified knowledge graph
POST/api/v1/collections/{id}/answerAsk a question grounded in the collection
POST/api/v1/collections/{id}/qa-verifyVerify existing Q&A pairs

Key behaviors

  • Synchronous ingestion: POST /ingest processes URLs and returns results per URL including claims_count and predictions_count. Each URL takes 10–30 seconds.
  • 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

VerdictMeaning
correctAnswer is supported by the knowledge graph
incorrectAnswer contradicts the knowledge, so a correction field is provided
unsupportedNot enough information in the collection to verify