Commit Graph

202 Commits

Author SHA1 Message Date
Tushar Khatri
0146ec5e5d Implement true LlamaIndex integration with custom embedding adapter
- Replace custom components with llama-index-core library

- Add CustomEmbedding for OpenAI-compatible APIs (Gemini, OpenAI, Azure)

- Use thread pool executor for async/sync compatibility

- Switch to retriever (no OpenAI LLM required)

- Add PyMuPDF for PDF parsing

- Native llamaindex_storage/ format for ecosystem compatibility
2026-01-11 16:09:25 +05:30
Tushar Khatri
2de2772d43 Implement LlamaIndex RAG pipeline with dynamic provider selection
- Refactor knowledge base initialization to support dynamic RAG provider selection
  based on RAG_PROVIDER environment variable instead of hardcoded RAGAnything

- Implement VectorIndexer component for dense vector storage
  * Support FAISS for fast similarity search when available
  * Fallback to pickle-based storage with numpy cosine similarity
  * Store normalized vectors and metadata separately
  * Create vector_store directory structure for LlamaIndex KBs

- Implement DenseRetriever component for vector-based search
  * FAISS-based fast search when available
  * Numpy cosine similarity fallback
  * Return clean, formatted context without truncation or relevance prefixes
  * Compatible with existing RAG pipeline interface

- Update LlamaIndexPipeline to use PDFParser instead of TextParser
  * PDFParser uses PyMuPDF for reliable PDF text extraction
  * Supports both MinerU pre-parsed content and direct PDF parsing
  * Prevents raw PDF binary data from being indexed

- Modify KnowledgeBaseInitializer to use RAGService
  * Remove direct RAGAnything instantiation and configuration
  * Use RAGService which respects RAG_PROVIDER environment variable
  * Support all registered providers: raganything, lightrag, llamaindex, academic
  * Add generic statistics display for provider-agnostic KB info
  * Reduce initialization code from ~200 to ~90 lines

- Add PyMuPDF dependency for PDF text extraction
  * Required for PDFParser to extract clean text from PDF files
  * Version constraint: PyMuPDF>=1.23.0

- Fix DenseRetriever output formatting
  * Remove relevance score prefixes from retrieved chunks
  * Remove 800-character truncation limit
  * Use clean newline separators for better LLM context
  * Return formatted content suitable for direct LLM consumption

Storage structure comparison:
- RAGAnything/LightRAG: Uses rag_storage/ with knowledge graph files
- LlamaIndex: Uses vector_store/ with FAISS index or pickle embeddings

Key differences:
- RAGAnything: Makes 50-100+ LLM calls during KB creation for entity/relation extraction
- LlamaIndex: Makes 0 LLM calls during KB creation, only embedding API calls
- LlamaIndex is faster, cheaper, and avoids rate limits during indexing
- LLM only used during search/chat to generate final answers from retrieved context

Tested with:
- PDF document parsing and indexing
- Vector similarity search and retrieval
- Dynamic provider switching via environment variable
- Fallback to numpy when FAISS unavailable
2026-01-11 15:34:22 +05:30
Bingxi Zhao (Frank)
fe4b973eb9 Merge pull request #95 from Andres77872/web-search-providers
Web search providers
2026-01-11 00:53:59 +08:00
Andres
e3b332fce4 Merge pull request #1 from Andres77872/dev
Dev
2026-01-10 10:34:20 -06:00
andres
56ec4c180b "Remove settings.py and associated settings classes as part of configuration cleanup." 2026-01-10 10:31:45 -06:00
andres
239bc5dcc5 "Clean up formatting and fix code style inconsistencies across web search modules." 2026-01-10 00:49:45 -06:00
andres
a2ec0f202e "Remove deprecated web_search.py and update web search configuration with support for multiple providers." 2026-01-10 00:36:36 -06:00
Bingxi Zhao (Frank)
a41744133d Merge pull request #90 from scrrlt/docs/windows-lp-troubleshooting
docs: update
2026-01-10 12:49:45 +08:00
Scarlet Moore
e98e0f0b1b docs: update 2026-01-10 15:10:32 +11:00
Bingxi Zhao
fe9c169939 fix 2026-01-10 01:54:18 +08:00
Pancake
1b3150e42e improve llm services 2026-01-10 01:08:21 +08:00
Pancake
093c98fbf7 Merge main into dev 2026-01-09 22:29:27 +08:00
Bingxi Zhao (Frank)
3afe109d8c Merge pull request #87 from scrrlt/feat/azure-openai-support
feat: azure openai support
2026-01-09 22:24:21 +08:00
Scarlet Moore
de0e2f27fd feat: enhance Azure OpenAI support in configuration and agent classes 2026-01-09 14:11:17 +00:00
github-actions[bot]
50d8eaf395 chore: update repo roster images [skip ci] 2026-01-09 12:53:28 +00:00
scrrlt
4d8f6bcd9b feat: implement comprehensive Azure OpenAI support across all modules 2026-01-09 23:31:06 +11:00
Bingxi Zhao (Frank)
c8f3363842 update 2026-01-09 16:20:05 +08:00
Pancake
dfd8254861 fix lint 2026-01-09 14:30:28 +08:00
Pancake
f7abd153ef Add sync branch 2026-01-09 14:25:20 +08:00
Pancake
3fab7154b0 fix: official web 2026-01-09 14:20:56 +08:00
Pancake
814bed7452 docs: update website 2026-01-09 14:08:56 +08:00
Pancake
1074cf2071 add CN_config 2026-01-09 13:05:38 +08:00
github-actions[bot]
c5cc62ea9e chore: update repo roster images [skip ci] 2026-01-09 02:00:42 +00:00
Bingxi Zhao
8b5c45ddc7 docs: release ver0.4.1 v0.4.1 2026-01-09 09:57:00 +08:00
Bingxi Zhao
84509677f5 fix: docker deployment 2026-01-09 09:44:51 +08:00
Bingxi Zhao
df034d854b fix: llm providers, frontend 2026-01-09 09:29:17 +08:00
Bingxi Zhao (Frank)
6f9437b63d Merge pull request #81 from tusharkhatriofficial/fix/question-generation-json-parsing
fix: Add comprehensive error handling and JSON parsing for question g…
2026-01-09 08:54:16 +08:00
Tushar Khatri
4b5d55ae70 fix: Add comprehensive error handling and JSON parsing for question generation
- Add _extract_json_from_markdown() helper to strip markdown code blocks from LLM responses
- Update prompts to explicitly require raw JSON without markdown formatting
- Add error handling in coordinator._call_llm() with timeout, response validation, and detailed logging
- Add error handling in generation_agent for _action_generate_question() and _action_refine_question()
- Add JSON parsing validation in _generate_question_plan() and _generate_single_question_custom()
- Replace DEBUG logs with ERROR level for better visibility of LLM response issues

