Commit graph

5541 commits

Author SHA1 Message Date
Daniel.y
edf48d7965
Merge pull request #2319 from danielaskdd/remove-deprecated-code
Refactor: Remove Deprecated Chunk-Based Query Methods and Improve Graph Unit Test
2025-11-06 20:30:33 +08:00
yangdx
36501b82f5 Initialize shared storage for all graph storage types in graph unit test 2025-11-06 19:24:12 +08:00
yangdx
0c47d1a2d1 Fix linting 2025-11-06 19:12:40 +08:00
yangdx
f3b2ba8152 Translate graph storage test from Chinese to English 2025-11-06 19:11:35 +08:00
yangdx
a790f081dc Refine gitignore to only exclude root-level test files 2025-11-06 18:51:21 +08:00
yangdx
6b0f9795be Add workspace parameter and remove chunk-based query unit tests
- Add workspace param to test storage init
- Remove get_nodes_by_chunk_ids tests
- Remove get_edges_by_chunk_ids tests
- Clean up batch operations test function
2025-11-06 18:18:01 +08:00
yangdx
807d2461d3 Remove unused chunk-based node/edge retrieval methods 2025-11-06 18:17:10 +08:00
yangdx
831e658ed8 Update readme 2025-11-06 16:26:07 +08:00
yangdx
0216325e0f fix(ui): Remove dynamic import for i18n in settings store 2025-11-06 16:15:32 +08:00
yangdx
6e36ff41e1 Fix linting 2025-11-06 16:01:24 +08:00
yangdx
775933aa8a Merge branch 'VOXWAVE-FOUNDRY/main' 2025-11-06 15:57:39 +08:00
yangdx
5f49cee20f Merge branch 'main' into VOXWAVE-FOUNDRY/main 2025-11-06 15:37:35 +08:00
yangdx
b0d44d283b Add Langfuse observability integration documentation 2025-11-06 10:24:15 +08:00
Daniel.y
bd62bb3024
Merge pull request #2314 from danielaskdd/ragas
Refact: Separate Configuration of RAGAS for LLM and Embeddings
2025-11-05 19:16:14 +08:00
yangdx
9c05706062 Add separate endpoint configuration for LLM and embeddings in evaluation
- Split LLM and embedding API configs
- Add fallback chain for API keys
- Update docs with usage examples
2025-11-05 18:54:38 +08:00
yangdx
994a82dc7f Suppress token usage warnings for custom OpenAI-compatible endpoints
• Add warning filter for token usage
• Support vLLM, SGLang endpoints
• Non-critical for RAGAS evaluation
2025-11-05 18:25:28 +08:00
yangdx
d803df9413 Fix linting 2025-11-05 17:19:58 +08:00
yangdx
451257aed5 Doc: Update news with recent features 2025-11-05 16:58:20 +08:00
yangdx
f490622b72 Doc: Refactor evaluation README to improve clarity and structure 2025-11-05 10:43:55 +08:00
yangdx
a73314a4ba Refactor evaluation results display and logging format 2025-11-05 10:08:17 +08:00
yangdx
06b91d00f8 Improve RAG evaluation progress eval index display with zero padding 2025-11-05 09:46:07 +08:00
Daniel.y
eb80771f51
Merge pull request #2311 from danielaskdd/evalueate-cli
Feature: Enhanced RAG Evaluation CLI with Two-Stage Pipeline and Improved UX
2025-11-05 02:14:54 +08:00
yangdx
2823f92fb6 Fix tqdm progress bar conflicts in concurrent RAG evaluation
• Add position pool for tqdm bars
• Serialize tqdm creation with lock
• Set leave=False to clear completed bars
• Pass position/lock to eval tasks
• Import tqdm.auto for better display
2025-11-05 02:04:13 +08:00
yangdx
e5abe9dd3d Restructure semaphore control to manage entire evaluation pipeline
• Move rag_semaphore to wrap full function
• Increase RAG concurrency to 2x eval limit
• Prevent memory buildup from slow evals
• Keep eval_semaphore for RAGAS control
2025-11-05 01:07:53 +08:00
yangdx
83715a3ac1 Implement two-stage pipeline for RAG evaluation with separate semaphores
• Split RAG gen and eval stages
• Add rag_semaphore for stage 1
• Add eval_semaphore for stage 2
• Improve concurrency control
• Update connection pool limits
2025-11-05 00:36:09 +08:00
yangdx
d36be1f499 Improve RAGAS evaluation progress tracking and clean up output handling
• Add tqdm progress bar for eval steps
• Pass progress bar to RAGAS evaluate
• Ensure progress bar cleanup in finally
• Remove redundant output buffer flushes
2025-11-05 00:16:02 +08:00
yangdx
c358f405a9 Update evaluation defaults and expand sample dataset
• Lower concurrent evals from 3 to 2
• Standardize project names in samples
• Add 3 new evaluation questions
• Expand ground truth detail coverage
• Improve dataset comprehensiveness
2025-11-04 22:17:17 +08:00
yangdx
41c26a3677 feat: add command-line args to RAG evaluation script
- Add --dataset and --ragendpoint flags
- Support short forms -d and -r
- Update README with usage examples
2025-11-04 21:40:27 +08:00
yangdx
a618f837a6 Merge branch 'new/ragas-evaluation' 2025-11-04 19:35:15 +08:00
yangdx
d4b8a229b9 Update RAGAS evaluation to use gpt-4o-mini and improve compatibility
- Change default model to gpt-4o-mini
- Add deprecation warning suppression
- Update docs and comments for LightRAG
- Improve output formatting and timing
2025-11-04 18:50:53 +08:00
yangdx
6d61f70b92 Clean up RAG evaluator logging and remove excessive separator lines
• Remove excessive separator lines
• Add RAGAS concurrency comment
• Fix output buffer timing
2025-11-04 18:04:19 +08:00
yangdx
4e4b8d7e25 Update RAG evaluation metrics to use class instances instead of objects
• Import metric classes not instances
• Instantiate metrics with () syntax
2025-11-04 15:56:57 +08:00
yangdx
7abc687742 Add comprehensive configuration and compatibility fixes for RAGAS
- Fix RAGAS LLM wrapper compatibility
- Add concurrency control for rate limits
- Add eval env vars for model config
- Improve error handling and logging
- Update documentation with examples
2025-11-04 14:39:27 +08:00
yangdx
72db042667 Update .env loading and add API authentication to RAG evaluator
• Load .env from current directory
• Support LIGHTRAG_API_KEY auth header
• Override=False for env precedence
• Add Bearer token to API requests
• Enable per-instance .env configs
2025-11-04 10:59:09 +08:00
anouarbm
ad2d3c2cc0 Merge remote-tracking branch 'origin/main' into feat/ragas-evaluation 2025-11-03 13:48:14 +01:00
anouarbm
2fdb5f5ed7 chore: trigger CI re-run 2 2025-11-03 13:45:56 +01:00
anouarbm
36bffe2251 chore: trigger CI re-run 2025-11-03 13:35:05 +01:00
anouarbm
debfa0ec96 Merge branch 'feat/ragas-evaluation' of https://github.com/anouar-bm/LightRAG into feat/ragas-evaluation 2025-11-03 13:30:16 +01:00
anouarbm
a172cf893d feat(evaluation): Add sample documents for reproducible RAGAS testing
Add 5 markdown documents that users can index to reproduce evaluation results.

