Knowledge base
The documents your AI answers from. Upload them, group them into collections, and attach them to the domains, intents and agents that should use them.
Knowledge Collections group the documents that back retrieval — each collection has its own retrieval config (embedding model, chunking strategy) and can be attached to one or many domains, so you don't have to re-upload the same source library for every domain that needs it.
Two doors, one collection
Collections are reachable both from the dashboard (JWT-authenticated, below) and from your own backend via API key (/v1/collections — see Collections API Reference). Both call the same underlying service, so a collection created through either one is immediately visible and usable through the other — create it via API on signup, manage it by hand in the dashboard afterward, or any mix of the two.
How knowledge reaches an answer
- You upload documents. Each is split into passages and indexed.
- You group documents into a collection and attach the collection to one or more domains.
- An intent names the collections it may use in
retrieval_config.source_types; an agent names the domains whose knowledge it may search inknowledge_domain_keys. - At call time the engine retrieves the best passages and puts them in front of the model. Passages below a similarity floor (0.15 by default) are not used, so a question your knowledge cannot answer finds nothing instead of something unrelated. Set
similarity_thresholdandtop_kin an intent'sretrieval_configto be stricter or looser. - Every answer returns the
sourcesit used, and a wrong answer can be reported with a correction so the passage behind it can be reviewed.
A domain can also restrict retrieval by who is asking: documents can be limited to access groups, and a call passes the end user's groups. See Access control on retrieval.
The Knowledge area
In the dashboard, Knowledge has five pages:
| Page | Use it to |
|---|---|
| Documents | Upload and manage sources. |
| Collections | Group sources for targeted retrieval. |
| Sync Jobs | Follow source updates and indexing jobs. |
| Retrieval | Ask a question and inspect the evidence it retrieves. |
| Analytics | See how knowledge is used. |
API reference (dashboard, JWT)
GET /dashboard/collections # list collections
POST /dashboard/collections # create a collection
PATCH /dashboard/collections/:id # update config
DELETE /dashboard/collections/:id # delete
POST /dashboard/collections/:id/domains/:domainKey # attach to a domain
DELETE /dashboard/collections/:id/domains/:domainKey # detach from a domain
GET /dashboard/collections/:id/documents # list documents in the collection
POST /dashboard/collections/:id/documents/:documentId # attach a document
DELETE /dashboard/collections/:id/documents/:documentId # detach a document
GET /dashboard/collections/:id/analytics # retrieval hit-rate, top queries
GET /dashboard/collections/:id/connections # which domains use this collectionDomain/document attach-detach, analytics, and connections are dashboard-only today — the API-key surface below covers create/list/get/update/delete.
API reference (API key)
GET /v1/collections # list collections
POST /v1/collections # create a collection
GET /v1/collections/:id # get one
PATCH /v1/collections/:id # update config
DELETE /v1/collections/:id # deleteSame validation, same writeTenantAuditLog trail, same response shape as the dashboard door — see the full Collections API Reference for request/response bodies, or use the JavaScript or Python SDK.
Create a collection:
POST https://api.liyaengine.ai/dashboard/collections
Authorization: Bearer <jwt>
Content-Type: application/json
{
"slug": "support-kb",
"label": "Support Knowledge Base",
"domain_keys": ["support"],
"default_embedding_model": "text-embedding-3-large",
"default_chunking_strategy": "semantic"
}domain_keys is required — a collection must be attached to at least one active domain at creation time. tags and visibility aren't set here; update them afterward via PATCH /dashboard/collections/:id.
Uploading documents
Documents are uploaded independently, then attached to a collection:
POST /dashboard/knowledge/documents # upload a document
GET /dashboard/knowledge/documents # list documents
GET /dashboard/knowledge/documents/:id # get one
DELETE /dashboard/knowledge/documents/:id # deleteOnce attached to a collection, a document is retrievable by every domain the collection is connected to — update the source once, every domain sees the change.
Related
Models + Router
Run on LiyaEngine's baseline models or bring your own keys for OpenAI, Anthropic, Gemini, Azure OpenAI, AWS Bedrock, OpenRouter, or any OpenAI-compatible endpoint — with automatic fallback on provider failure.
Data sources
Connect a database, a storage bucket, a JSON API or a website, and keep its content indexed and current on a schedule.