Commit Graph

8162 Commits

Author SHA1 Message Date
Yingfeng
f1641228e2 Refine agentic search & orchestration loop (#18057)
## Summary

This PR improves the RAGFlow agentic-search path in three areas: it
stops the outer agent from re-looping over the same rag call, lets the
medium thinking mode discover and follow new sub-claims mid-loop, and
strengthens retrieval by having the LLM emit synonym-rich queries with
time/date/number terms boosted.

1. Avoid the outer re-loop — keep all multi-hop cycles inside agentic
RAG

2. Dynamic claims in medium mode — keep querying newly discovered
sub-questions
medium now enables allows_dynamic_claims. During orchestration, when
claim analysis discovers a new required sub-question
(discovered_claims), the loop spawns it as a new ClaimTarget and
continues searching it in subsequent cycles (bounded by the
dynamic-claim budget) instead of stopping. Also added:

3. Stronger query strategy — synonym-rich queries + time/date/number
weighting

LLM-generated synonyms: the claim-analysis prompt now instructs the
model to write each next_queries entry as a retrieval-boosted query that
actively folds in entity aliases, DATE/TIME synonyms (e.g. 1994 → 1994,
66th Academy Awards), and number/unit variants (e.g. 1.95 m → 6 ft 5
in).

Time/date/number boosting: query.py boosts numeric/date tokens to a high
weight (_NUM_DATE_TOKEN_RE).
2026-08-11 13:40:11 +08:00
chanx
f930b1c1bc Fix: New sessions will automatically carry over messages from the previous session by default. (#18078) 2026-08-11 13:38:46 +08:00
chanx
e0d199ea7b fix(floating-selection-toolbar): adjust dropdown direction based on available space (#18053) 2026-08-11 13:31:42 +08:00
chanx
11c9649a6c Fixed: Updated the text color style of the copy button. (#18062) 2026-08-11 13:30:57 +08:00
Wang Qi
bd876c796e Fix: restrict xxx_ids to limit 100 (#18074) 2026-08-11 13:28:52 +08:00
Wang Qi
d7d6bb5b6a Fix max chunk_ids = 100 (#18080) 2026-08-11 13:13:08 +08:00
Jin Hai
fc44d2fe3f Go: fix context (#18076)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
dev-20260811-2
2026-08-11 11:54:57 +08:00
jay77721
9f0663d4d0 fix(ingestion): avoid duplicate chunk text injection in Extractor prompts (#18034) 2026-08-11 11:53:34 +08:00
chanx
d199f4b867 fix(search): pass selected pageSize when retrieving chunks on document change (#18072) 2026-08-11 11:45:21 +08:00
chanx
cad2833c16 fix: Remove unused constant files (#18069)
### Summary

fix: Remove unused constant files
2026-08-11 11:16:06 +08:00
Jin Hai
cb3de6ae98 TS: add apache license (#18064)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-11 11:15:45 +08:00
Jin Hai
8379836179 Go: add context to test (#18070)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-11 11:12:34 +08:00
Jack
d6f6b6231f Fix(parser): don't collapse markdown doc into one item when a table is present (#18014) 2026-08-11 10:21:42 +08:00
Jack
dc73163908 Fix(tokenizer): pin alignment guards (#18011) 2026-08-11 10:09:07 +08:00
Jin Hai
e551167697 TS: fix comments (#18067)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-11 10:00:54 +08:00
Lynn
15ab2b3ee2 Fix: update tree when delete skill node (#18063) 2026-08-11 09:49:22 +08:00
Jin Hai
38c5d7c338 Go: fix context (#18061)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
dev-20260811
2026-08-10 20:49:32 +08:00
Wang Qi
a0438517bc Fix add agent update validation check (#18056) 2026-08-10 20:12:51 +08:00
Lynn
7ac59d1a36 Fix: set column type priority (#18054) 2026-08-10 20:08:06 +08:00
Wang Qi
b978f94fa6 Fix: restrict max_retries as non-negative integer (#18051) 2026-08-10 20:02:24 +08:00
Wang Qi
df32ffbe57 Fix: restrict keywords_similarity_weight [0,1] (#18044) 2026-08-10 20:01:45 +08:00
Jin Hai
dbd062f65e Go: fix context (#18060)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 19:11:43 +08:00
Jin Hai
cb649e8d56 Go: fix warning (#18058)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 18:50:37 +08:00
Ziyang Guo
eb184c839c chore(wiki): remove stray debug print (#18020)
### Summary

Remove a stray `print()` from the Wiki source-context fallback.
2026-08-10 18:22:44 +08:00
Jin Hai
c697fcff41 Go: fix go context (#18052)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 18:04:17 +08:00
maoyifeng
6f9d158e30 CI: Optimize per-install tools (#18039)
1.  ss already installed in runner, quit the install step
2. tiktoken is already installed in runner,  skip the install step
2026-08-10 17:55:57 +08:00
buua436
6f50e478e0 fix: exclude disabled documents from dataset structures (#18041) 2026-08-10 17:50:34 +08:00
chanx
23369586c0 fix(chat): preserve in-flight SSE stream when switching conversations (#18037) 2026-08-10 17:29:24 +08:00
chanx
6b73341827 fix(search-page): add overflow-x-auto and min-width to prevent layout issues (#18050) 2026-08-10 17:28:05 +08:00
chanx
d69d75fffb fix(token-chunker-form): set minimum value for chunk token size slider (#18047) 2026-08-10 17:27:51 +08:00
chanx
e9123ea764 fix: prevent empty-model warning modal from staying open after OK (#18046) 2026-08-10 17:27:31 +08:00
chanx
5a2cd36b45 fix(share): The language of the shared page will cause the language of the original website to change. (#18043) 2026-08-10 17:26:18 +08:00
dependabot[bot]
d6292da508 chore(deps): bump pypdf from 6.14.2 to 6.15.0 (#18048)
Bumps [pypdf](https://github.com/py-pdf/pypdf) from 6.14.2 to 6.15.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 17:22:57 +08:00
jay77721
ca9e62ee59 fix(ingestion): split Extractor call() into callRaw/callText/callStructured (#18038) 2026-08-10 17:18:24 +08:00
Jack
3a2a5f87dc chore: remove PARSER_ALIGNMENT_HANDOFF.md (#18045)
This handoff doc was accidentally introduced by PR #18005 and should not
be part of the repository. Remove it to keep the tree clean.

Co-authored-by: xugangqiang <xugangqiang@users.noreply.github.com>
2026-08-10 16:36:28 +08:00
黑墨水鱼
4eaad55efe fix: align LocalAI vision constructor arguments (#16920)
## What problem does this PR solve?

`TenantLLMService.model_instance` constructs vision providers with
`lang` as the third positional argument and `base_url` as a keyword
argument.

`LocalAICV` declared `base_url` as its third parameter, causing:

```text
TypeError: LocalAICV.__init__() got multiple values for argument 'base_url'
```

This prevents LocalAI vision models from being used during document
parsing.

Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 15:59:06 +08:00
zjm11902
a690078a24 test: extend /dify/retrieval unit test coverage (#17957)
## Summary
- Extends unit test coverage for
pi/apps/restful_apis/dify_retrieval_api.py (the Dify external knowledge
base endpoint).

Co-authored-by: zjm11902 <zjm11902@users.noreply.github.com>
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 15:30:52 +08:00
魏家家
6f590a7fcd Update logic-hooks.ts (#15194)
Empty reply configured in knowledge base chat, no content returned when
matched empty content

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 15:08:30 +08:00
wangyunlai
73d006fa0e Add OceanBase and SeekDB Go document engine (#17780)
## What changed

- add an OceanBase/SeekDB Go document engine using `database/sql` and
the existing MySQL driver
- preserve the Python connector's configuration, physical table names,
schema, index names, and ARRAY/JSON/VECTOR encodings
- implement chunk, memory, document metadata, skill, SQL, full-text,
vector, and fusion search paths
- support `DBMS_HYBRID_SEARCH.SEARCH` behind the existing feature flag,
with SQL fallback only when the package is unavailable
- wire the engine into retrieval, memory, metadata, vector hydration,
and SQL chat flows
- add Python/Go compatibility contracts, SQL mock tests, and an
integration-tagged round-trip test

---------

Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 15:06:32 +08:00
Jin Hai
c0bc146fcb Go: fix env variables (#18032)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 14:37:05 +08:00
buua436
c0582b8e18 fix: handle disabled documents in dataset structures (#18033) 2026-08-10 13:52:49 +08:00
chanx
2584ea5f0f fix(dataset): shrink table height when bulk operate bar is visible (#18031) 2026-08-10 13:26:56 +08:00
Wang Qi
373050c7ca Fix agentic chat not working in chatbot (#18035) 2026-08-10 13:07:15 +08:00
Yingfeng
b5bffa0fa3 Refine sufficient check using LLM draft (#18028) 2026-08-10 11:44:47 +08:00
Charles
42373a8229 fix(api): map internal RetCode values to valid HTTP statuses in build_error_result (#18009)
### Summary

Fixes #17980.
2026-08-10 11:30:11 +08:00
Wang Qi
3d41ebdded Fix naive ask report error (#18030) 2026-08-10 11:21:23 +08:00
Lynn
4a2bae715c Fix: add zhipu new model (#18029) 2026-08-10 10:58:52 +08:00
Lynn
7433fbb77b Fix: exclude unauthorized memory/dataset from list results (#18006) 2026-08-10 10:16:56 +08:00
S
99110c2df0 chore(rag/app): remove stray debug print() calls (#17943)
chore(rag/app): remove stray debug print() calls

Two hot-path debug print() calls were leaking content/error text to
stdout in production code paths.

* rag/app/naive.py: TxtParser branch in chunk() was printing the entire
  parsed sections list (formatted via repr()) wrapped in 150-char banner
  lines. For large text documents (e.g. a 1000+-page book ingest) this
  dumped tens of thousands of lines per ingest into the docker logs.
  Replaced with a structured
  `logging.info("TxtParser produced %d sections for %s", len(sections),
  filename)` so the parse count is still observable without the content
  leak.

* rag/app/presentation.py: Pdf.position parsing had a debug
  `print(f"Error parsing position: {e}")` inside an except clause in the
  ingest hot path. Replaced with
  `logging.warning(f"Error parsing position in {filename}: {e}")` to
  match the file's existing logging pattern and add filename context.

Both call sites already had logging imported; no new imports added.
logging was used throughout the surrounding code in the same
logging.{info,warning,error}(...) style.
dev-20260810
2026-08-08 15:53:16 +08:00
deadtrickster
2d63ad654d fix(ingestion): make document/KB counter application idempotent per run (#17995) 2026-08-07 23:33:18 +08:00