KnowledgeBaseGenerated
Stentor API Reference / stentor-models/src / KnowledgeBaseGenerated
Interface: KnowledgeBaseGenerated
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:131
A single document, typically part of a larger corpus of information that is where the answer to the user's original query may reside.
Extendsβ
Propertiesβ
title?β
optionaltitle:string
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:56
The title of the document
Inherited fromβ
uri?β
optionaluri:string
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:61
Optional URI that is the source of the document. It can be a URI for a website or a URI within an internal system (like AWS S3 for example).
Inherited fromβ
documentβ
document:
string
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:66
The document text. This isn't necessarily the entire source document found at the optional URI, it typically is more focused within where the answer may be.
Inherited fromβ
KnowledgeBaseDocument.document
highlights?β
optionalhighlights:KnowledgeBaseHighlight[]
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:70
Notable highlights within the document that can help the user scan and find their answer.
Inherited fromβ
KnowledgeBaseDocument.highlights
attributes?β
optionalattributes:object
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:74
Additional attribute for the document. Keys and values are dependent on the underlying knowledgebase.
Index Signatureβ
[key: string]: any
Inherited fromβ
KnowledgeBaseDocument.attributes
generatedβ
generated:
string
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:135
The generated text from the LLM
llm?β
optionalllm:string
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:139
Optional, the source LLM of the generated answer.
type?β
optionaltype:string
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:148
A description of the type of generated response.
This can be used to better describe the prompt used for generation so it can be understood what type of information is in the generated response.
Two standard values are "retrieval-augmented-generation" and "general-knowledge"
hasAnswer?β
optionalhasAnswer:boolean
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:152
Generated AI will still return an response even if it didn't have an answer. True if it has the answer to the user's query.
suggestions?β
optionalsuggestions:SuggestionObjectTypes[]
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:156
Generated AI suggested follow up queries.
sources?β
optionalsources:object[]
Defined in: packages/stentor-models/src/Request/KnowledgeBase.ts:160
Optional sources that the Generative AI used to generate the response. This is typically specific to type "retrieval-augmented-generation" where source material is used to generate the answer.
url?β
optionalurl:string
title?β
optionaltitle:string