Fixes issue where LLM responses wrapped in markdown code blocks (e.g., ```json {...} ```)
caused 'Expecting value: line 1 column 1 (char 0)' JSON parsing errors during question generation.
2026-01-09 02:44:02 +05:30
Bingxi Zhao
b6600ab32c fix & update docs v0.4.0 2026-01-09 01:34:36 +08:00
Pancake
42fb0ec8fd release ver0.4.0 2026-01-09 00:57:28 +08:00
Pancake
99ae39fcec Add new development files: RAG diagnostics, chat session detail, text parser 2026-01-09 00:47:24 +08:00
Pancake
efc2007911 Apply local configuration and UI enhancements after dev merge 2026-01-09 00:43:52 +08:00
Pancake
8765e58ab2 Merge dev: embedding providers enhancement (PR #79) 2026-01-09 00:40:16 +08:00
Pancake
6f3eea291a Merge branch 'main' of https://github.com/HKUDS/DeepTutor 2026-01-09 00:12:09 +08:00
Bingxi Zhao (Frank)
b1146458f8 Merge pull request #79 from FacundoMajda/dev-embeddings-providers
Dev embeddings providers
2026-01-08 23:37:41 +08:00
FacundoMajda
f34271d951 feat: Enhance embedding provider support with new models and validation features 2026-01-08 12:11:48 -03:00
Pancake
89fab8ace1 Merge dev into main: service refactoring with preserved main features 2026-01-08 21:11:11 +08:00
github-actions[bot]
d0f963ebe8 chore: update repo roster images [skip ci] 2026-01-08 12:54:34 +00:00
Bingxi Zhao (Frank)
c23d7c3677 Merge pull request #77 from kushalgarg101/feat/llm_models_support
provides more llm providers supports, fixed some ambiguities, ui updates,fixed discrepency between some elements of ui and backend were in sync.
2026-01-08 20:01:53 +08:00
Bingxi Zhao (Frank)
00dbb53f07 Merge branch 'main' into feat/llm_models_support 2026-01-08 19:58:15 +08:00
kushal garg
e61e2e9cf5 updates in files to use settings.py and llm_factory for new updated providers 2026-01-08 15:50:49 +05:30
kushal garg
f6e6b9fed3 a wrapper on top of lightrag for providing new llm providers 2026-01-08 15:49:17 +05:30
kushal garg
317ad41851 minor ui improvements and sync with backend, also addition of llm providers 2026-01-08 15:42:43 +05:30
kushal garg
e5fdf27adc better handling and management of .env variables 2026-01-08 15:41:16 +05:30
kushal garg
5143bff055 these werent made by me but have to commit them 2026-01-08 15:39:40 +05:30
FacundoMajda
2e48e5768b Add embedding providers, not just openAI. 2026-01-07 09:52:27 -03:00
Bingxi Zhao (Frank)
62b5e0de6e Merge pull request #67 from RinZ27/fix/cleanup-final
Cleanup: address reviewer feedback on PR #62 (Final)
2026-01-07 11:02:10 +08:00
Bingxi Zhao (Frank)
b58e235e57 Merge branch 'main' into fix/cleanup-final 2026-01-07 11:01:59 +08:00
Rin
340fd06d63 Cleanup: address reviewer feedback on PR #62 (Corrected) 2026-01-07 09:55:27 +07:00
github-actions[bot]
f7a01a63f8 chore: update repo roster images [skip ci] 2026-01-07 02:54:45 +00:00