Current State Reference | 2026-03-07
7 nodes, parallel fan-out after context assembly. Wall-clock time equals the slowest single task in the parallel segment, not the sum of all tasks.
| Node | File | Purpose | Model |
|---|---|---|---|
| Intent | intent_node.py |
Classify user query intent and extract routing metadata | Claude Haiku 4.5 |
| Clarification Gate | clarification_gate.py |
Evaluate confidence; request clarification if ambiguous | Rule-based |
| Retrieval | retrieval_node.py |
Two-phase hybrid search across vector + keyword indexes | OpenAI Embedding |
| Context | context_node.py |
Format and assemble retrieved content for downstream nodes | — |
| Response | response_node.py |
Generate the primary AI response grounded in context | Claude Sonnet 4.5 |
| Suggestions | suggestions_node.py |
Produce follow-up questions from graph concepts and stage | Claude Haiku 4.5 |
| Journey | journey_node.py |
Persist interaction to Journey DB; merge response + suggestions | — |
Two-phase retrieval with authority-based source separation, reciprocal rank fusion, and an automatic fallback when result count drops below threshold.
| Authority Level | Phase | Sources | Description |
|---|---|---|---|
| Phase 1 | Jay Samit's published works, official SAS content | Highest-trust content. Direct from the author or organization. Always prioritized in response grounding. | |
| Phase 2 | Curated third-party articles, interviews, case studies | Vetted supporting material that extends primary content with additional context and examples. | |
| Phase 2 | Industry examples, analogies, supporting narratives | Used to make concepts tangible. Never presented as primary source material. | |
| Phase 2 | General knowledge, background context | Fills gaps when primary and supplementary sources lack coverage. Lowest retrieval priority. |
Retrieval produces two distinct result sets passed downstream independently. They are never merged before reaching the Context and Suggestions nodes.
The Intent node classifies each query into one of seven intent types. Five of these apply two-phase authority filtering; two get full corpus access for broad exploration.
| Intent | Authority Filter | Content Type Filter | Strategy |
|---|---|---|---|
| concept_explanation | primary, supplementary | book_chapter, framework | Two-Phase Filtered |
| actionable_advice | primary, supplementary | exercise, worksheet, case_study | Two-Phase Filtered |
| personal_story | primary | biography, interview, anecdote | Two-Phase Filtered |
| book_reference | primary | book_chapter, quote | Two-Phase Filtered |
| case_study | primary, supplementary, illustrative | case_study, example | Two-Phase Filtered |
| exploration | all | all | Full Corpus Access |
| general | all | all | Full Corpus Access |
Graph results feed concept extraction, which combines with the user's journey stage to generate contextual follow-up questions. When graph concepts are unavailable, the system falls back to RAG content types for suggestion generation.
| Step | Input | Output |
|---|---|---|
| 1. Concept Extraction | Neo4j graph_results (entities + relationships) | List of related concepts, themes, and entity connections |
| 2. Stage Context | Journey DB — user's current progression stage | Stage-appropriate framing (e.g., early exploration vs. deep application) |
| 3. Generation | Concepts + stage context → Claude Haiku 4.5 | 3–4 follow-up questions tailored to graph neighborhood and user journey |
| Fallback | RAG content_type metadata (when no graph concepts) | Content-type-driven suggestions (e.g., "explore related case studies") |
Three areas dominate wall-clock time. The parallel fan-out after Context means total latency is bounded by the slowest branch, not the sum.
Both issues surfaced during the V2 rollout and have been resolved in production.
| Issue | Root Cause | Resolution | Status |
|---|---|---|---|
| SSE Stream Parsing | Client-side parser dropped partial chunks when the SSE connection delivered multi-line data events. Buffer boundary handling was incomplete. | Implemented proper chunk accumulation with newline-delimited parsing. Added reconnection logic for dropped streams. | Resolved |
| Clarification Routing | Clarification Gate responses were being passed through the full pipeline (Retrieval → Response) instead of returning directly to the user, causing unnecessary latency and confused responses. | Clarification Gate now returns a terminal response that short-circuits the pipeline. No downstream nodes execute on clarification paths. | Resolved |
Five forward-looking decisions where your input shapes the next iteration. Each includes my current recommendation.
Share your priorities on these five decisions.
Provide Your Input →