Skip to main content
NEXCLARADocumentation

Schemas: knowledge

Schemas whose first using operation belongs to the knowledge family. A shared schema is described once, here, and linked from every operation that uses it.

Descriptions come from the contract, which is written in French. They are reproduced verbatim so that the contract remains the source of truth.

AnswerIn

Question posee a la redaction par assistance.

Type : object

PropertyTypeRequiredDescriptionConstraints
language"fr" | "en"yes
modulestring | nullnopattern: "^[a-z]{2,16}$"
qstringyesQuestion libre.minLength: 1 ; maxLength: 2000

Used by : knowledgeAnswer

AnswerOut

Reponse redigee par assistance, et les passages qu'elle designe.

Type : object

PropertyTypeRequiredDescriptionConstraints
citationsarray<SearchResultOut>yes
generated_by_assistancetruenoToujours vrai : ce texte est produit par un modele (Spec. A.11).default: true
modelstringyes
prompt_versionstringyes
quarantinedintegeryesPassages trouves mais non transmis, signales comme instructions.
status"answered" | "no_answer"yes
textstring | nullyesTexte redige ; `null` pour une abstention.

Used by : knowledgeAnswer

DocumentIn

Document propre a l'institution (Markdown restreint, sans HTML actif).

Type : object

PropertyTypeRequiredDescriptionConstraints
bodystringyesminLength: 1
fresh_as_ofstring (date)yes
modulestringyesminLength: 2 ; maxLength: 16
required_rolesarray<string>noRoles dont l'un au moins est exige pour lire ; vide : tout utilisateur.
titlestringyesminLength: 1 ; maxLength: 200
versionstringyesminLength: 1 ; maxLength: 32

Used by : knowledgeDocumentPut

DocumentOut

Document de l'institution, texte et passages compris.

Type : object

PropertyTypeRequiredDescriptionConstraints
bodystringyes
content_sha256stringyes
fresh_as_ofstring (date)yes
keystringyes
language"fr" | "en"yes
modulestringyes
required_rolesarray<string>yes
segmentsarray<nexclara_api__api__v1__knowledge__SegmentOut>yes
titlestringyes
versionstringyes

Used by : knowledgeCommonRead, knowledgeDocumentRead

DocumentPutOut

Effet d'un depot.

Type : object

PropertyTypeRequiredDescriptionConstraints
documentDocumentSummaryOutyes
outcome"added" | "updated" | "unchanged"yes

Used by : knowledgeDocumentPut

DocumentSummaryOut

Document de l'institution, sans son texte.

Type : object

PropertyTypeRequiredDescriptionConstraints
content_sha256stringyes
fresh_as_ofstring (date)yes
keystringyes
language"fr" | "en"yes
modulestringyes
required_rolesarray<string>yes
titlestringyes
versionstringyes

Used by : knowledgeDocumentList, knowledgeDocumentPut

SearchOut

Resultats d'une recherche : un passage par document, du plus pertinent au moins.

Type : object

PropertyTypeRequiredDescriptionConstraints
language"fr" | "en"yes
resultsarray<SearchResultOut>yes
termsarray<string>yesTermes retenus de la requete, plies.

Used by : knowledgeSearch

SearchResultOut

Un document trouve, cite. Le passage est un extrait EXACT du document.

Type : object

PropertyTypeRequiredDescriptionConstraints
document_keystringyes
fresh_as_ofstring (date)yes
hrefstringyesLien canonique : page du site, ou route de lecture.
instruction_likebooleanyesLe passage contient une formulation d'instruction adressee a un assistant ; il est montre comme du texte, jamais suivi.
modulestringyes
passagestringyes
sectionstring | nullyesIntertitre du passage, s'il en a un.
surface"site" | "api"yes
titlestringyes
versionstringyes
visibility"public" | "reserved" | "institution"yes

Used by : knowledgeAnswer, knowledgeSearch

nexclara_api__api__v1__knowledge__SegmentOut

Passage citable d'un document.

Type : object

PropertyTypeRequiredDescriptionConstraints
headingstring | nullyes
instruction_likebooleanyes
ordinalintegeryes
textstringyes

Used by : knowledgeCommonRead, knowledgeDocumentRead