Spaces:
Sleeping
Sleeping
Commit History
-
Update commitment to VC scripts
3626208
-
Update src/query_engine.py
Verified signature8a24416 -
Update src/query_engine.py
Verified signature3c652f6 -
Update src/query_engine.py
Verified signature68f264c -
Update src/query_engine.py
Verified signaturee3a278f
-
Local updates
585c3ec
-
Add committment to value chain analysis
c99694c
-
Update src/query_engine.py
Verified signaturef2228f6 -
Update src/query_engine.py
Verified signature1a596a8 -
Update src/query_engine.py
Verified signature88c940d -
Update src/query_engine.py
Verified signature35b8855
-
Update src/query_engine.py
Verified signaturea55ad28
-
fix: pre-release audit round 12 β 33 bugs fixed across all tiersβ
Tier 1 (ship-blockers): - README/verifier layer count corrected to 7-layer/10-point - SQL keyword regex now strips quoted strings before checking - validate_citations counts unique sources, extracts from body only - Provider-specific error messages for all 3 LLM backends - Missing config error handling in ingest.py entry point Tier 2 (quality): - SQL injection: alphanumeric validation on interpolated values - LIKE wildcard escaping with ESCAPE clause - Fallback builds fresh keyword query instead of re-running failed SQL - NaN/NaT/inf filtering across all tabular readers - Merged docx table cells deduplicated via element identity - .env double-escaping fix in setup wizard - Verification LLM exceptions skip correction instead of triggering it - References check handles SQL and web sources - Dead pre-loop validate_citations removed - KB meta extension detection uses Path.suffix - QU prompt omits SQL fields when no schema available - Redundant collection.count() eliminated - Row padding fβ¦fbd18c8
-
fix: Round 8 audit β 15 bugs fixed across 10 files (1 CRITICAL, 7 HIGH, 3 MEDIUM, 4 LOW)β
Security fixes: - CRITICAL: execute comment-stripped SQL query (not original) to prevent injection bypass - HIGH: iterative comment stripping to handle nested comment attacks - HIGH: expand dangerous SQL keyword blocklist from 11 to 23 entries - HIGH: data loss prevention β deferred clear only on first successful embed Robustness fixes: - HIGH: parse_verification_result(None) crash guard - HIGH: try/except on all verification loop generate() calls - HIGH: empty rows guard in Excel reader - MEDIUM: strict boolean normalization for verification pass/fail - MEDIUM: R-style "na" added to null string detection - MEDIUM: broad exception handling for Gemini API errors Minor fixes: - LOW: distinct error message for empty LLM response vs no sources - LOW: bounds check on setup wizard model selection - LOW: route/sql_query keys in CLI and web fallback dicts - LOW: SQL fallback extended to route="both" Cross-checked by 2 verification agents β all fixes confirmed correct. 165/165 tests passing,β¦9093d8f -
fix: 10 bugs (4 HIGH + 6 MEDIUM) from comprehensive codebase auditβ
HIGH fixes: - H1: Gemini blocked-response detection in verifier (safety filter short-circuit) - H2: Config load crash guard in app_web.py (st.stop instead of traceback) - H3: Brace-escape user text in kb_meta.py prompts (prevent KeyError) - H4: Web UI clarification state tracking (pending_clarification_question) MEDIUM fixes: - M1: Preserve leading zeros as TEXT in sql_ingest type inference - M2: Deferred clearing in ingest.py prevents data loss on total failure - M3: Strip markdown fences from LLM-generated SQL in sql_retriever - M4: max_iterations=0 guard in verifier (skip verification, do not refuse) - M5: Add clarification QA to conversation history for pronoun resolution - M6: Remove hardcoded knowledge_base/ prefix in retriever source paths Also adds CLAUDE.md, docs/plans/, full test suite (162 tests, 17 files), and updates WORKLOG.md with audit results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1330e5c -
fix: 6-agent debug audit β 8 bugs fixed across codebaseβ
Multi-agent systematic audit found and fixed: HIGH: - Empty model="" overrode provider defaults, causing API errors when no model configured (llm/__init__.py + all 3 providers) - Vector-to-SQL fallback was dead code β QU layer now preserves sql_query regardless of route, and prompt asks LLM to generate fallback sql_query - SQL validation strengthened with keyword blocklist (INSERT, DELETE, DROP, ALTER, CREATE, ATTACH, DETACH, PRAGMA, LOAD_EXTENSION) β first layer of two-layer SQL injection defense MEDIUM: - Verification prompt no longer leaks internal chunk ID naming (CHUNK-LOCAL, CHUNK-SQL) into correction loop β uses user-facing language instead - config_loader now gives friendly FileNotFoundError directing user to run setup.py, instead of raw traceback - config.yaml opened with explicit encoding="utf-8" for cross-platform safety - OpenAI model filter narrowed from startswith("o") to startswith("o1","o3","o4") 153 tests pass (152 existing + 1 new SQL validation test). β¦106354e -
fix: harden route parsing, column dedup, and column name accessβ
- Normalize QU route output (strip/lowercase) before validation - Fix column name deduplication to handle suffix collisions (e.g., 'Score_A', 'Score_A', 'Score_A_2' no longer produces duplicates) - Use defensive .get() for column name access in SQL result formatting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a8fd301
-
feat: add KB meta overview for meta-question answering and LLM awarenessβ
Generate an LLM-powered high-level summary of the knowledge base at ingestion time. The overview is stored as a ChromaDB chunk (enabling vector search for meta-questions like "what data do you have?") and injected into QU and system prompts (giving the LLM full KB awareness for routing and contextualized answers). New: src/kb_meta.py, tests/test_kb_meta.py (20 tests) Modified: ingest.py, prompts.py, query_engine.py, verifier.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8f35c1b -
feat: add SQL schema loading and route/sql_query parsing to query engineβ
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c65382c -
fix: harden codebase against format injection, empty responses, and unsafe config accessβ
- Add _escape_braces() to all prompt builders to prevent str.format() crash when user documents contain {placeholder} patterns - Fix app_web.py display_query fallback to preserve clarification context - Add empty-response guards to all 3 LLM providers (openai, anthropic, gemini) - Replace all remaining direct dict access with .get() + defaults - Add 2 regression tests for curly-brace format injection - Expand query engine tests with display_query coverage - 62 tests pass across 13 test files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9815e49 -
feat: add query understanding layer for better retrievalβ
Pre-retrieval LLM step that reformulates user queries into search-optimized forms (expanded keywords, resolved pronouns, domain-aware terms) and optionally asks clarification questions. - New src/query_engine.py with understand_query() + JSON parsing - New prompt template in src/prompts.py - CLI: query understanding + conversation history + clarification flow - Web UI: query understanding + pending_clarification state - Config: query_understanding.enabled/max_history/max_clarifications - 10 new tests (59 total, all passing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ebd834c