当前位置: 首页 > news >正文

Elasticsearch:同义词在 RAG 中重要吗?

作者:来自 Elastic Jeffrey Rengifo 及 Tomás Murúa

探索 RAG 应用程序中 Elasticsearch 同义词的功能。

同义词允许我们使用具有相同含义的不同词语在文档中搜索,以确保用户无论使用什么确切的词语都能找到他们所寻找的内容。你可能会认为,由于 RAG 应用程序使用语义/向量搜索,同义词功能的一部分已经被同义词涵盖(因为根据定义,同义词是语义相关的词)。

这是真的吗?语义搜索真的能取代同义词吗?在本文中,我们将分析在 RAG 应用程序中使用同义词的影响。

步骤

  • 配置端点
  • 配置同义词
  • 索引文档
  • 语义搜索
  • 同义词和 RAG

配置推理端点

对于这个例子,我们将在 HR 环境中实现带有和不带有同义词的 RAG(Retrieval-Augmented Generation - 检索增强生成)系统。我们将使用术语 PTO(Paid Time Off - 带薪休假)的变体(如 “vacation” 或 “holiday”)为不同的文档编制索引。然后我们将配置同义词来展示这些关系如何提高搜索的相关性和准确性。

首先,让我们通过在 Kibana DevTools 中运行以下命令,使用带有推理 API(inference api) 的 ELSER 模型创建一个端点:

PUT _inference/sparse_embedding/code-wave_inference
{"service": "elasticsearch","service_settings": {"num_allocations": 1,"num_threads": 1}
}

配置同义词

Elasticsearch 中的同义词是什么?

在 Elasticsearch 中,同义词(synonyms)是具有相同或相似含义的单词或短语,存储为同义词集,可以作为文件或通过 API 进行管理。它们允许用户找到相关信息,即使他们使用不同的术语来指代同一概念。

因此,例如,如果我们创建一组同义词,其中 “holiday” 和 “vacation” 是 “Paid Time Off” 的同义词,当员工搜索其中任何一个词时,他们就会找到与所有词相关的文档。

你可以在这篇文章中阅读有关它们的更多信息。

让我们使用同义词 API(synonyms API:) 创建一组同义词:

PUT _synonyms/code-wave_synonyms
{"synonyms_set": [{"synonyms": "holidays, paid time off"}]
}

值得注意的是,同义词集必须先进行配置,然后才能应用于索引。

现在,让我们定义数据的设置和映射:

PUT /code-wave_index
{"settings": {"analysis": {"filter": {"synonyms_filter": {"type": "synonym_graph","synonyms_set": "code-wave_synonyms","updateable": true}},"analyzer": {"my_search_analyzer": {"type": "custom","tokenizer": "standard","filter": ["lowercase","synonyms_filter"]}}}},"mappings": {"properties": {"text_field": {"type": "text","analyzer": "standard","copy_to": "semantic_field","fields": {"synonyms": {"type": "text","analyzer": "standard","search_analyzer": "my_search_analyzer"}}},"semantic_field": {"type": "semantic_text","inference_id": "code-wave_inference"}}}
}

我们将使用 semantic_text 字段进行语义搜索,并使用 synonyms graph token filter 来处理多词同义词。

我们还创建了 text_field.synonym 版本和 text_field 版本的字段(可以针对这两种不同的类型进行搜索。请注意的是这两个类型都是 text 类型),以便更好地控制如何使用或不考虑同义词来查询字段。

最后,我们使用 copy_to 将 text_field 的值复制到该字段的 semantic_text 版本,以实现全文和语义查询。

索引文档

我们现在将使用批量 API 索引我们的文档:

