gzdaniel commited on
Commit
3a6484f
·
1 Parent(s): 1bb87cf

Update README.md

Browse files
lightrag/api/README-zh.md CHANGED
@@ -202,6 +202,15 @@ Open WebUI 使用 LLM 来执行会话标题和会话关键词生成任务。因
202
 
203
  "/context" 也不是 LightRAG 查询模式,它会告诉 LightRAG 只返回为 LLM 准备的上下文信息。您可以检查上下文是否符合您的需求,或者自行处理上下文。
204
 
 
 
 
 
 
 
 
 
 
205
  ## API 密钥和认证
206
 
207
  默认情况下,LightRAG 服务器可以在没有任何认证的情况下访问。我们可以使用 API 密钥或账户凭证配置服务器以确保其安全。
 
202
 
203
  "/context" 也不是 LightRAG 查询模式,它会告诉 LightRAG 只返回为 LLM 准备的上下文信息。您可以检查上下文是否符合您的需求,或者自行处理上下文。
204
 
205
+ ### 在聊天中添加用户提示词
206
+
207
+ 使用LightRAG进行内容查询时,应避免将搜索过程与无关的输出处理相结合,这会显著影响查询效果。用户提示(user prompt)正是为解决这一问题而设计 -- 它不参与RAG检索阶段,而是在查询完成后指导大语言模型(LLM)如何处理检索结果。我们可以在查询前缀末尾添加方括号,从而向LLM传递用户提示词:
208
+
209
+ ```
210
+ /[使用mermaid格式画图] 请画出 Scrooge 的人物关系图谱
211
+ /mix[使用mermaid格式画图] 请画出 Scrooge 的人物关系图谱
212
+ ```
213
+
214
  ## API 密钥和认证
215
 
216
  默认情况下,LightRAG 服务器可以在没有任何认证的情况下访问。我们可以使用 API 密钥或账户凭证配置服务器以确保其安全。
lightrag/api/README.md CHANGED
@@ -204,6 +204,15 @@ For example, the chat message `/mix What's LightRAG?` will trigger a mix mode qu
204
 
205
  `/context` is also not a LightRAG query mode; it will tell LightRAG to return only the context information prepared for the LLM. You can check the context if it's what you want, or process the context by yourself.
206
 
 
 
 
 
 
 
 
 
 
207
  ## API Key and Authentication
208
 
209
  By default, the LightRAG Server can be accessed without any authentication. We can configure the server with an API Key or account credentials to secure it.
 
204
 
205
  `/context` is also not a LightRAG query mode; it will tell LightRAG to return only the context information prepared for the LLM. You can check the context if it's what you want, or process the context by yourself.
206
 
207
+ ### Add user prompt in chat
208
+
209
+ When using LightRAG for content queries, avoid combining the search process with unrelated output processing, as this significantly impacts query effectiveness. User prompt is specifically designed to address this issue — it does not participate in the RAG retrieval phase, but rather guides the LLM on how to process the retrieved results after the query is completed. We can append square brackets to the query prefix to provide the LLM with the user prompt:
210
+
211
+ ```
212
+ /[Use mermaid format for diagrams] Please draw a character relationship diagram for Scrooge
213
+ /mix[Use mermaid format for diagrams] Please draw a character relationship diagram for Scrooge
214
+ ```
215
+
216
  ## API Key and Authentication
217
 
218
  By default, the LightRAG Server can be accessed without any authentication. We can configure the server with an API Key or account credentials to secure it.