Lecture 3: Core Concepts of Skills: Intent, Action, Tool
Lecture 3: Core Concepts of Skills: Intent, Action, Tool
Understand the three core concepts of Skills, build the correct technical cognitive framework.
1. Skill Architecture Model
1.1 A Complete Skill Interaction Flow
1 | User input: "Convert this PDF to Word document" |
1.2 Three Core Concepts
| Concept | English | Function | Analogy |
|---|---|---|---|
| Intent | Intent | Understand what user wants to do | Brain's thought |
| Action | Action | Execute specific operations | Behavior of hands |
| Tool | Tool | External resources providing capabilities | Tools in hands |
2. Intent: Skill's "Brain"
2.1 What is Intent?
Intent is the semantic understanding result of user input, telling Skill "what does the user want".
Examples:
1 | User says: |
2.2 Intent Classification
| Type | Description | Example |
|---|---|---|
| Task | Complete specific tasks | "Merge files", "Send email" |
| Query | Get information | "What's the weather today" |
| Conversational | Casual chat | "Hello", "Thanks" |
| Control | Control flow | "Cancel", "Start over" |
2.3 Key Technologies for Intent Recognition
1 | # Intent recognition example based on large model |
3. Action: Skill's "Hands"
3.1 What is Action?
Action is the specific operation executed by Skill, serving as a bridge connecting Intent and Tool.
Action Composition:
1 | class Action: |
3.2 Action Types
| Type | Description | Example |
|---|---|---|
| File Operation | Read/write files | read_file, write_file, copy_file |
| Data Processing | Transform data | parse_json, filter_data, sort_list |
| Network Request | Call API | http_get, http_post, download |
| System Command | Execute commands | run_shell, execute_script |
| AI Call | Call models | chat_completion, text_embedding |
3.3 Action Execution Flow
1 | class SkillExecutor: |
4. Tool: Skill's "Arsenal"
4.1 What is Tool?
Tool is external capabilities that Skill can call, which can be code libraries, APIs, services, etc.
Tool Characteristics:
- 🔧 Single function: Each Tool does only one thing
- 📦 Reusable: Multiple Skills can share the same Tool
- 🔌 Extensible: New Tools can be added anytime
- 📖 Self-describing: Tools come with functionality descriptions
4.2 Tool Definition Method
# Standard Tool definition format
excel_tool = {
"name": "excel_processor",
"description": "Handle Excel file read/write, merge, split and other operations",
"parameters": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["read", "write", "merge", "split"],
"description": "Operation to execute"
},
## 🎓 AI 编程实战课程
想系统学习 AI 编程?程序员晚枫的 **AI 编程实战课** 帮你从零上手!
- 👉 **课程报名**:[点击这里报名,前3讲免费试听](https://r7up9.xetslk.com/s/1uP5YW)
- 👉 **免费试看**:[B站免费试看前3讲,先看看适不适合自己](https://www.bilibili.com/cheese/play/ss982042944)
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 程序员晚枫 - Python自动化办公与AI编程!

