Document Sets
Group documents that belong together into sets, follow assembly groups, link a rule set, and evaluate each set as one whole through /v1/compliance/sets.
A document set holds documents that belong together, for example a contract, its order and its declaration, and is judged as one whole. Every member's text goes to each model call, so a rule that asks for another document can pass or fail instead of staying unclear. A verdict's quote names the member it comes from (document_id on the result), and its reason refers to members as [D1], [D2] and so on, in the order of the evaluation's member_ids.
A set has a source. A manual set is picked by hand. An assembly set follows an assembly group of a pipeline: its members are read anew from the group at each evaluation, and source_ref names the pipeline and group key. Changing the documents of an assembly set turns it into a hand-picked set. A set holds from 2 documents up to the configured maximum (20 by default); frameworks are not accepted as members.
Without a rule_set_id a set is judged against every rule of the ON frameworks. With one, it is judged only against that rule set's rules of ON frameworks. A set evaluation is outdated when the ON frameworks or rule count changed, when the set's rule set was swapped or edited, or when the set's documents were edited. A set evaluation can also contain consistency findings: inconsistencies between members, stored as failed results without a rule (rule_id null, codes C-01, C-02, ...).
/v1/compliance/setsSet fields
/v1/compliance/setsBody fields
cURL: Create a set and evaluate it
curl -X POST "https://api.talonic.com/v1/compliance/sets" \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "ACME delivery 2026-10",
"document_ids": ["5b7e2a91-6c44-4d0f-9a3e-71c8d2f0b6a5", "a83c06d2-9e1f-4b57-8c20-4d7f1e95a6b3"],
"rule_set_id": "e41b9d07-2c85-4a3f-b6d1-90f7c2a8e553"
}'
curl -X POST "https://api.talonic.com/v1/compliance/sets/evaluate" \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"set_ids": ["<set id from the response above>"]}'/v1/compliance/sets/assembly-groups/v1/compliance/sets/from-assembliesBody fields
/v1/compliance/sets/{setId}Path and body
/v1/compliance/sets/{setId}/v1/compliance/sets/evaluateBody fields
The response is { "data": [...] } with one evaluation per set; set_id is filled and document_id is null. Evaluating is refused with 422 when no framework with rules is ON, when the set has no documents, or when the set's rule set has no rule of a framework that is ON.
/v1/compliance/sets/evaluations/v1/compliance/sets/{setId}/evaluationmember_ids together with the results. [D1] in a reason is the first id in member_ids, the order in which the decider saw the members, which can differ from the order of documents on the set.