Knowledge Service
Learn how to use the Knowledge Service to generate high-quality, customizable text summaries using AI with preloaded knowledge bases.
Overview
The Knowledge Service retrieves information or answers from preloaded and/or cached knowledge bases for efficient query processing.
- Predefined Knowledge Bases: Support for multiple domain-specific knowledge bases hosted on BReact OS
- Additional Knowledge Input: Ability to provide custom knowledge alongside predefined bases
- Configurable Output: Control over response length and model parameters
- Flexible Integration: Easy to use with any knowledge-intensive task
Endpoints
Process Endpoint
The process endpoint performs knowledge retrieval and AI-powered text generation.
API Endpoint
Endpoint Parameters
Request
content
(string, required)
The query or message to process.
context
(object, required)
Knowledge base selection and additional knowledge:
knowledgeBases
(string[]): Array of knowledge base IDs to useknowledge
(string, optional): Additional custom knowledge to include
config
(object, optional)
Model and output configuration:
modelId
(string): Model to use for inference (default: "mistral-large-2411")maxInputTokens
(integer): Maximum tokens for combined input (default: 7000)maxTokens
(integer): Maximum tokens in response (default: 4000)maxOutputLength
(integer): Maximum character length of response (default: 1000)systemPrompt
(string, optional): Additional instructions to append to default prompt
Response
status
(string)
Status of the processing ("success" or "error").
result
(object)
For successful responses:
response
(string): Generated text responseusedKnowledge
(string): Knowledge bases usedconfidence
(number): Confidence score
metadata
(object)
Processing metadata:
model
(string): Model usedcreated_at
(string): Creation timestampprocessed_at
(string): Processing timestampinstance_id
(string): Instance identifiertracking_id
(string): Unique tracking IDknowledge_bases
(string[]): Knowledge bases usedhas_additional_knowledge
(boolean): Whether custom knowledge was includedwas_truncated
(boolean): Whether input was truncatedtotal_input_tokens
(integer): Total tokens in input
Examples
Request
Basic Chart Pattern Analysis
Combined Elliott Wave and Chart Pattern Analysis
Comprehensive Technical Analysis
Advanced Technical Analysis with System Prompt
Conservative Token Usage and additional System Prompt
Token-Aware Multiple Knowledge Base Query
Response
Successful Response
Response showing token management
Error Response
Response with comprehensive analysis
Response showing token management with truncation