Start AI knowledge base v2 workspace
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# 2026-07-06 Initial Context
|
||||
|
||||
## Background
|
||||
|
||||
The project requirement changed significantly on 2026-07-06. The previous implementation focused on a backend/admin MVP for extracting, cleaning, reviewing, and marking "大本营答疑资产" as callable QA assets. The new requirement package defines an **AI 企业知识库问答系统**.
|
||||
|
||||
## Source Package Archived
|
||||
|
||||
The uploaded source documents were copied into:
|
||||
|
||||
`ai_knowledge_base_v2/source_documents/`
|
||||
|
||||
Machine-extracted Markdown files were generated into:
|
||||
|
||||
`ai_knowledge_base_v2/extracted/`
|
||||
|
||||
The source package includes PRD, SRS, database design, API design, RAG design, admin prototype notes, implementation plan, test cases, UAT criteria, deployment manual, field dictionary, and permission matrix.
|
||||
|
||||
## Current Understanding
|
||||
|
||||
The new system should use Feishu knowledge bases as the only phase-one knowledge source. Each user question should:
|
||||
|
||||
1. Validate user account and daily quota.
|
||||
2. Resolve the user's authorized knowledge bases.
|
||||
3. Retrieve content from Feishu in real time.
|
||||
4. Assemble Prompt from system Prompt, retrieved snippets, user question, and controlled context.
|
||||
5. Call the configured model.
|
||||
6. Stream the answer through SSE.
|
||||
7. Persist question, answer, retrieval snippets, Prompt/model info, token usage, cost, and status.
|
||||
|
||||
## Key Decisions
|
||||
|
||||
- Create a new `ai_knowledge_base_v2/` workspace instead of mixing V2 records into old docs.
|
||||
- Preserve all uploaded documents as source artifacts.
|
||||
- Generate extracted Markdown for searchable project context.
|
||||
- Treat old code as a reference implementation, not as the direct domain model for V2.
|
||||
- Prefer reusable technical infrastructure from old code only after matching it against V2 requirements.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- SMS provider is not specified yet. We need a mock provider for local development and a real provider decision before production.
|
||||
- Final model provider and API compatibility need confirmation.
|
||||
- Feishu real-time retrieval API details need implementation validation against the actual tenant permissions and knowledge base structure.
|
||||
- Whether V2 should be created as a sibling app inside this repository or split into a separate repository can be decided after architecture planning.
|
||||
14
ai_knowledge_base_v2/development_records/README.md
Normal file
14
ai_knowledge_base_v2/development_records/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Development Records
|
||||
|
||||
This folder stores the AI knowledge base V2 development process records.
|
||||
|
||||
Use it for:
|
||||
|
||||
- scope decisions
|
||||
- architecture decisions
|
||||
- implementation plans
|
||||
- daily or milestone notes
|
||||
- unresolved questions
|
||||
- test and acceptance observations
|
||||
|
||||
Do not store these records in the old `hy_qa_asset_backend/docs` folder. That folder belongs to the earlier "答疑资产后台系统" phase.
|
||||
Reference in New Issue
Block a user