Chat Flow
Message Flow Overview
When a user presses the send button, messages undergo a series of processing steps to provide high-quality intelligent responses. Below is the detailed process:
1. Message Preprocessing
- Text Parsing: The system first parses the text content input by the user
- Image Information Extraction:
- OCR (Optical Character Recognition) is performed on images in the message to extract text
- Image content is analyzed to identify key elements and scenes
- The extracted information is converted into structured data for subsequent processing
2. Information Retrieval
- Web Search:
- Search queries are generated based on the user's message content
- Relevant information is retrieved from the internet
- Search results are filtered and ranked
- Highly relevant content is extracted as contextual supplements
3. Reasoning and Tool Calling Cycle
The system solves user problems through repeated thinking and tool usage. The entire process resembles a conversation:
- First, the system considers your question
- Determines whether tools (such as search engines, calculators, etc.) are needed
- If necessary, appropriate tools are used to gather information
- After obtaining information, the question is reconsidered
- This thinking-tool usage-rethinking cycle continues
- Until a satisfactory answer is found, and a complete response is generated
This process ensures that responses are both accurate and helpful, like an assistant searching for and organizing information on your behalf.
Reasoning Phase
- Analyzes user intent
- Determines if external tool assistance is needed
- Plans solution strategies
Tool Calling Phase
- Selects appropriate tools based on reasoning results
- Formats input parameters
- Executes tool calls and retrieves results
A complete list of available tools can be found in the details
Iterative Cycle
Reasoning and tool calling may undergo multiple iterations until results that meet user needs are obtained. The results of each tool call serve as new context input for the next round of reasoning.
4. Response Generation
- Integrates all collected information
- Optimizes response structure and content
- Applies language models to generate natural, professional responses
- Performs final quality checks
5. Delivery
- Formats the final response
- Returns it to the user interface for display