Attribute Exploration
Attribute exploration is Formal Concept Analysis with an expert in the loop. The engine reads a population of terms, turns each term into a set of attributes, and asks one question per implication of the stem base: do all objects with these attributes also have those? You either confirm the implication or refute it with a counterexample. When no question remains, completing the exploration publishes the confirmed implications as native rules.
What inference derives from a published implication is an obligation: a fact naming the feature a subject is obliged to have, the subject, the premise that fired, the licence it cites and its class of evidence (expert-confirmed or expert-declared). No value is invented and no source term is modified.
The workflow, step by step
Section titled “The workflow, step by step”- Connect. Enter the engine’s base URL, your tenant id and the authenticated user. Exploration is attributed: the engine refuses a start without a gateway human actor (
403 exploration_actor_required), sent by the SDK as theX-Authenticated-Userheader fromauthenticatedUser. - Start with
client.analysis.startExploration. The response gives the formal context’s attribute and object counts and flags a sampled population. Choose a sort scope and the attribute semantics:- feature presence (
schema_presence): each feature a term carries is one attribute; - scaled values (
scaled): each named feature’s values are read through a conceptual scale —nominal,interordinalthresholds,intervaledges orprefix— and every other feature keeps its presence attribute. The engine refuses a scaled start whose interpretation is incomplete.
- feature presence (
- Answer the pending question (premise ⇒ conclusion) with
confirmImplicationorrefuteImplication. A presence session’s counterexample is a list of feature names; a scaled session’s counterexample is a record of feature values, which the session’s own scales project into attributes. The engine refuses an invalid counterexample with400, and the page shows its message verbatim. - Follow the search. A response without a question is not the end of the exploration: read
search.stop. Onlyexhaustedmeans every question has been asked.work_limit,candidate_limit,deadline,cancelled(andready, a resting search) mean the search is suspended;advanceExplorationresumes it. If an answer names a question that is no longer pending (409 exploration_question_not_pending, for instance after another tab answered it), nothing was applied: the page reloads the status instead of resending. - Reopen a session by id after a page reload or an engine restart:
getExplorationStatusreturns the pending question, the progress and the confirmed implications. A session survives an engine restart only on an engine with durable storage (PostgreSQL mode); an in-memory engine answers404after a restart, and the page shows that refusal. This page keeps the session id and the connection settings in your browser’s local storage (the bearer token only in this tab’s session storage). - Complete with
completeExplorationand read the publication receipt: the licence record, the population record, the installed rules and the policy. Completing again returns the same receipt. Optionally declare a sort-wide licence withlicenseExplorationSort. - Inspect the evidence with
client.inference.forwardChain: the page lists the derived obligations that cite this session’s licence records. A run whose fixpoint was not reached is reported as such: more obligations may exist. - Choose alpha-cuts for graded records. Exploration reads crisp attributes; for records whose features carry declared degrees (
Value.fuzzyScalar(value, membership)), the last panel reads the asserted records of the sorts you name and callsclient.analysis.sortDiscoverywithfuzzyThresholds. The engine enumerates the concepts once per cut, keeping the incidences whose degree is at least the cut, and reports each cut’s concept count, the concepts new at that cut and its search stop. A cut outside (0, 1] is refused by the engine with400; a cut whose search stopped early is shown as partial.
Try it
Section titled “Try it”1. Connection
2. Start an exploration
Reopen a session
Response body
3. Session
- Session id
- Semantics
- Formal context (at start)
- unknown attributes,unknown objects— a sample:
maxTermsstopped the read before the scope was exhausted, so any basis confirmed here describes the sample only. - State
- Progress
- 0 confirmed,0 refuted,0counterexamples added
- Search
- stop
; this call work / candidates; session total work / candidates
Pending question
⇒
Confirmed implications
None yet.
4. Complete and publish
Completing publishes the confirmed implications as native rules licensed for this session's frozen population only. The engine first rereads the sources and refuses publication if any changed since the start. Completing again returns the same receipt.
Publication receipt
Sort licence
5. Inspect the published evidence
Runs native forward chaining (client.inference.forwardChain, derivations rolled back afterwards) and lists the obligations that cite this session's licence records. An obligation names a feature its subject is obliged to have; it never writes a value into the subject.
| implied_feature | implication_subject | implication_premise | licence | evidence_status |
|---|
6. Graded concepts at chosen alpha-cuts
Reads the declared degrees of the scope's asserted records (a FuzzyScalarfeature contributes its membership, any other present feature degree 1, an absent one nothing) and runs the engine's native fuzzy concept enumeration once per cut you choose (client.analysis.sortDiscovery with fuzzyThresholds). The engine validates the cuts; this page sends them as typed. Exploration itself stays crisp.
| alpha | concepts | new at this cut | search stop |
|---|
The same calls in code
Section titled “The same calls in code”import { ReasoningLayerClient, toTaggedFeatures } from '@kortexya/reasoninglayer';
const client = new ReasoningLayerClient({ baseUrl: 'https://platform.ovh.reasoninglayer.ai', tenantId, auth: { mode: 'cookie' }, authenticatedUser: `user:${expertId}`,});
const started = await client.analysis.startExploration({ sortNames: ['member'], semantics: { kind: 'scaled', schemes: { age: { kind: 'interordinal', thresholds: [65] } } },});
let question = started.question ?? null;let stop = started.search.stop;while (question || stop !== 'exhausted') { if (!question) { // Suspended: no question yet, and the basis is not known to be complete. const next = await client.analysis.advanceExploration(started.sessionId); question = next.nextQuestion ?? null; stop = next.search.stop; continue; } const answered = expertAgrees(question) ? await client.analysis.confirmImplication(started.sessionId, { questionId: question.questionId, }) : await client.analysis.refuteImplication(started.sessionId, { questionId: question.questionId, label: 'young cardholder', features: [], values: toTaggedFeatures({ age: 30, senior_card: true }), }); question = answered.nextQuestion ?? null; stop = answered.search.stop;}
const receipt = await client.analysis.completeExploration(started.sessionId);const licence = receipt.publication?.licenceRecord;const derived = await client.inference.forwardChain({});const obligations = derived.derivedFacts.filter((fact) => { const cited = fact.features.licence; return ( typeof cited === 'object' && cited !== null && 'term_id' in cited && cited.term_id === licence );});