POST _bulk
{"index":{"_index":"code-wave_index","_id":"1"}}
{"semantic_field":"Paid time off: All employees receive 20 days of paid vacation annually, with additional days earned for tenure milestones.","text_field":"Paid time off: All employees receive 20 days of paid vacation annually, with additional days earned for tenure milestones."}
{"index":{"_index":"code-wave_index","_id":"2"}}
{"semantic_field":"Holidays: Paid public holidays recognized each calendar year.","text_field":"Holidays: Paid public holidays recognized each calendar year."}
{"index":{"_index":"code-wave_index","_id":"3"}}
{"semantic_field":"Sick leave: Paid sick leave of up to 15 days per year.","text_field":"Sick leave: Paid sick leave of up to 15 days per year."}
{"index":{"_index":"code-wave_index","_id":"4"}}
{"semantic_field":"Holidays sale: Enjoy discounts up to 50% during our exclusive holidays sale event!","text_field":"Holidays sale: Enjoy discounts up to 50% during our exclusive holidays sale event!"}
{"index":{"_index":"code-wave_index","_id":"5"}}
{"semantic_field":"Holidays recipes: Try our top 10 holidays dessert recipes, perfect for family gatherings and celebrations.","text_field":"Holidays recipes: Try our top 10 holidays dessert recipes, perfect for family gatherings and celebrations."}
{"index":{"_index":"code-wave_index","_id":"6"}}
{"semantic_field":"Holidays travel: Find the best deals for your holidays flights and accommodations this season.","text_field":"Holidays travel: Find the best deals for your holidays flights and accommodations this season."}
{"index":{"_index":"code-wave_index","_id":"7"}}
{"semantic_field":"Holidays music: Stream your favorite holidays classics and discover new seasonal hits.","text_field":"Holidays music: Stream your favorite holidays classics and discover new seasonal hits."}
{"index":{"_index":"code-wave_index","_id":"8"}}
{"semantic_field":"Holidays decorations: Our store offers a wide range of holidays decorations to make your home festive.","text_field":"Holidays decorations: Our store offers a wide range of holidays decorations to make your home festive."}
{"index":{"_index":"code-wave_index","_id":"9"}}
{"semantic_field":"Holidays movies: Check out our list of must-watch holidays movies for cozy winter nights.","text_field":"Holidays movies: Check out our list of must-watch holidays movies for cozy winter nights."}
{"index":{"_index":"code-wave_index","_id":"10"}}
{"semantic_field":"Holidays festival: Join us at the city's annual holidays festival featuring lights, music, and local food.","text_field":"Holidays festival: Join us at the city's annual holidays festival featuring lights, music, and local food."}
{"index":{"_index":"code-wave_index","_id":"11"}}
{"semantic_field":"Holidays weather: Stay updated with our holidays weather forecast to plan your activities.","text_field":"Holidays weather: Stay updated with our holidays weather forecast to plan your activities."}
{"index":{"_index":"code-wave_index","_id":"12"}}
{"semantic_field":"Holidays gift guide: Browse our ultimate holidays gift guide for everyone on your list.","text_field":"Holidays gift guide: Browse our ultimate holidays gift guide for everyone on your list."}
{"index":{"_index":"code-wave_index","_id":"13"}}
{"semantic_field":"Holidays traditions: Explore unique holidays traditions celebrated around the world.","text_field":"Holidays traditions: Explore unique holidays traditions celebrated around the world."}

我们现在就可以开始搜索了!但首先,让我们通过搜索 holidays 来确保同义词有效:

GET code-wave_index/_search
{"_source": {"excludes": ["*embeddings","*chunks"]},"query": {"multi_match": {"query": "holidays","fields": ["text_field^10","text_field.synonyms^0.6"]}}
}

我们对 boost 进行调整,使同义词的得分低于原始单词。

检查响应:

{"took": 3,"timed_out": false,"_shards": {"total": 1,"successful": 1,"skipped": 0,"failed": 0},"hits": {"total": {"value": 12,"relation": "eq"},"max_score": 5.2014494,"hits": [{"_index": "code-wave_index","_id": "2","_score": 3.0596757,"_source": {"text_field": "Holidays: Paid public holidays recognized each calendar year.","semantic_field": {"inference": {"inference_id": "code-wave_inference","model_settings": {"task_type": "sparse_embedding"}},"text": "Holidays: Paid public holidays recognized each calendar year."}}},{"_index": "code-wave_index","_id": "1","_score": 3.023004,"_source": {"text_field": "Paid time off: All employees receive 20 days of paid vacation annually, with additional days earned for tenure milestones.","semantic_field": {"inference": {"inference_id": "code-wave_inference","model_settings": {"task_type": "sparse_embedding"}},"text": "Paid time off: All employees receive 20 days of paid vacation annually, with additional days earned for tenure milestones."}}},{"_index": "code-wave_index","_id": "13","_score": 2.9230676,"_source": {"text_field": "Holidays traditions: Explore unique holidays traditions celebrated around the world.","semantic_field": {"inference": {"inference_id": "code-wave_inference","model_settings": {"task_type": "sparse_embedding"}},"text": "Holidays traditions: Explore unique holidays traditions celebrated around the world."}}},...]}
}

