How phoo1911/startup works
This is a startup-support information search, recommendation, and chatbot service. The principal workflow is Browser → FastAPI → the current agentic_hybrid query graph → cached retrieval index → policy-aware generated response. A separate administrative workflow recollects public data, rebuilds the index, and reinitializes the service. The README documents the current pipeline stages and rebuild flow; sampled code confirms selected graph, retrieval, and legacy components, but not every runtime call.
Main entry points: graph.py Query graph · retrieve_node.py Document retrieval · orchestrator.py Legacy index orchestrator · fastapi_app.py FastAPI routes
Components 26
Web service
- FastAPI routes
web/fastapi_app.py - Agentic runtime
agentic_hybrid/main_agentic.py
Query workflow
- Query graph
agentic_hybrid/graph.py - Query state
agentic_hybrid/state.py - Intent classification
agentic_hybrid/nodes/intent_classifier_node.py - Query expansion
agentic_hybrid/nodes/query_expansion_node.py - Document-type routing
agentic_hybrid/nodes/doc_type_router_node.py - Policy planning
agentic_hybrid/nodes/planner_node.py - Answer generation
agentic_hybrid/nodes/generate_node.py - Answer revision
agentic_hybrid/nodes/revise_node.py
Retrieval and policy
- Document retrieval
agentic_hybrid/nodes/retrieve_node.py - Vector search
agentic_hybrid/retrieval/vector_retriever.py - Hybrid ranking
agentic_hybrid/retrieval/hybrid_rrf.py - BM25 search
agentic_hybrid/retrieval/bm25_retriever.py - Geographic search
agentic_hybrid/retrieval/geo_retriever.py - Result reranking
agentic_hybrid/nodes/rerank_node.py - Eligibility filtering
agentic_hybrid/nodes/filter_node.py - Freshness ranking
agentic_hybrid/retrieval/freshness_reranker.py - Deduplication
agentic_hybrid/nodes/dedup_node.py - Cross-document enrichment
agentic_hybrid/retrieval/cross_doc_linker.py - Cached RAG index
Index production
- Legacy index orchestrator
legacy_core/orchestrator.py - Data collection
legacy_agents/data_collector.py - RAG index builder
legacy_agents/rag_builder.py
Other components
- Browser user
- Public data API
Connections 27
- Browser user → FastAPI routes: sends requests
- FastAPI routes → Agentic runtime: routes queries
web/fastapi_app.py - Agentic runtime → Query graph: runs graph
agentic_hybrid/main_agentic.py - Query graph → Intent classification: dispatches
agentic_hybrid/graph.py - Query graph → Query expansion: dispatches
agentic_hybrid/graph.py - Query graph → Document retrieval: dispatches
agentic_hybrid/graph.py - Query graph → Document-type routing: dispatches
agentic_hybrid/graph.py - Query graph → Result reranking: dispatches
agentic_hybrid/graph.py - Query graph → Policy planning: dispatches
agentic_hybrid/graph.py - Query graph → Eligibility filtering: dispatches
agentic_hybrid/graph.py - Query graph → Freshness ranking: dispatches
agentic_hybrid/graph.py - Query graph → Deduplication: dispatches
agentic_hybrid/graph.py - Query graph → Cross-document enrichment: dispatches
agentic_hybrid/graph.py - Query graph → Answer generation: dispatches
agentic_hybrid/graph.py - Query graph → Answer revision: dispatches
agentic_hybrid/graph.py - Query graph → Query state: uses state
agentic_hybrid/graph.py - Document retrieval → Hybrid ranking: calls
agentic_hybrid/nodes/retrieve_node.py - Hybrid ranking → Vector search: searches
- Hybrid ranking → BM25 search: searches
- Document retrieval → Geographic search: searches
- Document retrieval → Cached RAG index: reads
- FastAPI routes → Legacy index orchestrator: rebuilds index
web/fastapi_app.py - Legacy index orchestrator → Data collection: collects data
legacy_core/orchestrator.py - Legacy index orchestrator → RAG index builder: builds index
legacy_core/orchestrator.py - Data collection → Public data API: fetches records
- RAG index builder → Cached RAG index: writes index
- Legacy index orchestrator → Cached RAG index: refreshes cache