How robdima96/tri-back works
TRI-BACK is a research low-back triage prototype comprising a FastAPI/LangGraph chatbot, a Reflex study interface, and a local session browser. The main user journey is chat through the study UI to the bot, where intake and coverage support follow-up questions or disposition, with retrieval and graph services contributing clinical evidence; the bot returns a response and session record. The README documents the app roles, and sampled code confirms the chat API, its session writes, and the UI’s HTTP call. Internal orchestration and several service links are based on module names and documented capabilities; their exact wiring was not sampled.
Main entry points: graph.py Triage orchestrator · pages Study pages · main.py Chat API · session_store.py Bot session store
Components 19
Study interface
- Study pages
prototypes/tri_back_study_app/tri_back_study_app/pages - Chat state
prototypes/tri_back_study_app/tri_back_study_app/state/chat_state.py - Bot HTTP client
prototypes/tri_back_study_app/tri_back_study_app/adapters/http_client.py
Triage workflow
- Chat API
bot/app/main.py - Triage orchestrator
bot/app/orchestrator/graph.py - Intake planning
bot/app/orchestrator - Coverage evaluation
bot/app/orchestrator/coverage.py - Intake questions
bot/app/services/intake_llm.py - Disposition brief
bot/app/services/disposition_brief.py
Clinical knowledge
- Evidence retrieval
bot/app/services/rag - Chunk store
bot/app/services/rag/store.py - Graph traversal
bot/app/services/graphrag - Agentic graph RAG
bot/app/services/agentic_graph_rag
Session records
- Bot session store
bot/app/session_store.py - Study session overlay
prototypes/tri_back_study_app/tri_back_study_app/session_store.py - Session browser
Testing/app.py
Other components
- Participant / admin
- Neo4j graph
- Language model
Connections 20
- Participant / admin → Study pages: uses
- Study pages → Chat state: updates
- Chat state → Bot HTTP client: sends chat
- Bot HTTP client → Chat API: calls
- Chat API → Triage orchestrator: runs workflow
- Triage orchestrator → Intake planning: plans intake
- Triage orchestrator → Coverage evaluation: checks coverage
- Triage orchestrator → Intake questions: requests questions
- Triage orchestrator → Disposition brief: builds disposition
- Triage orchestrator → Evidence retrieval: retrieves evidence
- Evidence retrieval → Chunk store: queries
- Triage orchestrator → Graph traversal: traverses graph
- Graph traversal → Neo4j graph: queries
- Triage orchestrator → Agentic graph RAG: uses agent
- Agentic graph RAG → Language model: prompts
- Chat API → Bot session store: saves session
- Study pages → Study session overlay: records study data
- Study session overlay → Bot session store: overlays metadata
- Participant / admin → Session browser: browses logs
- Session browser → Bot session store: reads sessions