Treewalker extracts token log-probability distributions from ungrounded Gemini runs, identifies alternative candidate tokens above a chosen probability threshold, and spawns targeted branch completions to map the model's associative memory tree before computing statistical aggregation.

flowchart LR
    A[Initial Ungrounded Prompt] --> B[Generate Output and Token Logprobs]
    B --> C{Alt Token Prob >= Threshold?}
    C -- Yes --> D[Spawn Branch Prompt with Prefix + Alt Token]
    C -- No --> E[Continue Primary Token Path]
    D --> F[Execute Parallel Branch Completion]
    E --> G[Map Tokens to Entities]
    F --> H[Collect Alternative Associations]
    G --> I[Multi-Run Aggregator]
    H --> I
    I --> J[Holistic Memory Tree Analysis]
Proactive Suggestion: Note that Treewalker requires Vertex AI service account authentication rather than standard Gemini API keys because the Google GenAI API key transport does not support response logprobs.