Reasoning & Sources





Pattern
Reasoning
Chat that shows AI's step-by-step reasoning. Includes decision trees, logical breakdowns, and explanatory tooltips.
IntermediateOct 2025View the full pattern on desktop


Problems solved
- Stream model reasoning parts alongside the final answer
- Toggle or inspect reasoning in the chat UI
- Demonstrate sendReasoning in toUIMessageStreamResponse
Use cases
- Transparent reasoning chat experiences
- Debugging assistants that show chain-of-thought parts
- Educational demos of AI Elements Reasoning
- Support agents that expose intermediate reasoning
AI SDK APIs
streamTextconvertToModelMessages
Tags
aichatai-sdkreasoningthinkinganalysis
Requirements
- Node.js
- 24+
- Memory
- 512MB
- Other
- Redis for rate limiting
External services
deepseek
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View the pattern on desktopRelated patterns


Sources & Citations
Chat with source citations using Perplexity's Sonar model. Answers include clickable links for fact-checking.
aichat+4
View pattern β


Basic Chat Interface
Chat interface with streaming responses and message history. Includes typing indicators and message status tracking.
aichat+2
View pattern β



