legco_ai_assistant/backend
Woody 57a130dc96 feat(services): add per-sub-question retrieval, filtering, and response generation
Add retrieve_per_subquestion() that queries ChromaDB independently per sub-question instead of joining all sub-qs into one query string. Add filter_per_subquestion() that evaluates each chunk against its own originating sub-question in a single LLM call with a redesigned grouped prompt. Add generate_response_per_subquestion() that produces markdown sections per sub-question with grouped sources and {context_sections} template support. All existing methods preserved for backward compatibility.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-26 23:27:50 +08:00
..
app feat(services): add per-sub-question retrieval, filtering, and response generation 2026-04-26 23:27:50 +08:00
uploads chore: add .gitignore with Python, Node, env, and ChromaDB exclusions 2026-04-22 15:57:04 +08:00
.env.example feat(db): Phase 3.1 — SQLite infrastructure (prompts.db + history.db) 2026-04-25 20:29:29 +08:00
pytest.ini chore(backend): update config, env template, and pytest settings 2026-04-23 13:26:08 +08:00
requirements.txt feat(backend): migrate LLM client to OpenAI SDK with thinking control 2026-04-23 14:10:26 +08:00