feat: product manual PDF upload for enhanced FAQ generation#53
Merged
antoniomtz merged 1 commit intomainfrom Apr 17, 2026
Merged
feat: product manual PDF upload for enhanced FAQ generation#53antoniomtz merged 1 commit intomainfrom
antoniomtz merged 1 commit intomainfrom
Conversation
Add stateless targeted RAG pipeline that extracts knowledge from product manual PDFs to generate richer FAQs (up to 10) with specific details like specs, care instructions, safety warnings, and warranty information. Architecture: - POST /vlm/manual/extract processes PDF, returns structured knowledge JSON, frees all server-side resources (fully stateless, scalable to concurrent use) - LLM dynamically generates 5-8 product-type-specific queries from title + categories (not description) to avoid FAQ duplication with the description - In-memory numpy cosine similarity for chunk retrieval (no Milvus needed) - Embedding requests batched at 128 chunks for large manuals - 50 MB PDF size limit with input validation Backend: new product_manual.py module, modified /vlm/faqs endpoint to accept manual_knowledge, enhanced FAQ prompt with deduplication rules. Frontend: "Product manual for FAQs" upload section in Advanced Options, unified StagedUploadProgress component, "Optional" pill on Policy Library. Docs: moved PRD.md to docs/, created POLICY_COMPLIANCE.md and PRODUCT_MANUAL_FAQS.md feature guides, updated API.md, README, AGENTS.md. Tests: 32 new unit tests (208 total, all passing). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /vlm/manual/extract) that extracts knowledge from product manual PDFs to generate richer FAQs (up to 10) with specs, care instructions, safety warnings, and warranty detailsdocs/POLICY_COMPLIANCE.md,docs/PRODUCT_MANUAL_FAQS.md, movedPRD.mdtodocs/Test plan
uv run pytest tests/— all 208 tests passpnpm exec tsc --noEmit— no new errors (pre-existing Spinner aria-label only)POST /vlm/manual/extract+POST /vlm/faqsworks via curl without the UI (batch script scenario)🤖 Generated with Claude Code