Skip to content

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.

  1. 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 the X-Authenticated-User header from authenticatedUser.
  2. 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, interordinal thresholds, interval edges or prefix — and every other feature keeps its presence attribute. The engine refuses a scaled start whose interpretation is incomplete.
  3. Answer the pending question (premise ⇒ conclusion) with confirmImplication or refuteImplication. 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 with 400, and the page shows its message verbatim.
  4. Follow the search. A response without a question is not the end of the exploration: read search.stop. Only exhausted means every question has been asked. work_limit, candidate_limit, deadline, cancelled (and ready, a resting search) mean the search is suspended; advanceExploration resumes 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.
  5. Reopen a session by id after a page reload or an engine restart: getExplorationStatus returns 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 answers 404 after 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).
  6. Complete with completeExploration and 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 with licenseExplorationSort.
  7. 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.
  8. 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 calls client.analysis.sortDiscovery with fuzzyThresholds. 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 with 400; a cut whose search stopped early is shown as partial.

1. Connection

The browser must reach the engine on this page's own origin: through the gateway, or a same-origin proxy. The engine does not answer cross-origin (CORS) preflights, so an engine URL on another origin fails with a network error.

Sent as the X-Authenticated-User header (user:<uuid> or a bare UUID). Exploration is an attributed expert activity: the engine refuses a start without this actor (403 exploration_actor_required), and only the session's creator or an invited participant can answer its questions.

Behind the gateway, the session cookie authenticates you; a bearer token is sent asAuthorization: Bearer.

Kept in this tab's session storage only; the other settings are kept in local storage.

2. Start an exploration

Comma-separated sort names; the population is every visible term of these sorts and their subsorts, read once at start. Empty means the whole tenant.

Attribute semantics
Search bounds (optional, each call)

Reopen a session

The engine's status does not restate a session's semantics; this page remembers it for the sessions it started. The session id survives a page reload or an engine restart.

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.

Comma-separated sort names; the asserted records of exactly these sorts (not their subsorts) are read. Empty means every visible record.

A cut keeps the incidences whose degree is at least the cut.

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
);
});