我们可以看到,当我们搜索 “holidays” 时,第二个文档有同义词:“Paid Time Off”。

混合搜索

混合搜索使我们能够将全文和语义搜索查询的结果组合成一个规范化的结果集,方法是使用 RRF(Reciprocal Rank Fusion - 倒述排序融合)来平衡来自不同检索器的分数。

GET code-wave_index/_search
{"_source": "text_field","retriever": {"rrf": {"retrievers": [{"standard": {"query": {"nested": {"path": "semantic_field.inference.chunks","query": {"sparse_vector": {"inference_id": "code-wave_inference","field": "semantic_field.inference.chunks.embeddings","query": "holidays"}}}}}},{"standard": {"query": {"multi_match": {"query": "holidays","fields": ["text_field.synonyms"]}}}}]}}
}

回复:

{"took": 11,"timed_out": false,"_shards": {"total": 1,"successful": 1,"skipped": 0,"failed": 0},"hits": {"total": {"value": 13,"relation": "eq"},"max_score": 0.03175403,"hits": [{"_index": "code-wave_index","_id": "7","_score": 0.03175403,"_source": {"text_field": "Holidays music: Stream your favorite holidays classics and discover new seasonal hits."}},{"_index": "code-wave_index","_id": "13","_score": 0.031257633,"_source": {"text_field": "Holidays traditions: Explore unique holidays traditions celebrated around the world."}},{"_index": "code-wave_index","_id": "4","_score": 0.031009614,"_source": {"text_field": "Holidays sale: Enjoy discounts up to 50% during our exclusive holidays sale event!"}},{"_index": "code-wave_index","_id": "2","_score": 0.030834913,"_source": {"text_field": "Holidays: Paid public holidays recognized each calendar year."}},{"_index": "code-wave_index","_id": "6","_score": 0.03079839,"_source": {"text_field": "Holidays travel: Find the best deals for your holidays flights and accommodations this season."}},{"_index": "code-wave_index","_id": "11","_score": 0.02964427,"_source": {"text_field": "Holidays weather: Stay updated with our holidays weather forecast to plan your activities."}},{"_index": "code-wave_index","_id": "5","_score": 0.029418126,"_source": {"text_field": "Holidays recipes: Try our top 10 holidays dessert recipes, perfect for family gatherings and celebrations."}},{"_index": "code-wave_index","_id": "12","_score": 0.028991597,"_source": {"text_field": "Holidays gift guide: Browse our ultimate holidays gift guide for everyone on your list."}},{"_index": "code-wave_index","_id": "1","_score": 0.016393442,"_source": {"text_field": "Paid time off: All employees receive 20 days of paid vacation annually, with additional days earned for tenure milestones."}},{"_index": "code-wave_index","_id": "10","_score": 0.016393442,"_source": {"text_field": "Holidays festival: Join us at the city's annual holidays festival featuring lights, music, and local food."}}]}
}

该查询将返回语义和文本相关的文档。

同义词和 RAG

在本节中,我们将评估同义词和语义搜索如何改进 RAG 系统中的查询。我们将使用一个关于休息日的常见问题作为此示例:

How many vacation days are provided for holidays?

对于这个问题,我们对文档 1 中的信息感兴趣。文档 2 更接近我们想要的结果,但并不精确。当我们不使用同义词进行搜索时,我们将得到此结果。我们来看看它们的内容:

  • [1] Paid time off: All employees receive 20 days of paid vacation annually, with additional days earned for tenure milestones.
  • [2] Holidays: Paid public holidays recognized each calendar year.

这两个文档都包含与休息日(days off)相关的信息,但只有文档 2 特别使用了术语 “holidays”,因此我们可以测试同义词和语义搜索在 Playground 中的工作方式。

你可以从 Search>Playground 访问 Playground。从那里,你需要配置你想要使用的 LLM 并选择我们已经创建的索引作为上下文发送。你可以在此处阅读有关 Playground 及其配置的更多信息

配置完 Playground 后,如果我们点击查询按钮,我们可以看到同义词已被停用:

对于每个问题,我们会将前一个查询的前三个结果发送给 LLM,作为上下文:

现在,让我们向 Playground 提出问题并检查停用同义词后的结果:

