From ce123cb7ae43c156472b8d77649db21d273852a3 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Tue, 8 Jul 2025 09:01:34 +0800 Subject: [PATCH] 'commit' --- dsRagAnything/T2_Query.py | 5 ++++- .../kv_store_llm_response_cache.json | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dsRagAnything/T2_Query.py b/dsRagAnything/T2_Query.py index 6cd17b3f..59212781 100644 --- a/dsRagAnything/T2_Query.py +++ b/dsRagAnything/T2_Query.py @@ -32,11 +32,14 @@ async def load_existing_lightrag(): vision_model_func=vision_model_func, ) # 查询 + user_prompt = "你是一个化学专家,对方程式非常熟悉!" result = await rag.aquery( - "氢气与氧气的反应方程式是什么?", + user_prompt=user_prompt, + query="氢气与氧气的反应方程式是什么?", mode="hybrid" ) print("查询结果:", result) + if __name__ == "__main__": asyncio.run(load_existing_lightrag()) diff --git a/dsRagAnything/Topic/Chemistry/kv_store_llm_response_cache.json b/dsRagAnything/Topic/Chemistry/kv_store_llm_response_cache.json index b224ef41..acfef91d 100644 --- a/dsRagAnything/Topic/Chemistry/kv_store_llm_response_cache.json +++ b/dsRagAnything/Topic/Chemistry/kv_store_llm_response_cache.json @@ -111,6 +111,26 @@ "embedding_min": null, "embedding_max": null, "original_prompt": "氢气与氧气燃烧反应化学方程式\n 1、不要输出参考资料 或者 References !\n 2、如果问题与提供的知识库内容不符,则明确告诉未在知识库范围内提到!" + }, + "9c8022e1f41653c46d163f70acada823": { + "return": "{\"high_level_keywords\": [\"\\u5316\\u5b66\\u53cd\\u5e94\", \"\\u65b9\\u7a0b\\u5f0f\"], \"low_level_keywords\": [\"\\u6c22\\u6c14\", \"\\u6c27\\u6c14\"]}", + "cache_type": "keywords", + "chunk_id": null, + "embedding": null, + "embedding_shape": null, + "embedding_min": null, + "embedding_max": null, + "original_prompt": "氢气与氧气的反应方程式是什么?" + }, + "29278d4684597025f5c0928942c42b30": { + "return": "根据提供的知识库内容,氢气与氧气的燃烧反应方程式如下:\n\n**氢气燃烧反应方程式** \n$$ 2 H _ { 2 } + O _ { 2 } = 2 H _ { 2 } O $$ \n\n### 反应特点与背景 \n1. **化学计量学(Stoichiometry)** \n - 方程式中系数(2:1:2)体现了反应物与生成物的摩尔比例,符合质量守恒定律(Law of Conservation of Mass)。 \n - 每2分子氢气($H_2$)与1分子氧气($O_2$)完全反应生成2分子水($H_2O$)。\n\n2. **反应类型** \n - 属于**放热反应(Exothermic Reactions)**,反应过程中释放能量(如热能)。 \n - 涉及**氧化还原过程(Redox Processes)**:氢气被氧化,氧气被还原。\n\n3. **应用领域** \n - **火箭推进(Rocket Propulsion)**:液态氢与氧的燃烧常用于航天器燃料。 \n - **燃料电池技术(Fuel Cell Technology)**:通过该反应高效转化化学能为电能。 \n\n---\n\n### 参考文献 \n1. [KG] 化学方程式_CHEMISTRY_1.docx(实体:Hydrogen Combustion Reaction (equation)) \n2. [DC] 化学方程式_CHEMISTRY_1.docx(内容:Mathematical Equation Analysis) \n3. [KG] 化学方程式_CHEMISTRY_1.docx(实体:Stoichiometry) \n4. [KG] 化学方程式_CHEMISTRY_1.docx(实体:Law of Conservation of Mass) \n5. [KG] 化学方程式_CHEMISTRY_1.docx(实体:Rocket Propulsion)", + "cache_type": "query", + "chunk_id": null, + "embedding": null, + "embedding_shape": null, + "embedding_min": null, + "embedding_max": null, + "original_prompt": "氢气与氧气的反应方程式是什么?" } } } \ No newline at end of file