Changes:
- Add sample_documents/ folder with 5 markdown files covering LightRAG features
- Update sample_dataset.json with 3 improved, specific test questions
- Shorten and correct evaluation README (removed outdated info about mock responses)
- Add sample_documents reference with expected ~95% RAGAS score

Test Results with sample documents:
- Average RAGAS Score: 95.28%
- Faithfulness: 100%, Answer Relevance: 96.67%
- Context Recall: 88.89%, Context Precision: 95.56%
2025-11-03 13:28:46 +01:00
yangdx
10f6e6955f Improve Langfuse integration and stream response cleanup handling
• Check env vars before enabling Langfuse
• Move imports after env check logic
• Handle wrapper client aclose() issues
• Add debug logs for cleanup failures
2025-11-03 13:09:45 +08:00
ben moussa anouar
5da709b42a
Merge branch 'main' into feat/ragas-evaluation 2025-11-03 06:01:46 +01:00
anouarbm
36694eb9f2 fix(evaluation): Move import-time validation to runtime and improve documentation
Changes:
- Move sys.exit() calls from module level to __init__() method
- Raise proper exceptions (ImportError, ValueError, EnvironmentError) instead of sys.exit()
- Add lazy import for RAGEvaluator in __init__.py using __getattr__
- Update README to clarify sample_dataset.json contains generic test data (not personal)
- Fix README to reflect actual output format (JSON + CSV, not HTML)
- Improve documentation for custom test case creation

Addresses code review feedback about import-time validation and module exports.
2025-11-03 05:56:38 +01:00
Daniel.y
6975e69e44
Merge pull request #2298 from anouar-bm/feat/langfuse-observability
feat: Add optional Langfuse observability integration
2025-11-03 12:55:11 +08:00
yangdx
e0966b6511 Add BuildKit cache mounts to optimize Docker build performance
- Enable BuildKit syntax directive
- Cache UV and Bun package downloads
- Update docs for cache optimization
- Improve rebuild efficiency
2025-11-03 12:40:30 +08:00
anouarbm
9495778c2d refactor: reorder Langfuse import logic for improved clarity
Moved logger import before Langfuse block to fix NameError.
2025-11-03 05:27:41 +01:00
anouarbm
c9e1c6c1c2 fix(api): change content field to list in query responses
BREAKING CHANGE: content field is now List[str] instead of str

- Add ReferenceItem Pydantic model for type safety
- Update /query and /query/stream to return content as list
- Update OpenAPI schema and examples
- Add migration guide to API README
- Fix RAGAS evaluation to handle list format

Addresses PR #2297 feedback. Tested with RAGAS: 97.37% score.
2025-11-03 04:57:08 +01:00
anouarbm
9d69e8d776 fix(api): Change content field from string to list in query responses
BREAKING CHANGE: The `content` field in query response references is now
an array of strings instead of a concatenated string. This preserves
individual chunk boundaries when a single file has multiple chunks.

Changes:
- Update QueryResponse Pydantic model to accept List[str] for content
- Modify query_text endpoint to return content as list (query_routes.py:425)
- Modify query_text_stream endpoint to support chunk content enrichment
- Update OpenAPI schema and examples to reflect array structure
- Update API README with breaking change notice and migration guide
- Fix RAGAS evaluation to flatten chunk content lists
2025-11-03 04:37:09 +01:00
yangdx
7b8223daad Update env.example with host/endpoint clarifications for LLM/embedding 2025-11-03 04:02:40 +08:00
anouarbm
363f3051b1 eval using open ai 2025-11-02 19:39:56 +01:00
anouarbm
77db08038c Merge remote-tracking branch 'lightrag-fork/feat/ragas-evaluation' into feat/ragas-evaluation 2025-11-02 18:47:40 +01:00