Skip to content

General Model Configuration

The following configuration items are system-level configurations for the Data Agent, categorized by functionality.


1. General Configuration for Large Model API

Core parameters directly related to large model API calls.

LLM_MAX_TOKENS

The maximum output token number for the large model, with a default value of 1000.

LLM_API_TIMEOUT_SECONDS

Large Model API call timeout duration (in seconds), default is 600 seconds.

LLM_API_SLEEP_INTERVAL

In the page configuration, it is API Call Interval (seconds). Sets the sleep interval between API requests, in seconds. This can be considered for large model APIs that require rate limiting.

LLM_API_RETRY_NUM

The number of retries after a large model API call fails. The default value is 1.

LLM_ENABLE_SEED

In the page configuration, it is Use seed parameter. Controls whether to enable a random seed when generating responses to bring diversity to the results.

LLM_API_SEED

In the page configuration, it is the seed parameter. A 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, and it can be disabled.

USE_MAX_COMPLETION_TOKENS

Whether to replace the max_tokens parameter name with max_completion_tokens. Disabled by default. Models above GPT-5 use the max_completion_tokens parameter, which needs to be enabled.

LLM_API_REQUIRE_JSON_RESP

Whether to require the large model API to return in JSON format, disabled by default.

HISTORY_LIMIT

In the page configuration, it refers to the Number of Consecutive Conversation Contexts. It determines the number of historical conversation entries carried when interacting with the large model. The default value is 4.

CHAT_WITH_NO_THINK_PROMPT

Whether to add the no think prompt for large model conversations. This is useful for Alibaba's Qwen3 series models, allowing the disabling of thinking to improve speed. For Zhipu's GLM-4.5 and above models, this switch also controls whether thinking is disabled. The default is false, meaning thinking is enabled.

LLM_AWS_BEDROCK_REGION

AWS Bedrock region. Configuration is required only if AWS Bedrock is used. The default is ap-southeast-2. Please refer to the AWS Bedrock documentation for details.

LLM_ANTHROPIC_VERSION

The version number of AWS Anthropic Claude. Configuration is required only if using the AWS Anthropic Claude model. The default is bedrock-2023-05-31.

Proxy Configuration

ENABLE_LLM_API_PROXY

Whether to enable the large model API proxy. Once enabled, HENGSHI SENSE can be used to call the large model's /chat/completions interface. It is enabled by default. The Agent mode also uses HENGSHI SENSE to call the large model interface.

ENABLE_TENANT_LLM_API_PROXY

Whether tenants can use the large model API proxy, enabled by default. The Agent mode also uses HENGSHI SENSE to call the large model interface.


2. Vector Database Configuration

Configuration related to vector search and vectorization.

ENABLE_VECTOR

Enable the vector search feature. The AI assistant uses the large model API to select the most relevant examples to the question. Once vector search is enabled, the AI assistant will combine the results from the large model API and vector search.

VECTOR_MODEL

Vectorization model. Needs to be used in conjunction with VECTOR_ENDPOINT. The system's built-in vector service already includes the intfloat/multilingual-e5-base model. If other models are required, vector models on Huggingface are supported, but it must be ensured that the vector service can connect to the Huggingface official website.

VECTOR_ENDPOINT

Vectorization API address. After installing the related vector database service, 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 related 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 of distinct values for tokenized search dataset fields. The portion with too many distinct values will not be extracted. The default value is 10.

VECTORIZE_DISTINCT_VALUES_LIMIT

Field distinct value vectorization limit, default value is 10000.

VECTOR_MODEL_KEEP_COUNT

The maximum number of historical vector models' vectorized data to retain when switching vector models. The default is 5.

INIT_VECTOR_PARTITIONS_SIZE

The batch size for example vectorized execution, default is 100.

INIT_VECTOR_INTERRUPTION_THRESHOLDS

The maximum allowed number of failures when vectorizing the example library, default is 100.

CHAT_VECTOR_MATCH_SIMILARITY_THRESHOLD

