Quickstart
In five minutes you'll have a collection indexed from one document and a working semantic search hitting it.
You need:
- A ScaiGrid API key with
scaimatrix:manageandscaimatrix:ingest(any tenant admin has these). - A PDF, Markdown, or text file to ingest.
- An embedding model your tenant can call (any model registered as
kind: embeddings—openai/text-embedding-3-smallis a common default).
bash
1 2 | |
1. Create a collection#
bash
1 2 3 4 5 6 7 8 9 10 11 12 | |
python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Save the returned coll.id. default_access: "tenant" means everyone in the tenant gets implicit read; use restricted if you want to opt-in via explicit ACEs only.
2. Upload a document#
bash
1 2 3 4 | |
python
1 2 3 4 5 6 7 8 | |
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Indexing is async. The document's status walks through pending -> processing -> indexed (or failed). For a handful of pages this is seconds.
3. Poll until indexed#
bash
1 2 | |
python
1 2 3 4 5 6 7 8 9 10 11 | |
javascript
1 2 3 4 5 6 7 8 9 10 | |
4. Search the collection#
bash
1 2 3 4 5 6 7 8 | |
python
1 2 3 4 5 6 7 | |
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
You get back ranked chunks with chunk_id, document_id, document_name, score, content, and metadata.
5. (Optional) Search across every collection you can read#
bash
1 2 3 4 | |
Omit collections to search every collection your user has read access to. Pass collections: ["col_a", "col_b"] (IDs or slugs) to scope it.
What just happened#
- The collection row in MariaDB recorded your embedding model and chunking settings.
- The PDF landed in S3 (via the document store). A background job extracted text, chunked it, and wrote one vector per chunk into the vector backend tagged with the collection's slug.
- Your search query was embedded with the same model, matched against those vectors, then ACL-gated through ScaiMatrix's single chokepoint before the response was assembled.
- No chunk whose source document you can't read can leak into the response — not in counts, not in metadata, not in graph traversals.
Next#
- Turn on graph extraction by setting
graph_enabled: trueandgraph_extraction_model: "scailabs/poolnoodle-omni"(or your preferred chat model) on the collection. See Architecture. - Lock down a single document with a deny ACE — see ACLs.
- Schedule a recurring crawl — see Crawl on a schedule.