How rachanna/cardio4cities works
CARDIO4Cities is a city cardiovascular research assistant: a user asks about a city, the system researches public sources, checks evidence, and presents a cited brief. The graph preserves the documented live-research and Wave 0 capabilities, plus the sampled question-answering and coverage paths. Several workflow stages and integrations are represented at their exact tree paths, but their internal calls were not sampled; those connections are therefore documented at product level or left unverified.
Main entry points: runner.py Research workflow · pipeline.py Question pipeline · assemble.py Brief assembly · ask.py Ask endpoint
Components 26
User experience
- Web interface
web/app/city/page.tsx - FastAPI application
app/main.py - Ask endpoint
app/api/routers/ask.py - Session access
app/api/auth.py
City research
- Research workflow
app/workflow/runner.py - Plan and search
app/workflow/nodes/search.py - Select sources
app/workflow/nodes/select_sources.py - Fetch and parse
app/workflow/nodes/fetch_parse.py - Extract claims
app/workflow/nodes/extract.py - Verify claims
app/workflow/nodes/verify.py - Assess coverage
app/workflow/nodes/coverage.py - National baseline
app/workflow/nodes/wave0.py
Answers and reports
- Question pipeline
app/query/pipeline.py - Evidence retrieval routes
app/query/routes - Fact cards
app/domain/cards.py - Brief assembly
app/report/assemble.py - Report rendering
app/report/render.py
Data and providers
- Postgres research data
app/adapters/postgres/repos/research.py - Web search providers
app/adapters/search - Web fetcher
app/adapters/fetch/httpx_pinned.py - Document parser
app/adapters/parse/documents.py - Language model providers
app/adapters/llm - Knowledge graph
app/adapters/graph/graphiti.py - Vector search
app/adapters/vector/qdrant.py - WHO and World Bank data
app/adapters/structured
Other components
- City researcher
Connections 30
- City researcher → Web interface: asks about city
README.md - Web interface → FastAPI application: uses API
- FastAPI application → Ask endpoint: routes requests
app/main.py - Ask endpoint → Session access: checks session
app/api/routers/ask.py - Ask endpoint → Question pipeline: invokes answering
app/api/routers/ask.py - City researcher → Research workflow: starts city research
- Research workflow → Plan and search: dispatches stages
- Plan and search → Web search providers: searches web
- Research workflow → Select sources: selects sources
- Research workflow → Fetch and parse: retrieves documents
- Fetch and parse → Web fetcher: fetches pages
- Fetch and parse → Document parser: parses documents
- Research workflow → Extract claims: extracts evidence
- Research workflow → Verify claims: checks claims
- Research workflow → Assess coverage: assesses sufficiency
app/workflow/nodes/coverage.py - Assess coverage → Postgres research data: saves slot results
app/workflow/nodes/coverage.py - Assess coverage → Research workflow: replans or advances
app/workflow/nodes/coverage.py - Research workflow → National baseline: loads baseline
- National baseline → WHO and World Bank data: reads health indicators
- Question pipeline → Evidence retrieval routes: runs retrieval routes
app/query/pipeline.py - Question pipeline → Postgres research data: reads research facts
app/query/pipeline.py - Question pipeline → Language model providers: drafts answer
- Question pipeline → Fact cards: builds evidence cards
app/query/pipeline.py - Research workflow → Language model providers: uses model roles
- Question pipeline → Knowledge graph: retrieves relations
- Question pipeline → Vector search: retrieves similar claims
- City researcher → Brief assembly: requests cited brief
- Brief assembly → Postgres research data: assembles research
- Brief assembly → Fact cards: uses fact presentation
app/report/assemble.py - Brief assembly → Report rendering: renders brief