How 1012-penn/shophelperv2 works
MewHelp is an e-commerce customer-support application centered on persistent, streaming chat. For each user turn, FastAPI routes the request to chat orchestration, which can answer with knowledge-backed evidence or invoke business tools; conversations and results are persisted, and citations can link to source text. Separate product capabilities include after-sale extraction and ingestion of documents or conversations into the knowledge base. The README also documents hybrid retrieval, quality controls, and evaluation; unsampled subsystem links are shown only where documented, with evidence limits noted.
Main entry points: runtime.py Answer runtime · embeddings.py Embedding client · main.py HTTP application · retrieval.py Evidence retrieval
Components 28
Web and API
- Support workbench
frontend/src/App.jsx - HTTP application
app/main.py - Request schemas
app/schemas.py
Support workflow
- Chat orchestration
app/services/chat.py - After-sale extraction
app/services/after_sale.py - Business tools
app/tools/registry.py - Order operations
app/tools/business.py
Knowledge lifecycle
- Knowledge ingestion
app/services/knowledge/indexer.py - Document chunking
app/services/knowledge/chunking.py - Conversation extraction
app/services/knowledge/conversations.py - Conversation privacy
app/services/knowledge/privacy.py - Knowledge repository
app/services/knowledge/repository.py - Embedding client
app/services/knowledge/embeddings.py - Hybrid search store
app/services/knowledge/hybrid_store.py - Vector store
app/services/knowledge/vector_store.py - FAQ retriever
app/services/knowledge/retriever.py
Answer quality
- Answer runtime
app/services/quality/runtime.py - Query normalization
app/services/quality/query.py - Evidence retrieval
app/services/quality/retrieval.py - Answer generation
app/services/quality/generation.py - Confidence ledger
app/services/quality/ledger.py - Quality evaluation
app/services/quality/evaluation.py
Persistent state
- Application records
app/db/models.py - Database sessions
app/db/session.py
Other components
- Customer
- MySQL
- Milvus
- Model services
Connections 38
- Customer → Support workbench: uses
README.md - Support workbench → HTTP application: streams chat
README.md - HTTP application → Request schemas: validates
app/main.py - HTTP application → Chat orchestration: dispatches chat
app/main.py - HTTP application → After-sale extraction: dispatches extraction
app/main.py - Chat orchestration → Answer runtime: builds answers
app/services/quality/runtime.py - Chat orchestration → Business tools: runs tools
app/services/chat.py - Business tools → Order operations: invokes
app/services/chat.py - Chat orchestration → Application records: persists turns
app/services/chat.py - After-sale extraction → Model services: extracts fields
app/services/after_sale.py - Knowledge ingestion → Document chunking: chunks documents
app/services/knowledge/chunking.py - Knowledge ingestion → Knowledge repository: writes chunks
app/services/knowledge/indexer.py - Conversation extraction → Conversation privacy: masks messages
app/services/knowledge/conversations.py - Conversation extraction → Knowledge repository: stages candidates
app/services/knowledge/conversations.py - Knowledge repository → Application records: stores knowledge
app/services/knowledge/repository.py - Knowledge repository → Embedding client: indexes pending
- Embedding client → Model services: requests vectors
app/services/knowledge/embeddings.py - Embedding client → Milvus: supplies vectors
- Answer runtime → Embedding client: configures
app/services/quality/runtime.py - Answer runtime → Hybrid search store: configures
app/services/quality/runtime.py - Answer runtime → Evidence retrieval: constructs
app/services/quality/runtime.py - Answer runtime → Answer generation: constructs
app/services/quality/runtime.py - Answer runtime → Confidence ledger: constructs
app/services/quality/runtime.py - Evidence retrieval → Query normalization: normalizes
app/services/quality/retrieval.py - Evidence retrieval → Embedding client: embeds query
app/services/quality/retrieval.py - Evidence retrieval → Hybrid search store: searches candidates
app/services/quality/retrieval.py - Evidence retrieval → Application records: hydrates evidence
app/services/quality/retrieval.py - Answer generation → Model services: generates answer
- Answer runtime → Model services: configures model
app/services/quality/runtime.py - Answer runtime → Model services: configures reranker
app/services/quality/runtime.py - Quality evaluation → Answer runtime: evaluates strategies
- Database sessions → MySQL: opens sessions
app/db/session.py - Application records → MySQL: maps records
- FAQ retriever → Embedding client: embeds query
app/services/knowledge/retriever.py - FAQ retriever → Vector store: searches vectors
app/services/knowledge/retriever.py - FAQ retriever → Knowledge repository: loads matches
- HTTP application → Database sessions: initializes storage
app/main.py - Order operations → Application records: accesses business data
app/tools/business.py