Skip to content

feat(markhand): add retrieval-backed QA pipeline - #428

Merged
anhnth24 merged 5 commits into
masterfrom
feat/markhand-qa-retrieval-pipeline
Aug 31, 2026
Merged

feat(markhand): add retrieval-backed QA pipeline#428
anhnth24 merged 5 commits into
masterfrom
feat/markhand-qa-retrieval-pipeline

Conversation

@anhnth24

Copy link
Copy Markdown
Owner

Summary

  • add retrieval-grounded, citation-aware QA streaming with token limits and safer answer handling
  • add chunk-search normalization, migration 0037, converter subprocess support, and pipeline documentation
  • refine Markhand web QA chat, citations, session history, responsive UI, and supporting evaluation artifacts

Validation

  • cargo fmt --all -- --check
  • cargo metadata --locked --format-version 1 --no-deps
  • python scripts/check-dependency-policy.py
  • pnpm --dir web test — runner did not progress beyond initialization in this environment
  • pnpm --dir web lint — did not complete while numerous pre-existing Node processes were running

Closes #412

AnhNTH29 and others added 5 commits August 24, 2026 09:28
…e_tokens_tsv

Manifest checksum was stale relative to the committed migration file,
failing check-migration-manifest.py in CI (changes-and-static).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114aMJ8TFwQ5H1zLtcPjbGX
ESLint's react-hooks/refs rule flagged the direct ref mutation during
render as unsafe. Moving it into an effect keyed on activeSessionId
preserves the same behavior (ref reflects latest value for the async
recordTurn chain) without violating the render-purity rule.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114aMJ8TFwQ5H1zLtcPjbGX
Two independent CI failures on this branch:

1. clippy (-D warnings) rejected two manual char comparisons in
   crates/knowledge/src/ask.rs; use a char array pattern instead.

2. Migration 0037 aborted with SQLSTATE 42501 because
   `SET LOCAL row_security = off` does not bypass RLS. Postgres defines
   that setting as 'raise an error instead of silently filtering', so on a
   FORCE ROW LEVEL SECURITY table it guarantees the failure it was meant to
   avoid. Follow Postgres' own hint: the table owner drops FORCE for the
   duration of the backfill and restores it in the same transaction.

Verified against a local PostgreSQL 16: the old statement reproduces the
exact CI error, the new one applies cleanly and updates all rows; after it
runs relrowsecurity/relforcerowsecurity are both still true, a non-owner
role remains org-isolated (0 rows unscoped, 1 row scoped), and an aborted
transaction leaves FORCE intact. The resulting tsv carries both foldings,
so '1502' now matches while '27/08/2026' still does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114aMJ8TFwQ5H1zLtcPjbGX
@anhnth24
anhnth24 merged commit bc16472 into master Aug 31, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[inter-v2-05] Grounded Q&A với Qwen chat

2 participants