Vector search similarity threshold, usually does not need to be adjusted. The default value is 0.9.

CHAT_VECTOR_MATCH_WEIGHT

Vector search score weight, usually does not need to be adjusted. The default value is 0.15.

CHAT_TOKEN_MATCH_SIMILARITY_THRESHOLD

Text search similarity threshold, usually does not need adjustment. The default value is 0.01.

CHAT_TOKEN_MATCH_WEIGHT

Text search score weight, usually does not need adjustment. 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 expiration days for automatic cleaning of the vector database, default is 3 days.


III. UI Interface Configuration

Configuration related to front-end display and interaction.

CHAT_BEGIN_WITH_SUGGEST_QUESTION

After jumping to analysis, will several suggested questions be provided to the user? Enable as needed.

CHAT_END_WITH_SUGGEST_QUESTION

After each question round, decide whether to provide the user with several suggested questions. Enable this feature as needed. Disabling it can save some time.

TABLE_FLEX_ROWS

Set the maximum visible range of rows in the table during the conversation, with a default value of 5.

EXPAND_AGENT_REASONING

Set whether to automatically expand the Agent reasoning process. Expanded by default.

GRAPH_FIRST

Whether to prioritize displaying the chart over the summary, default is off.

CHART_SOURCE_PRIMARY

Whether the chart source is the primary display, enabled by default.

ENABLE_SMART_CHART_TYPE_DETECTION

Whether to enable smart chart type detection, 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 modify the chart type to KPI based on the data result being a single row and single column number. The default is true. If you want all chart types to remain as 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, the default limit is 100.

PREFETCH_SOURCE_ON_ROUTE_CHANGE

Whether to prefetch resources on route change. Disabled by default. Internal configuration related to performance optimization.


IV. Workflow Feature Configuration

Configuration options unique to the Workflow mode.

LLM_SUGGEST_QUESTION_LOCALLY

In the page configuration, it is Do not use the model to generate recommended questions. Specifies whether to use a large model when generating recommended questions.

  • true: Generated by local rules
  • false: Generated by a large model

LLM_ANALYZE_RAW_DATA

In the page configuration, it is Allow Model to Analyze Raw Data. This setting determines whether the Data Agent analyzes the raw input data. If your data is sensitive, you can disable this configuration.

LLM_ANALYZE_RAW_DATA_LIMIT

In the page configuration, it is Allowed number of raw data rows for analysis. Sets the limit on the number of raw data rows for analysis, 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 fewer fields. It is used in conjunction with LLM_SELECT_ALL_FIELDS_THRESHOLD. Generally, it does not need to be set to true. It can be set 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, it is Allow Model to Analyze Metadata (Threshold). Sets the threshold for selecting all fields, with a default value of 50. This parameter is only effective when LLM_SELECT_FIELDS_SHORTCUT is set to true.

LLM_HQL_USE_MULTI_STEPS

Whether to optimize the instruction adherence for trend and year-over-year/month-over-month type questions through multiple steps. Multiple steps may be relatively slower and are enabled by default.

LLM_EXAMPLE_SIMILAR_COUNT

The limit on the number of similar examples to search for, effective in the example selection step of Workflow mode. The default value is 2.

LLM_RELATIVE_FUNCTIONS_COUNT

The limit on the number of related functions to search, effective in the function selection step of Workflow mode. The default value is 3.

LLM_SUMMARY_MAX_DATA_BYTES

The maximum number of bytes for the data portion sent when the model summarizes the results. The default value is 5000 bytes. This is effective in the summary step of Workflow mode.

LLM_ENABLE_SUMMARY

Whether to enable summary, effective in the summary step of Workflow mode. The default value is true. If only data and charts are needed without a summary, it can be disabled to save time and cost.

LLM_RAW_DATA_MAX_VALUE_SIZE

The raw field value of the dataset will not be provided to the large model if it exceeds a certain number of bytes. The default value is 30 bytes. Text dimensions, dates, and similar field contents are generally not too long. Providing excessively long field content, such as HTML, to the large model is not very meaningful.

