Files
rag-local/kb/consts/consts.go
T
2026-08-05 13:39:37 +08:00

22 lines
881 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package consts
// 向量与检索参数
const (
DefaultEmbeddingDim = 1024 // embedding 默认维度(未配置时)
VectorTopK = 20 // 向量检索召回数
FtsTopK = 20 // 全文检索召回数
HybridTopK = 10 // 混合检索融合后返回数
RrfK = 60 // RRF 融合常数
DefaultChunkSize = 800 // 分块最大字数(数据集默认值)
DefaultChunkOverlap = 150 // 分块重叠字数(数据集默认值)
ChunkStrategyTitle = "title" // 标题感知分块(自研,保留标题与段落)
ChunkStrategyRecursive = "recursive" // 递归字符分块(Eino recursive
ChunkStrategySemantic = "semantic" // 语义分块(Eino semantic,需绑定向量模型)
ParsePollIntervalSeconds = 3 // 解析任务轮询间隔
EmbedBatchSize = 16 // 单次向量化请求的文本批量
)