github HKUDS/LightRAG v1.4.9

latest releases: v1.4.9.8, v1.4.9.7, v1.4.9.6...
one month ago

Importance Notes

v1.4.9 introduces key enhancements focused on refining the reference output format and incorporating structured references into query results. All query API endpoints now include a references field, enabling frontend applications to retrieve cited documents and their corresponding identifiers associated with LightRAG query results.

The context format sent to the LLM has been updated. The streaming response from the LLM now includes a references field (ignored by the frontend by default). If your application relies on context data returned by the LightRAG query API, you may need to update your code accordingly.

By leveraging the user_prompt parameter, users can instruct the LLM to generate responses with footnote annotations. The footnote numbers in the LLM output can be seamlessly mapped to the document IDs returned in the references field. This integration enables tighter alignment between LightRAG and your business system, empowering users to access original source materials directly.

user_prompt act as additional output instruction for LLM. Here provide two examples:

  1. user_prompt for gpt-4.1-mini or Qwen3
For inline citations, employ the footnote reference format `[^1]`, where the `^` following the opening square bracket denotes a superscript link. When multiple citations are required at a single location, enclose each reference ID within separate footnote markers (e.g., `[^1][^2][^3]`).
  1. user_prompt for DeepSeek:
内嵌引文标注使用Markdown脚注格式`[^1]`, 当某处有多个引文标注时,应将每个引用ID分别置于独立的中括号内(例如:`[^1][^2][^3]`)。仅需对回答的关键事实和依据信息给出标注。出现在引文标中的引文ID都应该列在最后生成的参考文献中段落中。不要在参考文献段落之后生成脚注段落。

This screenshot illustrates the functionality of the user_prompt parameter in the WebUI:

image

What's New

  • Refactor: Provide Citation Context to LLM and Improve Reference Section Generation Quality by @danielaskdd in #2140
  • Feature: Add Reference List Support for All Query Endpoints by @danielaskdd in #2147
  • Refactor(WebUI): Change Client-side Search Logic with Server-driven Enity Name Search by @danielaskdd in #2124
  • Feature(webui): Force sending history messages in bypass mode by @danielaskdd in #2132
  • Feature(webui): Add footnotes support to markdown rendering in chat messages by @danielaskdd in #2145
  • Feature(webui): Add user prompt history dropdown to query settings by @danielaskdd in #2146

What's Fixed

  • Add path traversal security validation for file deletion operations by @danielaskdd in #2113
  • Fix WebUI: Enhance tooltip readability by fix tooltip text wrapping of error message by @danielaskdd in #2114
  • Fix Retrieval Page Parameter Options: Enforce Mutual Exclusivity Between "Only Need Context" and "Only Need Prompt" by @Saravanakumar26 in #2118
  • Refactor: Optimize Query Prompts and User Prompt Handling by @danielaskdd in #2127
  • WebUI Bugfix and Improvement by @danielaskdd in #2129
  • Fix: Restore browser autocomplete functionality in message input box by @danielaskdd in #2131
  • feat: Implement Comprehensive Document Duplication Prevention System by @danielaskdd in #2135
  • Refactor node type legend and color mapping by @danielaskdd in #2137
  • Fix typo: "Oputput" -> output by @SeungAhSon in #2139
  • Feature: Add Enhanced Markdown Support for WebUI by @danielaskdd in #2143
  • Fix: Robust clipboard functionality with fallback strategies by @danielaskdd in #2144
  • Optimize Footnote Marker Display in WebUI by @danielaskdd in #2151
  • Fix double query problem by add aquery_llm function for consistent response handling by @danielaskdd in #2152
  • Web UI - center the loading icon and adjust GraphSeach width by @zl7261 in #2150

New Contributors

Full Changelog: v1.4.8.2...v1.4.9

Don't miss a new LightRAG release

NewReleases is sending notifications on new releases.