legco_ai_assistant/.plans
Woody f2115ae563 feat: structured LLM output for decompose + citation fuzzy matching (Phase 5)
Phase 5.1 — Structured LLM output for query decomposition:
- Add SubQuestions Pydantic model with sub_question, keywords, rationale
- Add LLMClient.complete_structured() using langchain with_structured_output
- Update QueryDecomposer with structured output path + legacy json.loads fallback
- Update SQLite seed templates: add subq+citation labeling requirement
- Add tests: structured output, subquestions model validation, logging

Phase 5.2 — Citation format alignment and fallback links:
- Add document_id to SourceMetadata (backend + frontend types)
- Rewrite citationParser.ts with fuzzy matching and fallback document links
- Add RAGDatabasePage auto-expand from ?document= URL param
- Tighten generate_per_subq seed prompt: 'Copy exact bracket labels shown'
- Add citation parser tests for fuzzy match and fallback link scenarios
- Defer: DOCX/TXT PDF generation → Phase 5.3 (fallback links sufficient)
2026-04-28 15:39:17 +08:00
..
debug_2026-04-23_upload_500_error.md docs: add debug logs for upload 500 error investigation 2026-04-23 13:25:23 +08:00
package2_enhancement_plan.md docs: mark sub-phase 2.6 complete — Package 2 all done 2026-04-24 17:53:56 +08:00
package3_enhancement_plan.md feat(frontend): Phase 3.6 — History page with timing bars, expandable cards, and pagination 2026-04-26 13:19:52 +08:00
package4_enhancement_plan.md docs(plan): add Phase PX profile export/import feature plan 2026-04-27 19:26:33 +08:00
package5_enhancement_plan.md feat: structured LLM output for decompose + citation fuzzy matching (Phase 5) 2026-04-28 15:39:17 +08:00
phase1_backend_plan.md feat: Phase 1.4 acceptance tests, error handling, and polish 2026-04-22 17:45:50 +08:00
phase1_debug_plan.md docs: add debug logs for upload 500 error investigation 2026-04-23 13:25:23 +08:00
phase1_enhancement_plan.md feat: add chunk PDF serving endpoint and frontend clickable source links (1.5.6) 2026-04-24 11:49:39 +08:00
phase1_frontend_plan.md docs: update development plans with Phase 1 completion status 2026-04-23 13:27:52 +08:00
streaming_extracted_questions_plan.md feat(query): stream extracted questions immediately via SSE 2026-04-25 18:29:22 +08:00