ENABLE_QUESTION_REFINE

Whether to enable the user question refinement feature. When enabled, user questions will be refined before being sent to the large model. It is enabled by default and is effective in Workflow mode. If the question is already specific enough, you can disable it to save time and costs.

USE_LLM_TO_SELECT_EXAMPLES

Whether to use a large model to select examples, default is true. Effective in Workflow mode. The large model's selection of examples will be relatively more relevant.

USE_LLM_TO_SELECT_DATASETS

Whether to use a large language model to refine datasets, default is false. When disabled, datasets are primarily selected through vector and tokenization algorithms. When enabled, the large language model performs a secondary screening of the results from vectors and tokenization to obtain the most relevant datasets. If the selection results are unsatisfactory, 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 scores from the initial screening of vectors and tokenization. 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. Enabling this can improve the accuracy of field and metric selection in data models composed of multiple datasets but will increase the length of the prompt.

MEASURE_TOKENIZE_BATCH_SIZE

The batch size for tokenizing business measures. Generally, it does not need to be modified and defaults to 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 default generated chart is not high and is only used as a fallback solution.

MAX_ITERATIONS

In the page configuration, it is the Maximum Iterations for Model Inference. This defines the maximum number of iterations used to control the number of retries in case of large model processing failures. The default value is 3.

LLM_ENABLE_DRIVER

Whether to enable driver mode, disabled by default. Configuration for internal testing.

Keyword Configuration

CHAT_DATE_FIELD_KEYWORDS

When certain 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 "year, month, day, week, quarter, date, time, YTD, year, month, day, week, quarter, Q, date, time, change, trend, trendline, trend".

CHAT_DATE_TREND_KEYWORDS

When there are certain keywords, it is determined as trend calculation. The default value is "变化,走势,趋势,trend".

CHAT_DATE_COMPARE_KEYWORDS

When certain keywords are present, it is determined as year-over-year or month-over-month calculation. The default value is "同比,环比,growth,decline,abnormal,fluctuation,增长,增量,减少,减量,异常,同期,相比,相对,波动".

CHAT_RATIO_KEYWORDS

When certain keywords are present, it is determined as a ratio calculation. The default value is "百分比,比例,比率,占比,percentage,proportion,ratio,fraction,rate".

CHAT_FILTER_TOKENS

Filter out meaningless words during tokenization. The default value is "的,于,了,为,年,月,日,时,分,秒,季,周,,,?,;,!,在,各,是,多少,(,)".

Security Configuration

CHAT_ENABLE_PROHIBITED_QUESTION

Whether to enable the prohibited question feature. Once enabled, you can configure rules for prohibited questions 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, relevant information will be provided to the large model based on the user attributes entered by the user. Enabled by default.

Timeout Configuration

CHAT_SYNC_TIMEOUT

The default maximum waiting time for synchronous Q&A results during API calls, in milliseconds, is 60000 milliseconds. The API request can also set the timeout in the URL parameters to override this value.


5. Agent Function Configuration

Configuration items specific to Agent mode.

PREFER_AGENT_MODE

Set whether to use Agent mode by default. The default is Agent mode. When turned off, it defaults to Workflow mode.

MAX_TURNS

The maximum number of turns for large model conversations, with a default value of 50.

MAX_INPUT_TOKENS

The maximum token threshold for summarizing memory in Agent mode using the large model, with a default value of 25600.

SCRATCH_PAD_TRIGGER

Set keywords to force the Agent to use the scratchpad tool, with keywords separated by 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 to support the use of AI Agent through API calls. Disabled by default. Enabling this feature requires additional dependency requirements and settings.

NODE_AGENT_TIMEOUT

HENGSHI AI Node Agent execution timeout in milliseconds, default is 600,000 milliseconds (10 minutes).

NODE_AGENT_CLIENT_ID

The HENGSHI AI Node Agent requires the HENGSHI platform API clientId for execution. This needs to be generated and configured by the system administrator with sudo privileges.

User Manual for Hengshi Analysis Platform