Spaces:
Sleeping
Sleeping
Commit History
-
Add hybrid retrieval (TF-IDF + embeddings), OCR, A/B eval, and answer trust/UX
Aissugur Kurganbekov +1: Claude Opus 4.8Smarter retrieval: - Hybrid dense+lexical retrieval: fuse TF-IDF with fastembed vectors via Reciprocal Rank Fusion (retrieval.hybrid_rank), wired into answering. The abstention gate still runs on TF-IDF so grounding stays conservative. Graceful fallback to pure TF-IDF when fastembed/the model is unavailable. - Store chunk vectors on Chunk.embedding (new column); idempotent ensure_schema() migration adds it to existing SQLite DBs on startup. - OCR fallback for scanned/image PDFs (PyMuPDF + pytesseract), graceful when the Tesseract binary is absent; tesseract-ocr added to the Docker image. - A/B eval harness (app.ab_eval / eval_cli --ab) comparing TF-IDF vs hybrid. Answer trust / UX: - answer_question now returns answer metadata (confidence, question_type, top_score, term coverage, chunk counts, latency); AskResponse.metadata and Citation.match_text added. - Frontend: confidence meter, exact source-span highlighting, and a printable one-page evidence report. Verified: 4…f65a6b3
-
Add user accounts: registration, login (JWT + bcrypt), per-user documents
Aissugur Kurganbekov +1: Claude Opus 4.8Backend: - User model + nullable owner_id on Document (NULL = shared demo/eval docs). - security.py (bcrypt via passlib, PyJWT HS256) and auth.py (/auth/register, /auth/login, /auth/me + get_current_user). Generic 401 with a dummy-hash compare on miss (no user enumeration), 409 on duplicate, EmailStr validation. - /documents*, /ask, /history now require a Bearer token and are scoped to the user's own docs + shared demo docs; cross-user access returns 404 (never leaking ids). /health, /evaluate, /demo/seed stay public. AUTH_SECRET_KEY is env-driven (prod hard-fail, dev default + warning). - conftest authed-by-default so the 12 existing API tests are unchanged; new test_auth.py (register/login/me/protected/per-user isolation). 38 tests pass, live end-to-end verified. Frontend: - Split-layout AuthScreen (sign in / sign up toggle, validation, show/hide password, "Continue with the demo" guest path) in the light theme. - api.js routes every request through a Bearer wrapper …165a274
-
Redesign landing into a cinematic "Proof Engine" experience
Aissugur Kurganbekov +1: Claude Opus 4.8 (1M context)Bold visual overhaul (concept chosen via a 3-agent design judge-panel using the ui-ux-pro-max skill): - Animated gradient-mesh + hairline-grid background (fixed, GPU-cheap) - Cinematic hero stage with a self-running "Verified Answer" product mock: typewriter answer, highlight sweep on the cited figure, SVG citation connector, and an abstain card peeking behind (new HeroPreview.jsx) - Sticky blurred top bar on scroll; rotating conic accent ring on the brand mark - New sections: how-it-works flow, count-up stats band, bento feature grid, "we grade ourselves" evaluation teaser, big final CTA, real footer - IntersectionObserver scroll-reveal (new useScrollReveal hook), Space Grotesk display headlines, gradient-clip hero text - All plain CSS + React, zero new deps; full prefers-reduced-motion fallbacks; Try Demo / upload / ask / evaluation chart untouched Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>2695640 -
UI/UX pass: accessibility, motion, design tokens, and an eval results chart
Aissugur Kurganbekov +1: Claude Opus 4.8 (1M context)Applied a 6-dimension audit (ui-ux-pro-max skill, run via parallel AI agents): - a11y: visible :focus-visible rings, prefers-reduced-motion guard, lifted text contrast (--text-dim/--text-faint), nav aria-labels + aria-current, evidence aria-expanded, role=alert/status live regions, heading hierarchy - design tokens: type / spacing / z-index / motion scales, --shadow-accent, Space Grotesk display font, tabular-nums for figures - interaction: 40/44px touch targets, press states, cursor:not-allowed disabled - layout: 100dvh, max-width on main, mobile sidebar overflow fix, line-length caps - components: SVG IconCheck (no emoji), Field error slot, Evaluation empty state - NEW: dependency-free SVG donut + progress-bar chart on the Evaluation page Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>c412fbd
-
Redesign frontend into a premium dark-first AI workspace
Aissugur Kurganbekov +1: Claude Opus 4.8 (1M context)- New design system: dark theme tokens, Inter type, soft accent gradient, glass panels, thin borders, smooth hover/press, shimmer + answer-reveal - App shell: left sidebar nav + main area + right evidence panel - Landing/Overview: hero pitch, trust badges, drag-and-drop upload, doc grid - Ask workspace: demo question chips, loading shimmer, animated answer card, collapsible evidence panel, history - Evaluation: metric cards + pass/fail table + "why it matters" - Reusable components: Button, Card, Badge, Field, Sidebar, DocumentCard, MetricCard, EvidencePanel, Upload, LoadingState/EmptyState/ErrorState - Responsive: desktop / laptop / mobile (sidebar collapses to a top bar) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>375d687