资讯中心

RAG Agnet Chunk数据处理流程

📅 2026/7/18 19:11:23
RAG Agnet Chunk数据处理流程
一、总体流程人工收集数据 - 形成Excel - ETL处理 (AI字段和数据扩展) - 人工标注导入MySQL后台编辑/审核/发布- chunk- 向量化 - 向量库存存储 - RAG查询 多路召回 rerank 精排 大模型推理二、详细处理流程1、人工收集手动收集 和 借助AI工具收集 获取数据的主要字段 (含实际业务数据)2、形成Excel包含主要业务字段含实际业务数据作为后继 AI字段和数据扩展的主要依据3、以实际业务数据为基础 借助AI平台接口 扩展 字段 和 数据记录条数写放大过程数据由10倍左右的扩展。4、生成的新的Excel数据 导入 MySQL中在管理后台进行 人工标注对数据进行编辑/审核/发布形成知识库的基础明细数据。5、对 后台数据 进行 chunk分块 形成 QA对 数据6、向量化处理7、存入 向量库基于ES的向量存储 构建索引模板PUT /_index_template/content_erp_nlp_help { index_patterns: [content_erp*], priority: 100, template: { settings: { analysis: { analyzer: { my_ik_analyzer: { type: ik_smart } } }, number_of_shards: 1, number_of_replicas: 2 }, mappings: { properties: { id: {type: long}, content: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, content_vector: {type: dense_vector,similarity: cosine,index: true,dims: 768,element_type: float,index_options: {type: hnsw,m: 16,ef_construction: 128}}, content_answer: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, title: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, param: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, type: {type: keyword}, questionId: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, createTime: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, updateTime: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, hitCount: { type: text, analyzer: ik_max_word, search_analyzer: ik_smart }, answerPattern: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, nearQuestionVOList: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, questionEnclosureVOList: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, questionRelationVOList: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, rmsRoutingAnswerVos: {type: text,analyzer: ik_max_word,search_analyzer: ik_smart}, label: { type: text, fields: { keyword: { type: keyword, ignore_above: 256 } } }, question: { type: text, fields: { keyword: { type: keyword, ignore_above: 256 } } } } } } }创建别名POST /_aliases { actions: [ { add: { index: content_erp_mes_agent_alia_test, alias: content_erp_mes_agent_alia } } ] } GET /_aliases POST /_aliases { actions: [ { add: { index: content_erp_mes_agent_202607171026, alias: content_erp_mes_agent_alia_test } } ] } GET /_alias/content_erp_mes_agent_alia_testES数据的删除POST /content_erp_mes_agent_202607171410/_delete_by_query { query: { terms: { type: [110, 111, 112] } } }8、关键词 语义搜索的混合检索9、rerank10、精排11、结果返回给大模型进行推理