45 Commits

Author SHA1 Message Date
yangdx
da46b341dc feat: Optimize document deletion performance
- To enhance performance during document deletion, new batch-get methods, `get_nodes_by_chunk_ids` and `get_edges_by_chunk_ids`, have been added to the graph storage layer (`BaseGraphStorage` and its implementations). The [`adelete_by_doc_id`](lightrag/lightrag.py:1681) function now leverages these methods to avoid unnecessary iteration over the entire knowledge graph, significantly improving efficiency.
- Graph storage updated: Networkx, Neo4j, Postgres AGE
2025-06-25 12:37:57 +08:00
yangdx
b92f9b9453 Optimizing query prompt 2025-05-08 12:53:28 +08:00
yangdx
2bafc87a80 Add comment for deprecated PROMPT template 2025-05-08 09:40:38 +08:00
yangdx
ae1c9f8d10 Add user_prompt the QueryParam 2025-05-08 03:38:47 +08:00
yangdx
474b77c43e Remove deprecated mix_rag_response prompt template 2025-05-07 18:11:35 +08:00
yangdx
1c5bbe396a Optimize prompt template for naive query 2025-05-07 18:11:12 +08:00
Chen Yuwen
8bf78f0823
Update prompt.py
missing ‘)’ in PROMPTS["entity_continue_extraction"] lead to misunderstanding prompt for some small models and can not responsing correctly.
2025-04-21 16:04:19 +08:00
zrguo
87fbffde14 fix citation 2025-03-28 13:30:24 +08:00
zrguo
bf18a5406e add citation 2025-03-17 23:32:35 +08:00
Zhenya Zhu
37754f14b5
force keywords_extraction output as JSON 2025-03-11 11:54:30 +08:00
zrguo
c936aaf5c8 fix linting 2025-03-09 01:29:21 +08:00
zrguo
595d8bf372 Update prompt.py 2025-03-09 01:25:15 +08:00
zrguo
548f9a8234 Update prompts 2025-03-09 01:21:39 +08:00
Zhichun Wu
d79a9d7acc consistent format 2025-02-26 23:04:21 +08:00
Yannick Stephan
8958046b74 cleaned code 2025-02-19 22:07:25 +01:00
Yannick Stephan
55cd900e8e clean comments and unused libs 2025-02-18 21:12:06 +01:00
Yannick Stephan
eaf1d553d2 improved typing 2025-02-15 22:37:12 +01:00
yangdx
6f5503ebd6 Update similarity_check prompt to avoid generating two scores sometiimes 2025-02-02 04:22:43 +08:00
yangdx
60b66b95e3 Fix typo in prompt 2025-02-01 10:36:25 +08:00
yangdx
0692635ebd Improve prompts to avoid make-up respond from LLM like qwen-plus when very long context is provided. 2025-02-01 10:36:25 +08:00
zrguo
c4638ae264
Merge pull request #639 from magicyuan876/main
支持多轮对话
2025-01-25 01:48:05 +08:00
Magic_yuan
5719aa8882 支持多轮对话 2025-01-24 19:03:36 +08:00
ruirui
d5a6d08877 fix completion_delimiter with record_delimiter 2025-01-24 16:34:24 +08:00
Magic_yuan
4c950cf4ce feat: 增强知识图谱关系的时序性支持
- 为关系和向量数据增加时间戳支持,记录知识获取的时间
- 优化混合查询策略,同时考虑语义相关性和时间顺序
- 增强提示词模板,指导LLM在处理冲突信息时考虑时间因素
2024-12-29 15:25:57 +08:00
Magic_yuan
6325e290bb 优化mix模式的查询提示词,使用简洁的回答,并提供参考来源 2024-12-29 00:32:09 +08:00
Magic_yuan
aaaf617451 feat(lightrag): Implement mix search mode combining knowledge graph and vector retrieval
- Add 'mix' mode to QueryParam for hybrid search functionality
- Implement mix_kg_vector_query to combine knowledge graph and vector search results
- Update LightRAG class to handle 'mix' mode queries
- Enhance README with examples and explanations for the new mix search mode
- Introduce new prompt structure for generating responses based on combined search results
2024-12-28 11:56:28 +08:00
ai_user
376603826b fix keywords_extraction_examples format error 2024-12-27 03:12:55 +00:00
Magic_yuan
a09e1ba190 refactor(prompt): 优化提示模板以提高相似度评估的准确性- 明确了相似度评分的评判标准,包括不同情况下的评分依据
- 简化了评分流程,要求直接返回数字
- 期望通过这些改动提高评估的准确性和一致性
2024-12-11 12:57:58 +08:00
Magic_yuan
0a41cc8a9a feat(llm, prompt):增加日志输出并扩展实体类型
- 在 llm.py 中添加了日志输出,用于调试和记录 LLM 查询输入
- 在 prompt.py 中增加了 "category" 实体类型,扩展了实体提取的范围
2024-12-11 12:45:10 +08:00
Magic_yuan
9724b59e19 提取关键词时LLM输出的关键词跟随用户提问的语言,可以避免一些指定英文而偶发的一些LLM输出的JSON不规范导致JSON解析失败的问题 2024-12-09 18:15:09 +08:00
Magic_yuan
ccf44dc334 feat(cache): 增加 LLM 相似性检查功能并优化缓存机制
- 在 embedding 缓存配置中添加 use_llm_check 参数
- 实现 LLM 相似性检查逻辑,作为缓存命中的二次验证- 优化 naive 模式的缓存处理流程
- 调整缓存数据结构,移除不必要的 model 字段
2024-12-08 17:35:52 +08:00
Yizhi Zhang
3a6645b78d fix bug of example prompt 2024-12-03 22:25:50 +08:00
Sebastian Schramm
b0483ae91d fix templating of language in prompts 2024-11-28 14:28:29 +01:00
jin
26ae240c65 Logic Optimization 2024-11-25 13:40:38 +08:00
jin
89c2de54a2 Optimization logic 2024-11-25 13:29:55 +08:00
jin
b1cf41d242 fix bug 2024-11-11 15:19:42 +08:00
jin
594470ab56 Oracle Database support
Add oracle 23ai database as the KV/vector/graph storage
2024-11-08 14:58:41 +08:00
zrguo
f9acf37398 Merge pull request #56 from sank8-2/dev
chore: added pre-commit-hooks and ruff formatting for commit-hooks
2024-10-19 20:44:11 +08:00
Sanketh Kumar
32464fab4e chore: added pre-commit-hooks and ruff formatting for commit-hooks 2024-10-19 09:43:17 +05:30
zrguo
515b890aab fix prompt.py 2024-10-19 11:46:03 +08:00
LarFii
3746eabf06 update 2024-10-10 15:02:30 +08:00
LarFii
130f7f391f Revert "first commit" 2024-10-10 15:00:31 +08:00
LarFii
0c2640f4e2 update 2024-10-10 14:58:21 +08:00
LarFii
74c2f04146 Revert "first commit" 2024-10-10 14:57:32 +08:00
Larfii
25df09a8ac first commit 2024-10-07 17:23:54 +08:00