Web3 Action Pipeline
Seamless Translation of Natural Language to Blockchain Operations
The Web3 Action Pipeline describes the process of translating user inputs into on-chain actions and informative responses. Here's a detailed breakdown of each step:
Input Handling
Frontend widget captures user query (e.g., "Swap 100 BERA for TRR")
Input is sanitized and preprocessed for further analysis
Intent Classification
LangGraph API determines if the request requires:
Pure information (RAG response)
On-chain action (tool execution)
Hybrid response (explanation + action)
Classification is based on context, user history, and current market conditions
Parameter Extraction
For action-based intents, key parameters are identified:
Token amounts
Addresses
Protocol-specific details (e.g., slippage tolerance, deadline)
Natural language is parsed into structured data for smart contract interaction
Action Preparation
For transactions:
Gas optimization calculations are performed
Wallet interaction flows are prepared (approvals, confirmations)
For informational queries:
Relevant data sources are identified for retrieval
Execution
On-chain actions:
Smart contract interactions are initiated
Transactions are signed and broadcast to the network
Informational responses:
RAG system retrieves and synthesizes relevant data
LLM generates a coherent, context-aware response
State Management
Maintains context across multi-step operations:
`python*# Example: Compound yield strategy*
Swap 50% of BERA for STONE
Deposit STONE into liquidity pool
Stake LP tokens in farm`
Tracks progress of multi-step processes and handles interruptions or errors
Response Generation
The LLM, via Bailoo, composes the final response
Could be an informative explanation, an action confirmation, or both
Tailored to user's expertise level and previous interactions
Logging & Monitoring
Each step is logged in LangSmith for debugging and performance analysis
Success rates, error patterns, and user satisfaction are tracked
Data is used for continuous improvement of the system
Last updated