BASE

LightRAG

LightRAG

AI / ML development tool · Free

A retrieval framework combining an entity graph and vector search: it adds relationships between documents to LLM context retrieval.

Also known as: hkuds/LightRAG; lightrag; light-retrieval-augmented-generation

Resource illustration: LightRAG

Open resource ↗

What you can use for free

A local code pipeline under MIT; rights for the selected models are checked separately.

Paid features and costs

Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.

Access and limitations

A local code pipeline under MIT; rights for the selected models are checked separately. Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.

Use cases

  • Add entity relationships to retrieval
  • Build relationships and compare retrieved context for reference questions

Example workflow

A possible workflow; this is not a report of hands-on testing.

Add entity relationships to retrieval.

Before you start

  • Test documents or tasks, and a quality criterion.
  • Models, a runtime, and a computing budget.

Steps

  1. Prepare documents and choose a graph/vector retrieval pipeline.
  2. Build relationships and compare retrieved context for reference questions.
  3. Connect the workflow to the application and make errors observable.

Check your result

  • Check the result against reference examples and invalid inputs.
  • Inference costs, model rights, and data handling have been established.

Choosing LightRAG

Add entity relationships to retrieval

Choose this when

  • Add entity relationships to retrieval
  • Build relationships and compare retrieved context for reference questions

Requirements

  • Configure LLM/embedding settings in .env and authentication or a local-only bind address before allowing network access.

Things to consider

  • Costs and limits of free use: Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.
  • Terms of use: MIT for the code; dependencies have separate licenses.
  • Auth configuration without checking the whitelist may leave Ollama-compatible routes open.

Frequently asked questions

What can you use for free in LightRAG?

A local code pipeline under MIT; rights for the selected models are checked separately.

What additional costs might arise with LightRAG?

Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.

What terms of use matter for LightRAG?

MIT for the code; dependencies have separate licenses.

How do you get started with LightRAG?

Prepare documents and choose a graph/vector retrieval pipeline. Build relationships and compare retrieved context for reference questions. Connect the workflow to the application and make errors observable.

How can I configure different LLM roles without exposing the LightRAG API without authentication?

LightRAG separates the LLM roles EXTRACT, QUERY, KEYWORDS, and VLM with independent settings; four chunking strategies are available: Fix, Recursive, Vector, and Paragraph. The server listens on 0.0.0.0 by default. The README requires configuring API keys/accounts or restricting the bind address; Ollama-compatible /api/* routes are excluded from protection by default, and WHITELIST_PATHS=/health is set for them.

License

MIT for the code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • LightRAG
  • ml
  • Development

Sources

Other resources