Commit Graph

1763 Commits

Author SHA1 Message Date
Harsh Kashyap
be86baacca fix(llm): consolidate TTS / Seq2txt provider key resolution across 3 call sites (#17688)
# fix(llm): consolidate TTS / Seq2txt provider key resolution across 3
call sites

Fixes #17687.
2026-08-21 16:05:02 +08:00
Lynn
e2bbef0712 Fix: allow yiyan api key (#18601) 2026-08-21 13:42:28 +08:00
Wang Qi
169822105f Fix knowledge compilation to use pipeline LLM instead of default tenant LLM (#18572) 2026-08-21 09:58:26 +08:00
buua436
a3df588951 feat: improve incremental Wiki compilation (#18557) 2026-08-20 16:45:34 +08:00
Brian Sparker
09a9b629ee feat(chat): add You.com web search provider (#18478)
### Summary

Adds You.com as a built-in Web Search provider for RAGFlow Chat,
alongside Tavily and Querit, using the provider-neutral dispatch #17813
put in place. No changes to existing Tavily or Querit behaviour.

You.com runs its own web index and returns several extracted passages
per result rather than a single meta description, so retrieved chunks
arrive with usable context.

---------

Co-authored-by: Brian Sparker <brainsparker@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 12:12:18 +08:00
I Kartik Reddy
ab40c90118 fix: avoid quadratic dedup in RAG merge paths (#18135)
## Summary
Fixes #18025. Both merge paths deduplicated IDs by scanning a plain list
(`item not in list`) inside a loop while appending — O(n²) per merge.
Replaced with a set-backed `seen` check alongside the existing ordered
list: same order, same dedup result, O(n).

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 11:50:27 +08:00
Dhruv Diwakirti
86c25068fa fix: keep OCR text when no image2text model is configured (#18012)
An image whose OCR text is shorter than the CV LLM threshold produces zero chunks when the tenant has no image2text model configured. The extracted text is discarded.
2026-08-19 21:20:32 +08:00
Linpeng cheng
a9323ca554 fix: pass Infinity vector similarity weight (#17453)
## Summary

- Pass `vector_similarity_weight` from Python and Go retrieval requests
into Infinity's weighted fusion expression.
- Keep fusion weights ordered as text first and vector second, with the
existing default vector weight of `0.3`.

---------

Co-authored-by: chenglinpeng <1042527908@qq.com>
2026-08-19 20:06:02 +08:00
Serply
371d83c2d8 feat(chat): add Serply web search provider (#18475)
### Summary

This PR adds [Serply](https://serply.io) as a third web search provider
for chat assistants, alongside the existing Tavily and Querit options.
2026-08-19 18:59:01 +08:00
Loong
86c520a336 fix(nlp): differentiate alphabetic OOV term weights (#18470)
### Summary

Closes #18414.

`rag/res/term.freq` is not shipped, and both term-weight implementations
therefore assigned the same `300` fallback frequency to every lowercase
Latin token. With no tokenizer frequency, NER, or POS signal, function
words and content words received identical lexical boosts.

This PR adds the same bounded out-of-vocabulary prior to Python and Go:

- Use it only when the explicit DF dictionary or tokenizer has no
frequency.
- Count Latin, Greek, and Cyrillic letters, including uppercase and
accented forms.
- Keep the existing frequency of `300` for words up to three letters,
halve it every two additional letters, and clamp it at `10`.
- Reject digits, underscores, and logographic terms so Chinese and other
existing fine-grained-tokenizer paths are unchanged.
- Treat an absent optional `term.freq` as the supported fallback path
without a startup warning, while still logging inaccessible or malformed
dictionaries.

A corpus-derived table was intentionally not added: that would require
provenance/licensing decisions, language detection, and handling
cross-language homographs. The bounded prior is deterministic,
dependency-free, and fixes the equal-weight degradation for
whitespace-delimited alphabetic languages without claiming
corpus-specific precision.

Python and Go consume one shared fixture covering ASCII, uppercase,
accented Latin, Greek, Cyrillic, separators, invalid mixed tokens, and a
CJK non-match. Both sides also verify the issue's ordering (`was <
largest < supplier < equipment`) and that an explicit dictionary entry
still takes precedence.


Co-authored-by: Loong <184861530+yzl0ng@users.noreply.github.com>
2026-08-19 18:37:04 +08:00
Jiang, Guomin
9e913c3fb0 Fix empty Markdown document parsing (#18503)
## Summary
- treat empty Markdown binaries as in-memory content instead of local
file paths
- add a regression test ensuring empty content does not access the
filesystem

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-19 16:33:51 +08:00
Wang Qi
38c18ea9cf Fix search with [+-] crash the search (#18497) 2026-08-19 14:39:35 +08:00
D819
c466ff3b1a fix(llm): disable DeepSeek V4 thinking by default via extra_body (#18241)
## Summary
- Disable DeepSeek V4 thinking (chain-of-thought) by default.
- litellm 1.82.x drops `thinking: disabled`; carry the toggle through
`extra_body.thinking.type` and strip `reasoning_effort` to avoid the
400.
- Use local timezone for agent `sys.date` instead of UTC.

Reference: https://api-docs.deepseek.com/guides/thinking_mode

---------

Co-authored-by: Claude <claude@example.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-19 13:47:36 +08:00
Wang Qi
5f92323ced Fix ingestion pipeline child delimiter extra newline (#18490) 2026-08-19 13:47:09 +08:00
buua436
f2cfd86df4 refa: remove document graph snapshot payload (#18488) 2026-08-19 13:22:37 +08:00
Jack
fad48b13a1 fix(title-chunker): lossless hard-split on multibyte + re-split logging (#18476)
Fixes a character-loss regression in the TitleChunker hard-split fallback that shipped with #18455.
2026-08-19 10:55:42 +08:00
Aeovy
b27623a0c2 feat(MinerU):Add support for MinerU table and image chunk classification (#16703)
This PR fixes two issues with MinerU PDF parser where table and image chunks were not properly classified or associated:
1. **Table chunks** were incorrectly classified as `text` instead of `table`
2. **Image chunks** were missing image resource association and classified as `text`
2026-08-19 09:52:20 +08:00
Sevenzuo
f1e6b22c4b fix: honor minimum_should_match in GaussDB search (#18456)
### Summary

GaussDB DocEngine could return no chunks for conversational queries even
when relevant content was available. `Dealer.search()` supplies
`minimum_should_match` (30%, then 10% on retry), but the GaussDB adapter
discarded it and built a single `plainto_tsquery` from every token. This
effectively required all conversational filler terms to match.
2026-08-18 21:05:49 +08:00
Jack
ebd6be09c7 feat(title-chunker): configurable token-count cap with sentence-boundary re-split (#18455)
## Summary

The TitleChunker (both `hierarchy` and `group` methods) had no
token-size ceiling, so a long section without sub-headings became one
giant chunk. This adds a configurable `chunk_token_cap` that guarantees
every text chunk stays within a token budget.
2026-08-18 21:03:51 +08:00
Harsh Kashyap
b3d9e02d03 fix(model_meta): Base._get_api_key handles JSON-dict api_key for the model-list verify path (#18386) 2026-08-18 20:16:19 +08:00
Harsh Kashyap
5d164085f5 fix(model_meta): LocalAI._get_api_key handles JSON-dict api_key for the verify path (#18314)
## Summary

Closes #17757.
2026-08-18 20:15:18 +08:00
qinling0210
2aaa6baf0c fix(agentic-rag): raise max_parallel_agents for high/ultra to 4, use web search after locate fails repeatedly (#18430)
### Summary

1. It changes the fallback semantics of the locate phase. When no chunks
are found, the system stays in locate. If the same claim has two
consecutive locate rounds with neither evidence chunks nor newly routed
document scope, web_search is admitted to the candidate tool set on the
next locate round as an external fallback.

2. It makes locate_empty_streak claim-scoped instead of shared in the
global context. This prevents one claim’s empty locate rounds from
affecting sibling claims running in parallel.

3. On the config side, it only raises max_parallel_agents for high /
ultra to 4, without changing max_agent_cycles. This increases parallel
claim execution without deepening per-claim search.
2026-08-18 19:40:07 +08:00
Wang Qi
858f882d21 Fix task time is incorrect (#18453) 2026-08-18 19:29:25 +08:00
Lynn
eb4e1aa2a4 Fix: set enable_thinking to True for qwen3.8-2.4t-a95b (#18442) 2026-08-18 19:27:31 +08:00
ump45nose
15aad78518 fix: isolate extract html request headers (#18322) 2026-08-18 16:49:17 +08:00
Wang Qi
2a132d281d Fix parent chunk with extra newline (#18426) 2026-08-18 16:06:30 +08:00
Wang Qi
75f737de67 Refactor: make page number readable (#18409) 2026-08-18 13:27:04 +08:00
Lynn
344bd4d57a Fix: correct chunk order for non‑PDF documents (#18412) 2026-08-18 13:06:13 +08:00
Lynn
2368c54689 Fix: handle title and truncate document preview by sentence (#18407) 2026-08-18 11:54:55 +08:00
zws202606
d02723ca76 feat: Gaussdb adaptation (#17703) 2026-08-18 09:53:11 +08:00
Harsh Kashyap
4593d08821 fix(model_meta): Ollama._get_api_key handles JSON-dict api_key for the verify path (#18321) 2026-08-17 17:14:04 +08:00
qinling0210
f8a16ecef2 Fix _routed_docs leak across parallel claims in agentic research (#18348)
### Summary

Fix _routed_docs leak across parallel claims in agentic research
2026-08-17 12:28:55 +08:00
S
c6ba54bc72 fix: stop three recurring errors on doc delete (#17685) (#17686)
Follow-up to #17526 ("Refactor: merge dataset scope graph"), which introduced two code paths that touch Infinity columns the deployed schema does not declare. This PR makes the runtime robust against the old schema while also adding the new column to the new schema so freshly created tables are correct.
2026-08-16 09:25:51 +08:00
qinling0210
554fb1133a Search in navigation tree & store graph content in nav_doc (#18303)
### Summary

Search in navigation tree & store graph content in nav_doc during parse
2026-08-14 22:26:57 +08:00
buua436
024c35f085 fix: track wiki chunk changes incrementally (#18285) 2026-08-14 20:11:55 +08:00
Lynn
471070c2c8 Fix: return error when no valid speech text in intranscription response (#18277) 2026-08-14 16:27:34 +08:00
buua436
15a63bc15c fix: exclude disabled documents from wiki compilation (#18261) 2026-08-14 13:45:14 +08:00
Jack
423c8489b5 fix(chunker): carry overlap-head PDF positions into new chunk (#18148) (#18227)
When `TokenChunker` starts a fresh chunk with an overlap prefix (Go `computeOverlapPrefix` / Python visible-text cut), the previous chunk's **tail PDF coordinates were dropped**. As a result, the overlap head of a PDF chunk is displayed but **not highlighted** — the highlight box is shifted/truncated relative to the displayed span (infiniflow/ragflow#18148).
2026-08-13 22:18:33 +08:00
qinling0210
c5ff2bced5 Refine agentic RAG phase logging (#18228)
### Summary

Refine agentic RAG phase logging

example:
```
2026-08-13 17:25:06,733 INFO     2434554 [Agentic RAG] LLM usage by phase:                                                             phase            llm_calls prompt_tok   output_tok  total_tok    time(s)
  formalize              1        389          151        540        1.7
  route                  1        287          234        521        2.7
  planner                1      11857          832      12689        6.8
  orchestrator round 1       0          0            0          0      171.5
    claim_research (2)       8      82519        23146     105665      131.0
    sufficiency            2      10122         1709      11831       15.0
    grounded               1       5846         3232       9078       24.7
  finalize               2       9945         2228      12173       19.9
  total: 16 LLM calls, 152497 tokens
```
2026-08-13 20:15:24 +08:00
buua436
a4e819504c feat: support entity and topic wiki modes (#18216) 2026-08-13 19:03:24 +08:00
qinling0210
a6dcc0f665 Add dataset navigation search for agentic RAG (#18218)
### Summary

Add dataset navigation search for agentic RAG.

dataset_navigation_search() calls
dataset_api_service.search_dataset_layers with mode as "nav_doc"
2026-08-13 17:35:24 +08:00
Jack
913777d965 fix(book): preserve PDF coordinate tags in the naive merge branch (#18203)
This PR fixes **#18193** — the Python `rag/app/book.py` naive-branch `split("@")` bug that destroys PDF coordinate (`@@`) tags, so chunks lose their clickable page highlight.
2026-08-13 17:00:34 +08:00
Wang Qi
bedc395472 Fix invalid query string (e.g. ?) will error search (#18217) 2026-08-13 16:43:15 +08:00
Ziyang Guo
9dae986d75 fix(tests): isolate token chunker imports (#18018) 2026-08-13 15:43:11 +08:00
Wang Qi
7e536c7614 Fix agentic chat low/medium cannot answer the table content (#18196) 2026-08-13 14:40:31 +08:00
iridescentWen
a0cc2be2dc docs: document the tenant_id parameter in resume parsing (#18169)
Second ragflow PR (#17639 merged 2026-07-31). Docstrings only, no
behavior change.

---

🤖 Written with [Claude Code](https://claude.com/claude-code). Each site
was opened and read, and
each description was checked against the line that consumes the value.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 20:21:26 +08:00
buua436
649b631cac fix: improve incremental wiki compilation (#18164) 2026-08-12 19:12:39 +08:00
euvre
a530a3a170 fix: clean up wiki blueprint default instruction text (#17893) 2026-08-12 14:39:36 +08:00
Wang Qi
3e4a1fa887 Add doc_name for compilation generated chunk (#18126) 2026-08-12 09:37:25 +08:00
Charles
add00924e7 fix: replace editdistance with rapidfuzz for python 3.13 wheel support (#18132)
### Summary

Fixes #18107.

`editdistance==0.8.1` (the only recent release on PyPI) has no cp313
wheels for any platform. Since this project requires exactly Python
3.13, `uv`/`pip`/`poetry` fall back to building it from source (Cython),
which fails on Windows for anyone without a working C build toolchain —
that's the PEP 517 build error in the issue.

Swapped `editdistance` for `rapidfuzz`, which ships full cp313 wheels
(win32/win_amd64/win_arm64 included) and has no build-from-source step
on any of our target platforms. The only call site was
`EntityResolution.is_similarity` in `rag/graphrag/entity_resolution.py`,
using `editdistance.eval(a, b)` to get the unweighted Levenshtein
distance between two entity names.
`rapidfuzz.distance.Levenshtein.distance(a, b)` computes the same thing
(verified identical output on several string pairs) and is used as a
direct replacement.
2026-08-11 21:44:36 +08:00