Add LightRAG demo script with vLLM integration#2582
Merged
danielaskdd merged 2 commits intoHKUDS:mainfrom Jan 15, 2026
Merged
Conversation
This script demonstrates the usage of LightRAG with vLLM for LLM, embeddings, and reranking. It includes setup instructions, environment variable requirements, and a main function that indexes a book and performs a query.
Removed unused import of numpy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds a new example demonstrating how to use LightRAG with vLLM-served models for large language model inference, text embeddings, and reranking.
The example mirrors the structure and conventions of existing LightRAG demos (e.g. Gemini) while showcasing a fully self-hosted, OpenAI-compatible vLLM deployment.
Related Issues
Changes Made
Added a new example script:
examples/lightrag_vllm_demo.pyDemonstrates integration of:
Included clear setup instructions and required environment variables
Aligned code structure and formatting with existing LightRAG example demos
Provided a realistic hybrid query with reranking enabled
Checklist
Additional Notes
This example is intended to help users deploy LightRAG in self-hosted and on-prem environments using vLLM, without reliance on external proprietary APIs. It follows existing LightRAG patterns to ensure consistency and ease of adoption.