General Model Configuration
The following configuration items are system-level settings for the Data Agent, categorized by functionality as follows.
1. General Configuration for Large Model API
Core parameters directly related to large model API calls.
LLM_MAX_TOKENS
The maximum output token count for the large language model, with a default value of 1000.
LLM_API_TIMEOUT_SECONDS
Timeout duration for large model API calls (in seconds), default is 600 seconds.
LLM_API_SLEEP_INTERVAL
In the page configuration, this is API Call Interval (seconds). Sets the sleep interval between API requests, in seconds. Consider configuring this for large model APIs that require rate limiting.
LLM_API_RETRY_NUM
The number of retry attempts after a large model API call fails. The default value is 1.
LLM_ENABLE_SEED
In the page configuration, this is Use seed parameter. Controls whether to enable a random seed when generating responses to introduce diversity in the results.
LLM_API_SEED
In the page configuration, this refers to the seed parameter. It is the random seed number used when generating responses. Used in conjunction with LLM_ENABLE_SEED.
USE_TEMPERATURE
Whether to use the temperature parameter; enabled by default. Some models do not support the temperature parameter, so it can be disabled.
USE_MAX_COMPLETION_TOKENS
Whether to use max_completion_tokens to replace the max_tokens parameter name. Disabled by default. Models above GPT-5 use the max_completion_tokens parameter, so this option needs to be enabled.
LLM_API_REQUIRE_JSON_RESP
Whether to require the large model API to return data in JSON format. Disabled by default.
HISTORY_LIMIT
In the page configuration, this refers to the Number of Consecutive Conversation Contexts. It specifies the number of historical conversation entries carried when interacting with the large model, with a default value of 4.
CHAT_WITH_NO_THINK_PROMPT
Whether to add a no think prompt to all large model conversations. This is effective for Alibaba's Qwen3 series models, allowing you to disable reasoning and improve speed. For Zhipu's GLM-4.5 and above models, this switch also controls whether to disable reasoning. The default is false, which means reasoning is enabled.
AWS Bedrock Related Configuration
LLM_AWS_BEDROCK_REGION
AWS Bedrock region. This only needs to be configured if you are using AWS Bedrock. The default is ap-southeast-2. For details, please refer to the AWS Bedrock documentation.
LLM_ANTHROPIC_VERSION
The version number of AWS Anthropic Claude. This configuration is only required if you are using the AWS Anthropic Claude model. The default value is bedrock-2023-05-31.
Proxy Configuration
ENABLE_LLM_API_PROXY
Whether to enable the Large Model API proxy. When enabled, you can call the /chat/completions interface of the large model through HENGSHI. Enabled by default. The Agent mode also calls the large model interface through HENGSHI.
ENABLE_TENANT_LLM_API_PROXY
Whether tenants can use the large model API proxy; enabled by default. The Agent mode also calls the large model interface through HENGSHI SENSE.
2. Vector Database Configuration
Configuration related to vector search and vectorization.
ENABLE_VECTOR
Enable vector search functionality. The AI Assistant selects the most relevant examples to the question through the large model API. After enabling vector search, the AI Assistant will combine the results from both the large model API and vector search.
VECTOR_MODEL
Vectorization model. Needs to be used in conjunction with VECTOR_ENDPOINT. The built-in vector service includes the intfloat/multilingual-e5-base model. If other models are required, you can select vector models from Huggingface, but you must ensure that the vector service can connect to the official Huggingface website.
VECTOR_ENDPOINT
Vectorization API address. After installing the relevant vector database services, it defaults to the built-in vector service.
VECTOR_SEARCH_RELATIVE_FUNCTIONS
Whether to search for function descriptions related to the question. When enabled, it will search for function descriptions relevant to the question, and the corresponding prompt words will be enlarged. This switch only takes effect when ENABLE_VECTOR is enabled.
VECTOR_SEARCH_FIELD_NUM_LIMIT
The limit on the number of vector search fields, with a default value of 10.
VECTOR_SEARCH_FIELD_VALUE_NUM_LIMIT
The upper limit for the number of distinct values in a dataset field for tokenized search. Portions with too many distinct values will not be extracted. The default value is 10.
VECTORIZE_DISTINCT_VALUES_LIMIT
The limit on the number of distinct values for field vectorization, with a default value of 10,000.
VECTOR_MODEL_KEEP_COUNT
When switching vector models, this parameter specifies the maximum number of historical vector models whose vectorized data will be retained. The default value is 5.
INIT_VECTOR_PARTITIONS_SIZE
The batch size for vectorized execution of example data, with a default value of 100.
INIT_VECTOR_INTERRUPTION_THRESHOLDS
When vectorizing the example library, this is the maximum allowed number of failures. The default value is 100.
CHAT_VECTOR_MATCH_SIMILARITY_THRESHOLD
Vector search similarity threshold, generally does not need to be adjusted. The default value is 0.9.
CHAT_VECTOR_MATCH_WEIGHT
Vector search score weight, generally does not need to be adjusted. The default value is 0.15.
CHAT_TOKEN_MATCH_SIMILARITY_THRESHOLD
Text search similarity threshold, generally does not need to be adjusted. The default value is 0.01.
CHAT_TOKEN_MATCH_WEIGHT
Text search score weight, generally does not need to be adjusted. The default value is 0.85.
AUTO_CLEAN_VECTOR_DB_ENABLE
Whether to automatically clean the vector database. Enabled by default.
AUTO_CLEAN_VECTOR_DB_EXPIRE_DAYS
The number of days before automatic cleanup of the vector database. The default is 3 days.
3. UI Interface Configuration
Configuration related to frontend display and interaction.
CHAT_BEGIN_WITH_SUGGEST_QUESTION
After navigating to analysis, will the user be provided with several suggested questions? Enable as needed.
CHAT_END_WITH_SUGGEST_QUESTION
After each question round is answered, whether to provide the user with several suggested questions. Enable as needed. Disabling this option can save some time.
TABLE_FLEX_ROWS
Sets the maximum number of visible rows in a table during a conversation, with a default value of 5.
EXPAND_AGENT_REASONING
Set whether to automatically expand the Agent's reasoning process. Expanded by default.
GRAPH_FIRST
Whether to prioritize displaying charts over summaries; disabled by default.
CHART_SOURCE_PRIMARY
Whether the chart source is set as the primary display. Enabled by default.
ENABLE_SMART_CHART_TYPE_DETECTION
Whether to enable smart chart type detection. The default is true. If you want all chart types to be tables, you can disable this option. Chart type detection rules:
- 1 time dimension and 1 or more measures: Line Chart
- 1 time dimension, 1 text dimension, and 1 measure: Area Chart
- 1 text dimension and 1 measure: Bar Chart
- 1 text dimension and 2 measures: Grouped Bar Chart
- Others default to Table
ENABLE_KPI_CHART_DETERMINE_BY_DATA
Whether to change the chart type to KPI if the data result is a single row and single column number. The default is true. If you want all chart types to be tables, you can disable this option.
CHAT_DATA_DEFAULT_LIMIT
For AI-generated charts, if the AI does not set a limit based on semantics, what is the default limit? The default is 100.
PREFETCH_SOURCE_ON_ROUTE_CHANGE
Whether to prefetch resources when the route changes. Disabled by default. This is an internal configuration related to performance optimization.
4. Workflow Feature Configuration
Configuration options unique to Workflow mode.
LLM_SUGGEST_QUESTION_LOCALLY
In the page configuration, this means Do not use the model to generate suggested questions. Specifies whether to use a large language model when generating suggested questions.
- true: Generated by local rules
- false: Generated by large language model
LLM_ANALYZE_RAW_DATA
In the page configuration, this is Allow the model to analyze raw data. Set whether the Data Agent analyzes the original input data. If your data is sensitive, you can disable this setting.
LLM_ANALYZE_RAW_DATA_LIMIT
In the page configuration, this is Allowed number of raw data rows for analysis. It sets a limit on the number of raw data rows that can be analyzed, with a default value of 10.
LLM_SELECT_FIELDS_SHORTCUT
This parameter determines whether to skip field selection and directly select all fields to generate HQL when there are only a few fields. It is used in conjunction with LLM_SELECT_ALL_FIELDS_THRESHOLD. Generally, it does not need to be set to true. You can enable it if you are particularly sensitive to speed or want to skip the field selection step. However, not selecting fields may affect the accuracy of the final data query.
LLM_SELECT_ALL_FIELDS_THRESHOLD
In the page configuration, this is Allow Model to Analyze Metadata (Threshold). It sets the threshold for selecting all fields, with a default value of 50. This parameter only takes effect when LLM_SELECT_FIELDS_SHORTCUT is set to true.
LLM_HQL_USE_MULTI_STEPS
Whether to use multiple steps to optimize the instruction adherence for trend and period-over-period comparison questions. Multiple steps may be relatively slower; enabled by default.
LLM_EXAMPLE_SIMILAR_COUNT
Limit on the number of similar examples to search for. This is effective in the example selection step of Workflow mode, with a default value of 2.
LLM_RELATIVE_FUNCTIONS_COUNT
Limit on the number of related functions to search for. This is effective in the function selection step of Workflow mode, with a default value of 3.
LLM_SUMMARY_MAX_DATA_BYTES
The maximum number of bytes for the data section sent when the model summarizes results. The default value is 5000 bytes. This is effective in the summary step of Workflow mode.
LLM_ENABLE_SUMMARY
Whether to enable summary. This is effective in the summary step of Workflow mode, and the default value is true. If you only need data and charts and do not require a summary, you can disable this option to save time and costs.
LLM_RAW_DATA_MAX_VALUE_SIZE
If the original field value in the dataset exceeds this number of bytes, the value will not be provided to the large language model. The default value is 30 bytes. Text dimensions, dates, and similar fields are generally not too long. Providing excessively long field content, such as HTML, to the large language model is not very meaningful.
ENABLE_QUESTION_REFINE
Whether to enable the user question refinement feature. When enabled, user questions will be optimized before being sent to the large model. Enabled by default. This is effective in Workflow mode. If the questions are already specific enough, you can disable this feature to save time and costs.
USE_LLM_TO_SELECT_EXAMPLES
Whether to use a large language model to select examples. The default is true. This is effective in Workflow mode. The relevance of examples selected by the large model will be relatively higher.
USE_LLM_TO_SELECT_DATASETS
Whether to use a large language model (LLM) to curate datasets. The default is false. When disabled, datasets are primarily selected using vector and tokenization algorithms. When enabled, the LLM further filters the results of vector and tokenization algorithms to obtain the most relevant datasets. If the selection results are not satisfactory, you can consider enabling this option and defining the selection rules in Dataset Knowledge Management.
LLM_SELECT_DATASETS_NUM
The number of most relevant datasets from which the large model selects datasets, with a default value of 3. This controls the number of datasets with the highest preliminary scores from vector and token filtering. This configuration is only meaningful when USE_LLM_TO_SELECT_DATASETS is enabled.
SPLIT_FIELDS_BY_DATASET_IN_HQL_GENERATOR
Whether to list fields and metrics by dataset in HQLGenerator. Disabled by default. Effective in Workflow mode. When enabled, it can improve the accuracy of field and metric selection in data models composed of multiple datasets, but it will increase the length of prompts.
MEASURE_TOKENIZE_BATCH_SIZE
Batch size for business metric tokenization. Generally, there is no need to change this; the default is 1000.
USE_FALLBACK_CHART
Whether to enable the fallback chart, which automatically generates a chart based on vector query results. The default is false. The accuracy of the automatically generated chart is not high and is only used as a fallback solution.
MAX_ITERATIONS
In the page configuration, this refers to the Maximum Model Inference Iterations. It specifies the maximum number of iterations allowed to control the number of failed loops when processing large models. The default value is 3.
LLM_ENABLE_DRIVER
Whether to enable driver mode. Disabled by default. This is a configuration for internal testing purposes.
Keyword Configuration
CHAT_DATE_FIELD_KEYWORDS
When any of the following keywords are present, if no date-type field is selected during the field selection step, a date-type field will be automatically added. The default value is "年,月,日,周,季,日期,时间,YTD,year,month,day,week,quarter,Q,date,time,变化,走势,趋势,trend".
CHAT_DATE_TREND_KEYWORDS
When any of the following keywords are present, it is determined as a trend calculation. The default value is "变化,走势,趋势,trend".
CHAT_DATE_COMPARE_KEYWORDS
When any of the following keywords are present, it is determined to be a year-over-year or period-over-period calculation. The default value is "同比,环比,增长,增量,减少,减量,异常,同期,相比,相对,波动,growth,decline,abnormal,fluctuation".
CHAT_RATIO_KEYWORDS
When any of the following keywords are present, it is determined as a ratio calculation. The default value is "百分比,比例,比率,占比,percentage,proportion,ratio,fraction,rate".
CHAT_FILTER_TOKENS
Tokens to be filtered out as meaningless words. The default value is "的,于,了,为,年,月,日,时,分,秒,季,周,,,?,;,!,在,各,是,多少,(,)".
Security Configuration
CHAT_ENABLE_PROHIBITED_QUESTION
Whether to enable the prohibited question feature. When enabled, you can configure rules for questions that are not allowed to be answered in the UserSystem Prompt in the console. The default is false.
INPUT_GUARDRAILS
Input guardrails configuration, used to filter or restrict user input.
ENABLE_USER_ATTRIBUTE_PROMPT
Whether to enable the user attribute prompt. When enabled, the relevant information from the user attributes entered by the user will be provided to the large model. Enabled by default.
Timeout Configuration
CHAT_SYNC_TIMEOUT
The default maximum wait time for synchronously waiting for Q&A results during API calls, in milliseconds. The default is 60,000 milliseconds. The API request can also set the timeout in the URL parameters to override this value.
5. Agent Feature Configuration
Configuration options unique to Agent mode.
PREFER_AGENT_MODE
Set whether to use Agent mode by default. The default is Agent mode. If turned off, Workflow mode will be used by default.
ENABLE_STREAM
Whether to enable streaming responses from large models. Enabled by default.
MAX_TURNS
The maximum number of conversation turns for the large model. The default value is 50.
MAX_INPUT_TOKENS
The maximum token threshold for large model summary memory in Agent mode. The default value is 25,600.
SCRATCH_PAD_TRIGGER
Set keywords to force the Agent to use the scratch pad tool. Separate keywords with commas.
DISALLOW_SEARCH_GLOBAL_RESOURCES_WHEN_SPECIFIC_SOURCES
Prohibit the Agent from searching global resources when specific data sources are set.
REVERSE_DATA_PROMPT_ORDER
Whether to reverse the order of 'data' and 'prompt', default is off. This is a configuration for debugging purposes.
NODE_AGENT_ENABLE
Whether to enable the HENGSHI AI Node Agent API feature, allowing the use of AI Agent via API calls. Disabled by default. Enabling this feature requires additional dependencies and configuration.
NODE_AGENT_TIMEOUT
The execution timeout for HENGSHI AI Node Agent, in milliseconds. The default is 600,000 milliseconds (10 minutes).
NODE_AGENT_CLIENT_ID
The HENGSHI AI Node Agent requires the API clientId of the HENGSHI platform for execution. This must be generated and configured by a system administrator, and sudo privileges are required.