Commit Graph

321 Commits

Author SHA1 Message Date
天海蒼灆
e9cace9a09 fix: preserve non-string values in update_metadata_to (#17346)
## Summary
- Broaden `update_metadata_to` to keep `bool` / `int` / `float` / `None`
and structured values (e.g. PDF `outline` list[dict]) while retaining
string / list[str] merge+dedupe for LLM metadata.
- Fixes document system fields (`_isCurrent`, `_version`,
`_processStatus`) being dropped when parse persists PDF outline via full
`meta_fields` replace.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 17:53:27 +08:00
Sevenzuo
aa49146a63 fix: preserve empty chat fields on GaussDB (#18445) 2026-08-21 16:45:10 +08:00
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
Jiang, Guomin
09af859357 fix(metadata): batch large document ID filters (#17394)
## Summary

- batch `DocMetadataService._search_metadata()` requests whose
`condition["id"]` list exceeds 10,000 IDs
- combine the per-batch results so metadata reads, summaries, and batch
updates avoid a single oversized Elasticsearch `terms` query
- add regression coverage for 20,001 IDs, verifying three bounded
backend searches and complete metadata results

Fixes #17393
2026-08-21 15:21:45 +08:00
Elias Shieh
f44436a549 perf(retrieval): push metadata filters down to the metadata index (#18219)
## Summary

- route REST retrieval metadata conditions through the existing
metadata-index push-down service
- keep full metadata loading lazy and preserve the Python in-memory
filter as an exact fallback
- add focused coverage for successful and empty push-down results and
multi-valued fallback semantics
2026-08-21 14:36:50 +08:00
Lynn
b8b35aa9ab Fix: kimi k3 temperature (#18564) 2026-08-21 10:11:06 +08:00
Loong
c15241c3a9 fix(agent): reset execution path for new sessions (#18532) 2026-08-20 22:42:55 +08:00
rsnetworkinginc
0067470903 fix: apply order_by return value in deep-pagination helpers (unordered OFFSET/LIMIT can skip/dupe rows) (#17325)
### Summary

The fix is one line per helper — assign the `order_by(...)` result back
so the
ordering is actually applied to the query.

Co-authored-by: rsnetworkinginc <rsnetworkinginc@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-20 19:39:02 +08:00
Wang Qi
76bff4c915 Fix: switch image/ppt/email/audio from General to pipeline, or switch back, it report error (#18555) 2026-08-20 17:34:51 +08:00
Sevenzuo
1f0285ee9b fix: preserve blocking GaussDB advisory locks (#18506) 2026-08-20 16:39:43 +08:00
Christian Uhl
f806001b3f fix(db): make negative GET_LOCK timeouts work on MariaDB (#18529)
### Summary

The fix turns a negative timeout into a finite 60 second wait inside
`MysqlDatabaseLock`, which both servers accept. Callers keep expressing
"block until available", and the equivalent PostgreSQL and GaussDB work
on the same `-1` semantics (#16346, #18506) is untouched. Non-negative
timeouts keep their current behaviour.

---------

Co-authored-by: Krim <git@krim.dev>
2026-08-20 16:33:46 +08:00
primorLee
3838c626aa fix(memory): make default prompts deterministic (#18547)
### Summary

Multi-type memory prompts were assembled from sets, so their instruction
and output sections could change order across Python processes with
different hash seeds. Because the generated default prompt is persisted
and later compared as a string, a restart could make an untouched
default look custom and prevent it from being regenerated when memory
types change.
2026-08-20 16:19:27 +08:00
Wangshu
77884f4a7c test: pin bare tenant_model.id resolution in resolve_model_config (#18528)
## Summary
- Adds a regression test for #18398

Fixes #18398

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-20 16:17:30 +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
Loong
a6b5e985c4 fix(memory): require semantic valid_at timestamp (#18462)
## Summary

- require a `valid_at` timestamp in the semantic-memory output schema
- tell the extraction model to use conversation time when a fact has no
date of its own
- add a regression test for the assembled semantic prompt

This addresses the deterministic prompt inconsistency reported in
#18415. The invalid-timestamp fallback is intentionally left unchanged
because selecting its replacement policy requires a separate design
decision.
2026-08-19 18:32:27 +08:00
Loong
1e147e0c0b fix(memory): normalize invalid extraction timestamps (#18463)
## Summary

- allow ISO 8601 normalization callers to provide an explicit fallback
while preserving the existing default behavior
- use the extraction conversation time when `valid_at` is missing or
invalid
- clear an invalid optional `invalid_at` instead of writing an
unparseable value
- include the rejected timestamp value in the error log

This addresses the timestamp write-through portion of #18415. It is
intentionally separate from #18462, which fixes the semantic output
prompt.

Co-authored-by: Loong <184861530+yzl0ng@users.noreply.github.com>
2026-08-19 18:31:51 +08:00
Loong
bf9f06c566 fix(memory): honor custom extraction prompts (#18461)
### Summary

- Forward each memory's stored system_prompt and user_prompt to
extract_by_llm.
- Cover both immediate save and queued extraction paths with focused
regression tests.
- Preserve the existing default-prompt fallback when stored prompts are
empty.

Fixes #18413.
2026-08-19 18:28:36 +08:00
Sevenzuo
dd1f335ba2 fix: preserve extensionless document suffix on GaussDB (#18483)
### Summary

RAGFlow's "Create empty document" flow accepts names without a file
extension. The `POST /datasets/<dataset_id>/documents?type=empty` route
calls `_upload_empty_document()`, where `Path(name).suffix.lstrip(".")`
returns `""`.

In GaussDB's A/ORA compatibility mode, that empty string is persisted as
SQL `NULL`. Because `document.suffix` was defined as `NOT NULL`, the
insert failed with a constraint violation.
2026-08-19 18:26:14 +08:00
Ali Farhan
ece9638f94 fix(api): report why provider model discovery failed instead of swallowing it (#18027)
### Summary

Providers whose static catalogue is empty discover their models by
calling the base URL the user typed. `verify_api_key` wrapped that call
in a bare `except Exception: pass` and then returned a flat `No models
found for provider 'X'`, so an unreachable host, a closed port, a wrong
scheme and a bad TLS setup all produced the same sentence, with the
actual error discarded and not even logged.
2026-08-19 18:24:10 +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
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
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
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
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
Muhammad Furqan
c3153ba294 fix(agent/tools): port DeepL to ToolBase so it works as an Agent tool (#18395)
### Summary

Closes #18394.
2026-08-18 15:36:11 +08:00
zws202606
d02723ca76 feat: Gaussdb adaptation (#17703) 2026-08-18 09:53:11 +08:00
Ilya Bogin
9c81d9be8b fix(agent/tools): read Keenable result content from snippet (#18341)
### Summary

Follow-up bug fix to #16233 (the Keenable search tool, merged
2026-06-25).
2026-08-17 20:25:24 +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
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
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
euvre
0d198fccec Fix DateTimeTzField crashing on driver-native datetimes and unparseable values (#18264) 2026-08-14 15:56:05 +08:00
buua436
15a63bc15c fix: exclude disabled documents from wiki compilation (#18261) 2026-08-14 13:45:14 +08:00
buua436
c10371d945 fix: refine structure graph keyword search (#18181) 2026-08-13 17:49:20 +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
Ziyang Guo
9dae986d75 fix(tests): isolate token chunker imports (#18018) 2026-08-13 15:43:11 +08:00
Elias Shieh
9784814a9b fix(mineru): honor dataset language in figure prompts (#18188)
### Summary

Closes #17885.

MinerU figure enrichment now passes the resolved dataset language to
`vision_llm_figure_describe_prompt`. Missing and empty language values
use `English`, matching the other figure-description paths.

This change is limited to MinerU. PR #18021 already fixed the Mistral
path.
2026-08-13 15:39:39 +08:00
wenqian
c589a5d050 feat: add UCloud agent sandbox provider (#18088) 2026-08-13 15:33:03 +08:00
euvre
b1de7e8136 Fix: allow datasets sharing a base embedding model to be searched together (#18166) 2026-08-13 09:51:44 +08:00
EthanZhang
1d8b9c7452 feat(agent): add Querit Contents tool (#18156)
### Summary

Add Querit Contents as a built-in page content tool for RAGFlow Agents
and Canvas workflows.

Querit Contents crawls one or more known URLs and returns their page
content and optional metadata. It complements the existing Querit Search
tool: Search discovers relevant pages, while Contents retrieves pages
already selected by an Agent or workflow.

This integration supports two usage modes:

- A standalone `QueritContents` node in Canvas workflows.
- An embedded content tool available to RAGFlow Agents.
2026-08-12 21:03:21 +08:00