How hd325/houkongintellect-public works
HouKongIntellect is a local-first campus learning assistant: learners and teachers manage source documents, ask cited questions, and use review, OCR, quiz, and usage-reporting features. The main workflow is upload, extract and suggest metadata, confirm and publish or submit for review, index approved material, then retrieve passages for answers with citations. The FastAPI application in main.py coordinates these routes and services; the static page is the user interface. Edges reflect README statements or source-index references and shown calls; unsampled route internals are not inferred.
Main entry points: main.py FastAPI application · vector_store.py Vector store · index.html Web interface · tencent_ocr.py Tencent OCR
Components 19
Application
- Web interface
index.html - FastAPI application
main.py - Runtime configuration
config/settings.py
Document lifecycle
- Upload analysis
services/upload_analysis.py - Tencent OCR
services/ocr/tencent_ocr.py - Document catalog
services/document_catalog.py - Document files
services/document_files.py - Review policy
services/review_policy.py
Knowledge services
- Text chunking
services/chunker.py - Vector store
services/knowledge/vector_store.py - Embedding backends
services/knowledge/embedder.py - Hybrid retrieval
services/retrieval/retriever.py
Learning features
- Chat model service
- Web search
search_util.py - Quiz generation
services/quiz_service.py
Accounts and reporting
- Account management
services/accounts.py - Retrieval metrics
services/metrics_summary.py - Metrics records
Other components
- Learner / teacher
Connections 21
- Learner / teacher → Web interface: uses
README.md - Web interface → FastAPI application: requests
README.md - FastAPI application → Runtime configuration: loads settings
main.py - FastAPI application → Account management: authenticates
main.py - FastAPI application → Upload analysis: analyzes upload
main.py - FastAPI application → Tencent OCR: extracts scans
main.py - FastAPI application → Document catalog: manages documents
main.py - Document catalog → Document files: uses storage helpers
services/document_catalog.py - FastAPI application → Review policy: checks publication
main.py - FastAPI application → Vector store: indexes documents
main.py - Vector store → Text chunking: chunks text
services/knowledge/vector_store.py - Vector store → Embedding backends: embeds chunks
services/knowledge/vector_store.py - FastAPI application → Hybrid retrieval: retrieves context
main.py - Hybrid retrieval → Vector store: queries vectors
services/retrieval/retriever.py - FastAPI application → Chat model service: requests answers
README.md - FastAPI application → Web search: offers web search
main.py - FastAPI application → Quiz generation: generates practice
main.py - Quiz generation → Vector store: reads document chunks
services/quiz_service.py - FastAPI application → Retrieval metrics: summarizes usage
main.py - Retrieval metrics → Metrics records: reads records
services/metrics_summary.py - Tencent OCR → Runtime configuration: loads credentials
services/ocr/tencent_ocr.py