由于前三个搜索结果中没有列出说明员工每年可享受多少假期的文件,因此 LLM 无法回答这个问题。在这种情况下,最接近的结果在文档 [2] 中。

注意:通过点击 “Snippet”,我们可以看到答案在 Elasticsearch 中的具体内容。

让我们清理聊天记录,激活同义词并再次提出同样的问题:

请注意,当你启用 semantic_text 字段和 text 字段时,Playground 将自动生成混合搜索查询:

让我们重复一下这个问题,现在激活同义词:

现在,答案确实包含了我们正在搜索的文档,因为同义词允许将文档 [1] 发送到 LLM。

结论

在本文中,我们发现同义词是搜索系统的基本组成部分,即使在使用语义搜索时也不一定涵盖同义词功能。

同义词允许我们根据用例控制要提升的文档,并通过调整相关性来提高准确性。另一方面,语义搜索对于 recall 很有用,这意味着它可以引入潜在的相关结果,而无需我们为每个相关术语添加同义词。

通过混合搜索,我们可以同时进行同义词和语义搜索,实现两全其美的效果。使用 Playground,如果我们选择语义和文本字段的组合作为搜索字段,它将自动为我们构建混合查询。

想要获得 Elastic 认证吗?了解下一期 Elasticsearch 工程师培训何时举行!

Elasticsearch 包含许多新功能,可帮助你为你的用例构建最佳的搜索解决方案。深入了解我们的示例笔记本以了解更多信息,开始免费云试用,或立即在本地机器上试用 Elastic。

原文:Are synonyms important in RAG? - Elasticsearch Labs

相关文章:

Elasticsearch:同义词在 RAG 中重要吗?

作者:来自 Elastic Jeffrey Rengifo 及 Toms Mura 探索 RAG 应用程序中 Elasticsearch 同义词的功能。 同义词允许我们使用具有相同含义的不同词语在文档中搜索,以确保用户无论使用什么确切的词语都能找到他们所寻找的内容。你可能会认为,由于…...

Docker安装分布式vLLM

Docker安装分布式vLLM 1 介绍 vLLM是一个快速且易于使用的LLM推理和服务库,适合用于生产环境。单主机部署会遇到显存不足的问题,因此需要分布式部署。 分布式安装方法 https://docs.vllm.ai/en/latest/serving/distributed_serving.html2 安装方法 …...

可视化实操记录(自用)

流程 读取数据 original_data pd.read_csv(“Penguins.csv”) original_data.head() 评估和清理数据 cleaned_data original_data.copy() #备份 结构 original_data.sample(5) 数据符合“每个变量为一列,每个观察值为一行,每种类型的观察单位为一…...

二叉树的遍历方式和子问题思路

目录 二叉树的遍历: 前序遍历: 中序遍历: 后序遍历: 二叉树的基本操作: 求树的结点个数(递归遍历思路): 求树的结点个数(子问题思路): 求树的…...

运用Deek Seeker协助数据分析

我的数据源有两张表,一个是每日销售表(字段有日期、产品名称、实际销量),一个是每月目标表(字段有年度月份、产品名称、目标销量);我的需求是,按月、按年来统计每个产品的目标完成情况请问用PowerBl进行分析,应该如何建立数据模型…...

服务器之连接简介(Detailed Explanation of Server Connection)

