Commit Graph

203 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
465d79e6f5 Merge pull request #2066 into validated PR integration 2026-10-29 00:56:12 +08:00
Bingxi Zhao (Frank)
480eda2822 Merge pull request #2071 into validated PR integration 2026-10-29 00:56:11 +08:00
Bingxi Zhao (Frank)
7b307357dc Merge pull request #2103 into validated PR integration 2026-10-29 00:56:10 +08:00
Cursor Agent
b53ee768c9 style: put test signature on one line for ruff format
Co-authored-by: Nandana Dileep <nandanadileep@users.noreply.github.com>
2026-10-28 03:10:33 +00:00
nandanadileep
e27735d75c fix: Mastery Path concept objectives can never 2026-10-28 00:16:17 +00:00
Bingxi Zhao
47c15cefab Merge pull request #1998 from Hi-Kung/fix/rag-query-rewrite-fail-open
fix(rag): wrap maybe_rewrite in try/except for fail-open safety
2026-10-28 00:28:07 +08:00
Bingxi Zhao
619888b731 Merge pull request #2027 from evan188199-tech/codex/feat/rag-embedding-resume
fix(rag): resume embedding checkpoints (#1983)
2026-10-28 00:21:26 +08:00
Bingxi Zhao (Frank)
c158bd4505 fix: contain query rewrite failures at the rewrite service boundary 2026-10-27 21:47:34 +08:00
Bingxi Zhao (Frank)
0b6ff7abae fix: retain checkpoint index and recover interrupted snapshot swaps 2026-10-27 21:42:25 +08:00
Ray Tien
151458a6b3 fix(pageindex): drop the /v1 suffix from the Anthropic base URL
litellm appends /v1/messages itself, so the default Anthropic base URL
ending in /v1 made PageIndex OSS indexing 404 for any Anthropic API-key
model.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 23:34:53 +08:00
Ray Tien
014916a66a feat(pageindex): index with the Task model when one is configured
PageIndex OSS resolved its indexing model from the active chat LLM, so an
OAuth-only chat provider (Codex) blocked indexing entirely. Resolve it from
the Task model instead when one is set, and fall back to the chat LLM
otherwise, so existing setups behave the same.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 23:28:24 +08:00
Rudy Celekli
2f96d4ed52 fix(rag): strip only list markers from generated queries
_generate_queries cleaned each LLM-returned line with
line.strip().lstrip("0123456789.-) "). str.lstrip takes a character SET, not a
prefix, so besides the intended "1. "/"2) " list markers it also ate any
leading digits of the query itself: "2024 budget forecast" -> "budget
forecast", "5G network rollout" -> "G network rollout". The KB was then
searched for a materially different query whenever a variant began with a
number (years, 5G, 3D, versions). Strip a real leading list marker with a
regex instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-26 10:49:43 -04:00
cgycorey
f911036964 fix(rag): keep a failing caption group from aborting the ingest
_describe_group handled only asyncio.TimeoutError, so any other exception
out of the batcher propagated through asyncio.gather, aborted
_load_image_nodes, and took the whole document ingest with it. Every
sibling failure path in the same function skips and logs instead: missing
or non-multimodal embedding client, unavailable LLM, reader OSError, empty
captions. The batch group was the one seam that re-raised.

The current batcher folds its own errors into [None] * len(images), so
this is defensive: the loader should not have to depend on that internal
detail to keep captions best-effort, and the batch path is opt-in and the
least exercised.

The new test replaces the batcher with one that raises and asserts the
ingest still returns.

Signed-off-by: cgycorey <cgycorey@users.noreply.github.com>
2026-10-23 22:04:31 +01:00
XZH
f657d343ee fix(rag): resume embedding checkpoints 2026-10-22 14:49:26 -07:00
Bingxi Zhao (Frank)
0aa12fdfb6 fix(mastery): explain failed source repair in the session language (#1902) 2026-10-19 03:44:57 +08:00
Bingxi Zhao (Frank)
c49d130d5c fix(mastery): stream localized lesson preparation progress (#1902) 2026-10-19 03:29:21 +08:00
Bingxi Zhao (Frank)
e98e3d7558 fix(rag): isolate unreadable PDF evidence during KB indexing (#1982) 2026-10-19 03:29:21 +08:00
Bingxi Zhao (Frank)
148bb1ec26 fix(mastery): refresh lesson intent and preserve source diagnostics (#1902) 2026-10-19 02:57:26 +08:00
Bingxi Zhao (Frank)
35cea56187 fix(parsing): isolate native MinerU failures during KB indexing (#1982) 2026-10-19 02:10:06 +08:00
Bingxi Zhao (Frank)
c3b98baf34 fix(parsing): align MinerU deadlines and retain terminal errors (#1982) 2026-10-19 01:52:28 +08:00
Bingxi Zhao (Frank)
784de5fa6d fix: align integrated mastery catalog and regression fixtures 2026-10-19 01:17:50 +08:00
Bingxi Zhao (Frank)
9aae961412 Merge PR #1957: separate private source evidence from explicit public presentation 2026-10-19 00:53:44 +08:00
Bingxi Zhao (Frank)
3196b6d792 Merge PR #1954: prepare source evidence through a generic capability prerequisite contract 2026-10-19 00:48:43 +08:00
Bingxi Zhao (Frank)
0fd8dc8384 Merge PR #1953: source-bound assessment with portable lexical page lookup 2026-10-19 00:43:33 +08:00
Bingxi Zhao (Frank)
0d6eb0a5fe fix(rag): preserve runtime settings when enabling query rewrite 2026-10-19 00:32:12 +08:00
Bingxi Zhao
9036bce614 Merge pull request #1917 from Hi-Kung/feature/rag-query-rewrite
feat(rag): add pluggable query rewrite layer for retrieval quality
2026-10-19 00:32:04 +08:00
Kung
eb67f53b49 test(rag): cover eval-diff, rewrite provenance and the kb eval-diff CLI
diff_reports: metric directions, case alignment (added/removed/non-comparable), object-vs-dict equivalence, k mismatch, CLI rendering. Runner: three-state rewrite forwarding and query_rewrite provenance carry-through. CLI: eval-diff happy path, json, regression exit code, and load-error handling.
2026-10-18 18:17:34 +08:00
yepyhun
b8fccb92b2 fix(mastery): validate visual hints and select original source excerpts 2026-10-13 17:24:37 +02:00
yepyhun
755686264d fix(mastery): separate source inspection from assessment delivery 2026-10-13 13:49:35 +02:00
yepyhun
3175b812e2 fix(mastery): make source delivery demand-driven and preserve partial teaching 2026-10-13 12:33:44 +02:00
yepyhun
3e383c80f4 docs: record source-bound assessment verification and port boundaries 2026-10-13 12:21:31 +02:00
yepyhun
ccac56eec1 fix(mastery): bind semantic assessment to verified question evidence 2026-10-13 12:21:04 +02:00
Kung
a14c1a5126 test: cover query rewrite layer and RAGService integration 2026-10-11 09:27:37 +08:00
dajiaohuang
fac64751b6 Merge commit '6cf793bd868ba5ecbe64722936d4be8fab5a01df' into fix/evaluation-search-errors 2026-10-08 12:35:40 +08:00
dajiaohuang
591473725e fix(rag): report failed retrievals in evaluations 2026-10-08 12:35:40 +08:00
Bingxi Zhao (Frank)
e79e1b0ad2 fix(knowledge): make long-document indexing recoverable and publication verified (#1612) 2026-10-08 08:10:40 +08:00
Bingxi Zhao (Frank)
de64a9aa0f feat(rag): complete exact source visual and PDF page grounding (#1610)
Expose inspectable extraction coverage, retain structured provenance, resolve bilingual figure and table references without similarity substitution, and provide bounded local page/region fallback with source identity checks.
2026-10-08 03:44:56 +08:00
Bingxi Zhao (Frank)
bac2c39875 fix(ima): distinguish retrieval failures and expose incomplete source evidence (#1500) 2026-10-08 00:27:29 +08:00
Bingxi Zhao (Frank)
2ccd8a75fb fix(mastery): deliver retrieved source images through the active agent loop (#1611) 2026-10-07 23:17:15 +08:00
Bingxi Zhao (Frank)
b0521ac3fa fix(rag): remove corpus manifest ceiling and publish figures before indexing (#1802) 2026-10-07 23:11:16 +08:00
Bingxi Zhao (Frank)
e49f518669 Reconcile user setup and provider changes with all reviewed PRs 2026-10-07 20:54:24 +08:00
Felix
4b6cddbe49 feat: add Opper as an LLM and embedding provider (#1786)
Opper (https://opper.ai) is an EU-hosted AI gateway: 700+ models from
50+ providers behind one OpenAI-compatible API and one key. This adds it
as a named provider. The LLM entry follows the Requesty one (#1631). The
embedding entry follows the OpenRouter one, with a default model and
dimension like the OpenAI entry.

- provider_registry.py: gateway ProviderSpec after FutureInfra. Env
  OPPER_API_KEY, base URL https://api.opper.ai/v3/compat. Base URL
  detection keys on the api.opper.ai host rather than a bare "opper"
  substring, so unrelated URLs that happen to contain it are not claimed.
- Embeddings: Opper serves OpenAI-compatible /embeddings under the same
  base URL. Registered in embedding_endpoint.py (label, default endpoint,
  /embeddings path rule), provider_runtime.py (default
  text-embedding-3-large, 3072 dims) and the GraphRAG OpenAI-compatible
  binding set.
- Tests: registry lookup and base detection, runtime resolution for the
  opper binding and for an openai binding pointed at Opper, the Settings
  LLM choice, native tool calling, the embedding runtime and the GraphRAG
  api_base translation.

Like the other recent gateway additions, it stays out of the curated
init menus, the README and the capability table. Opper model ids are
bare names (claude-sonnet-4-6, gpt-5.4-mini, text-embedding-3-large), so
the existing model-level rules for claude-, gpt-5 and gemini apply as
they are, and the text-embedding-3 rule sends dimensions=3072.

Checked: python -m py_compile on the ten changed files, git diff --check.
Not run locally: pytest, ruff and pre-commit.

Disclosure: I work at Opper.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-10-07 20:50:37 +08:00
ZQR1101
0b5b254b50 fix(rag): surface the hybrid to vector-only retrieval degradation (#1792) (#1801)
Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
2026-10-07 20:49:06 +08:00
Bingxi Zhao (Frank)
fb2065b6a9 Preserve current provider configuration and settings scroll work 2026-10-07 20:38:11 +08:00
Bingxi Zhao (Frank)
307f68c86f test(rag): exercise current image client and portable read failures 2026-10-07 20:27:15 +08:00
evan188199-tech
cc373762e4 fix(rag): log swallowed embedding/image progress and LightRAG meta failures (#1703)
* fix(embedding): log progress callback failures instead of swallowing them

embed/embed_contents wrapped progress_callback in 'except Exception: pass'.
A failing progress sink vanished without a trace while indexing continued,
making KB index progress untrustworthy (stalled reads with no diagnostics).

Keep the callback best-effort (embedding runs must not fail on UI feedback)
but log a warning with batch context and the underlying exception.

* fix: log image progress callback failures instead of swallowing them

_describe_one wrapped image_progress_callback in 'except Exception: pass',
so a broken progress sink silently dropped indexing progress updates with
no trace. Log a warning with completed/total context and keep the batch
running; add a focused test covering visible failure logging and
uninterrupted loading.

* fix(lightrag): warn when workspace meta.json exists but is unusable

workspace_for() swallowed OSError/ValueError when reading meta.json and
silently fell back to the path-hash workspace name, which can open an
empty store with no log trail. Missing files stay silent; unreadable or
corrupt meta now logs a warning with the path and exception type while
keeping the same fallback behavior.

* test(codebuddy): make credential fixture expiry relative to now

test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.

Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.

---------

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:23:17 +08:00
evan188199-tech
18619e6fc6 fix(rag): classify invalid persisted index errors and include re-index steps (#1702)
* fix(rag): classify invalid persisted index errors and include re-index steps

Searching a knowledge base whose persisted vector store contains invalid
vectors (issue #440) was misclassified: the ValueError raised at index
load wraps a provider-facing "Details: ..." tail, so search_error_result
matched the embedding-provider branch first and returned
invalid_embedding_provider_response without needs_reindex, blaming the
provider instead of the damaged index.

Check the persisted-index diagnosis first, include the recorded failure
reason (which store file, which vector) in the user-facing answer, and
spell out recovery: run the knowledge base's 'Re-index' action; re-uploading
documents reuses the damaged store and cannot repair it.

* test(codebuddy): make credential fixture expiry relative to now

test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.

Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.

---------

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:22:18 +08:00
Bingxi Zhao (Frank)
fe003ddce5 fix(rag): retain textbook figures beyond the model image budget (#1610) 2026-10-04 18:39:02 +08:00
Bingxi Zhao (Frank)
8133668d34 test(rag): isolate image captions from persistent workspace caches 2026-10-04 16:12:24 +08:00
Bingxi Zhao (Frank)
dcb157886d fix(rag-eval): discount duplicate gold and keep JSON output parseable 2026-10-04 15:04:24 +08:00