linmengmeng-1314 opened a new issue, #333:
URL: https://github.com/apache/hugegraph-ai/issues/333

   ## Description
   
   When using reasoning models like DeepSeek V4 for HugeGraph-LLM RAG pipeline, 
several components fail due to LLM output format incompatibility. Reasoning 
models tend to wrap outputs in markdown code blocks or use different JSON 
structures than what the parsers expect.
   
   ## Affected Components
   
   ### 1. Uvicorn `reload=True` in Docker deployment
   - **File**: `hugegraph-llm/src/hugegraph_llm/demo/rag_demo/app.py:205`
   - `reload=True` enables file watching which conflicts with Docker bind 
mounts, causing the service to hang
   - **Suggestion**: Make reload configurable via environment variable (disable 
by default in production)
   
   ### 2. Keyword extraction parser incompatible with reasoning model output
   - **File**: 
`hugegraph-llm/src/hugegraph_llm/operators/llm_op/keyword_extract.py:146-180`
   - `_extract_keywords_from_response` expects `KEYWORDS: word:score` format, 
but reasoning models may wrap output in markdown or return different structures
   - **Workaround**: Use `KEYWORD_EXTRACT_TYPE=textrank` instead of `llm`
   - **Suggestion**: Improve parser robustness similar to the fix in #332 for 
graph extraction
   
   ## Related PRs
   
   - #331 - Fix edge creation failure due to vertex ID mismatch
   - #332 - Fix property graph JSON parsing robustness
   
   ## Environment
   
   - HugeGraph Server: 1.7.0
   - LLM: DeepSeek V4 Pro (via OpenAI-compatible API)
   - Embedding: SiliconFlow BGE-M3


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to