← Back to Anthropic
2

Implement a Token-Level Streaming Parser

CodingmediumCommon
streamingparsingllm

Reported

6 times

Last seen

2026-03-20

First seen

2025-09-10

Active in

2025, 2026

Description

Build a streaming parser that processes LLM output tokens in real-time, handling partial JSON, markdown, and code blocks.

Approach Tips

Use a state machine approach to track parsing context. Handle edge cases like code blocks containing JSON and nested structures.

Sources

Blind·SDE-2·2026-03-20
Glassdoor·SDE-3·2025-11-08
AN

Anthropic

AI

Typically appears in: Phone Screen

60 min — Coding problem focused on algorithms and data structures. May involve systems-oriented problems.