一台服务器最大能支持多少连接?一台客户端机器最多能发起多少条连接?? 我们知道TCP连接,从根本上看其实就是client和server端在内存中维护的一组【socket内核对象】(这里也对应着TCP四元组:源IP、源端口、…...

低空经济:开启未来空中生活的全新蓝海

引言 随着科技的进步,我们不再仅仅依赖地面交通和传统物流。你是否曾幻想过,未来的某一天,快递、外卖可以像魔法一样直接从空中送到你手中?或者,你能乘坐小型飞行器,快速穿梭于城市之间,告别拥堵…...

主动视觉可能就是你所需要的:在双臂机器人操作中探索主动视觉

AV-ALOHA 系统使用用于 AV 的 VR 耳机实现直观的数据收集,并且 用于作的 VR 控制器或引线臂。这有助于捕捉全身和头部 远程作我们的真实和模拟系统的运动,记录来自 6 个的视频 不同的摄像头,并为我们的 AV 仿制学习策略提供训练数据。 加州大…...

洛谷 P6419 COCI2014/2015 #1 Kamp 题解

题意 一颗树 n n n 个点, n − 1 n-1 n−1 条边,经过每条边都要花费一定的时间,任意两个点都是联通的。 有 k k k 个人(分布在 k k k 个不同的点)要集中到一个点举行聚会。 聚会结束后需要一辆车从举行聚会的这点…...

在 Vue 项目中使用 SQLite 数据库的基础应用

目录 一、环境准备二、数据库连接与操作1. 创建数据库连接2. 创建表3. 插入数据4. 查询数据5. 更新数据6. 删除数据 三、在 Vue 组件中使用 SQLite 一、环境准备 安装 Node.js 和 npm:确保已安装 Node.js 和 npm。 创建 Vue 项目:使用 Vue CLI 创建一个…...

AI会话问答的页面滚动处理(参考deepseek页面效果)

近期在接入deepseekR1的深度思考,研究了下deepseek官网的滚动效果,大概如下:用户发出消息后,自动滚动到页面最底部,让最新消息展示在视野中,这时候,我们先处理一次滚动: const scrol…...

GRN前沿:DGCGRN:基于有向图卷积网络的基因调控网络推理

1.论文原名:Inference of gene regulatory networks based on directed graph convolutional networks 2.发表日期:2024 DGCGRN框架 中心节点和节点的构建 局部增强策略 1. 问题背景 在基因调控网络中,许多节点的连接度较低(即…...

MongoDB 入门操作指南

文章目录 MongoDB 入门操作指南1. 连接到 MongoDB 数据库2. 查看当前数据库3. 显示所有数据库4. 切换或创建数据库5. 查看当前数据库中的所有集合6. 创建集合7. 插入文档插入单个文档插入多个文档 8. 查询文档查询所有文档查询匹配条件的文档格式化查询输出 9. 更新文档更新单个…...

共享设备管理难?MDM助力Kiosk模式一键部署

目录 1. 简化设备部署与配置:实现一键式部署 2. 自动化应用更新与内容推送:确保设备始终保持最新状态 3. 权限控制与设备安全:防止滥用与数据泄露 4. 远程管理与故障诊断:保障设备长期稳定运行 5. 数据分析与报告&#xff1a…...

HttpClient-Java程序中发送Http请求

配置 <dependency><groupId>org.apache.httpcomponents</groupId><artifactId>httpclient</artifactId><version>4.5.13</version> </dependency> ps:aliyun-sdk-oss中已引入上述配置 HttpClient的核心API&#xff1a; Htt…...

硬件-电源-隔离与非隔离的区别

文章目录 一&#xff1a;隔离电源与非隔离电源1.1 充电器触电新闻1.2 电路拓扑1.3 隔离电源与非隔离电源的优缺点1.3 隔离电源与非隔离电源的选择1.3.1 隔离电源1.3.2 非隔离电源 二&#xff1a;注意事项2.1 隔离电源结构图2.1 隔离耐压测试方法 三&#xff1a;感悟道友&#x…...

Kubernetes 最佳实践:Top 10 常见 DevOps/SRE 面试问题及答案

1. 如何在 Kubernetes 中设置资源请求和限制&#xff1f; 资源请求确保容器有最小资源量&#xff08;CPU/内存&#xff09;&#xff0c;而限制则强制容器消耗的最大资源量。这有助于高效资源分配并防止资源争用。 示例&#xff1a; resources:requests:memory: "256Mi&…...

Training for Computer Use

Training for Computer Use 核心事件&#xff1a;多家科技公司推出能操控计算机的智能体&#xff0c;字节跳动和清华大学团队引入UI - TARS模型&#xff0c;展示了训练模型实现计算机操控能力的新成果。 UI - TARS模型 基本信息&#xff1a;是视觉 - 语言模型Qwen2 - VL的微调版…...

PH热榜 | 2025-02-14

1. Beatoven.ai 标语&#xff1a;能创作完美背景音乐的AI作曲家 介绍&#xff1a;Beatoven.ai 能根据简单的提示生成惊艳的背景音乐&#xff0c;用于你的内容创作。它是由世界各地的真实音乐家倾力打造&#xff08;并使用了大量数据&#xff09;。无需任何音乐专业知识&#…...

工业物联网远程监控系统优化方案,基于巨控GRM553Y-CHE

工业物联网远程监控系统优化方案 ——基于巨控GRM553Y-CHE的西门子S7-1500 PLC多站点无线集成方案 1. 项目背景与概述 巨控科技作为工业物联网解决方案提供商&#xff0c;专注于PLC无线通信与远程监控技术研发&#xff0c;其YunPLC安全平台已服务超30,000工业终端&#xff0c…...

MySQL 隔离级别:脏读、幻读及不可重复读的原理与示例

一、MySQL 隔离级别 MySQL 提供了四种隔离级别,用于控制事务之间的并发访问以及数据的可见性,不同隔离级别对脏读、幻读、不可重复读这几种并发数据问题有着不同的处理方式,具体如下: 隔离级别脏读不可重复读幻读性能特点及锁机制读未提交(READ UNCOMMITTED)允许出现允许…...

无法与IP建立连接,未能下载VSCode服务器

如题&#xff0c;在远程连接服务器的时候突然遇到了这个提示。 查阅了一圈&#xff0c;发现是VSCode版本自动更新惹的祸&#xff01;&#xff01;&#xff01; 在VSCode的帮助->关于这里发现前几天VSCode自动更新了&#xff0c;我的版本号变成了1.100.3 才导致了远程连接出…...

Nuxt.js 中的路由配置详解

Nuxt.js 通过其内置的路由系统简化了应用的路由配置&#xff0c;使得开发者可以轻松地管理页面导航和 URL 结构。路由配置主要涉及页面组件的组织、动态路由的设置以及路由元信息的配置。 自动路由生成 Nuxt.js 会根据 pages 目录下的文件结构自动生成路由配置。每个文件都会对…...

Swagger和OpenApi的前世今生

Swagger与OpenAPI的关系演进是API标准化进程中的重要篇章&#xff0c;二者共同塑造了现代RESTful API的开发范式。 本期就扒一扒其技术演进的关键节点与核心逻辑&#xff1a; &#x1f504; 一、起源与初创期&#xff1a;Swagger的诞生&#xff08;2010-2014&#xff09; 核心…...

大数据学习(132)-HIve数据分析

​​​​&#x1f34b;&#x1f34b;大数据学习&#x1f34b;&#x1f34b; &#x1f525;系列专栏&#xff1a; &#x1f451;哲学语录: 用力所能及&#xff0c;改变世界。 &#x1f496;如果觉得博主的文章还不错的话&#xff0c;请点赞&#x1f44d;收藏⭐️留言&#x1f4…...

LangChain知识库管理后端接口:数据库操作详解—— 构建本地知识库系统的基础《二》

这段 Python 代码是一个完整的 知识库数据库操作模块&#xff0c;用于对本地知识库系统中的知识库进行增删改查&#xff08;CRUD&#xff09;操作。它基于 SQLAlchemy ORM 框架 和一个自定义的装饰器 with_session 实现数据库会话管理。 &#x1f4d8; 一、整体功能概述 该模块…...

省略号和可变参数模板

本文主要介绍如何展开可变参数的参数包 1.C语言的va_list展开可变参数 #include <iostream> #include <cstdarg>void printNumbers(int count, ...) {// 声明va_list类型的变量va_list args;// 使用va_start将可变参数写入变量argsva_start(args, count);for (in…...

学习一下用鸿蒙​​DevEco Studio HarmonyOS5实现百度地图

在鸿蒙&#xff08;HarmonyOS5&#xff09;中集成百度地图&#xff0c;可以通过以下步骤和技术方案实现。结合鸿蒙的分布式能力和百度地图的API&#xff0c;可以构建跨设备的定位、导航和地图展示功能。 ​​1. 鸿蒙环境准备​​ ​​开发工具​​&#xff1a;下载安装 ​​De…...

【安全篇】金刚不坏之身:整合 Spring Security + JWT 实现无状态认证与授权

摘要 本文是《Spring Boot 实战派》系列的第四篇。我们将直面所有 Web 应用都无法回避的核心问题&#xff1a;安全。文章将详细阐述认证&#xff08;Authentication) 与授权&#xff08;Authorization的核心概念&#xff0c;对比传统 Session-Cookie 与现代 JWT&#xff08;JS…...

xmind转换为markdown

文章目录 解锁思维导图新姿势&#xff1a;将XMind转为结构化Markdown 一、认识Xmind结构二、核心转换流程详解1.解压XMind文件&#xff08;ZIP处理&#xff09;2.解析JSON数据结构3&#xff1a;递归转换树形结构4&#xff1a;Markdown层级生成逻辑 三、完整代码 解锁思维导图新…...