Skip to content

Commit e4e333e

Browse files
committed
merge
1 parent 64c883a commit e4e333e

File tree

9 files changed

+113
-104
lines changed

9 files changed

+113
-104
lines changed

blog/2025-04/_partials/calculus.mdx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -109,33 +109,33 @@ $$
109109
A_{11} & \cdots & A_{1n} \\ \vdots & \ddots & \vdots \\ A_{m1} & \cdots & A_{mn} \
110110
\end{bmatrix}$"}
111111

112-
<Collapse label="$$
112+
<Collapse label="$$
113113
\nabla_x (A x) = A^T
114114
$$">
115115

116-
$$
117-
\begin{split}
118-
&\ \nabla_x (A x) = \nabla_x (A_1 x_1 + A_2 x_2 + \cdots + A_n x_n) \\
119-
=&\ \nabla_x ([A_{11} \cdots A_{1m}] x_1 + [A_{21} \cdots A_{2m}] x_2 + \cdots + [A_{n1} \cdots A_{nm}] x_n) \\
120-
=&\ \nabla_x (A_1 x_1 + A_2 x_2 + \cdots + A_n x_n) \\
121-
=&\ \nabla_x (A_1 x_1) + \nabla_x (A_2 x_2) + \cdots + \nabla_x (A_n x_n) \\
122-
=&\ \begin{bmatrix}
123-
\frac{\partial}{\partial x_1} (A_1 x_1) , \frac{\partial}{\partial x_2} (A_2 x_2) , \cdots , \frac{\partial}{\partial x_n} (A_n x_n)
124-
\end{bmatrix} \\
125-
=&\ \begin{bmatrix}
126-
A_1 , A_2 , \cdots , A_n
127-
\end{bmatrix} = A^T
128-
\end{split}
129-
$$
130-
131-
</Collapse>
116+
$$
117+
\begin{split}
118+
&\ \nabla_x (A x) = \nabla_x (A_1 x_1 + A_2 x_2 + \cdots + A_n x_n) \\
119+
=&\ \nabla_x ([A_{11} \cdots A_{1m}] x_1 + [A_{21} \cdots A_{2m}] x_2 + \cdots + [A_{n1} \cdots A_{nm}] x_n) \\
120+
=&\ \nabla_x (A_1 x_1 + A_2 x_2 + \cdots + A_n x_n) \\
121+
=&\ \nabla_x (A_1 x_1) + \nabla_x (A_2 x_2) + \cdots + \nabla_x (A_n x_n) \\
122+
=&\ \begin{bmatrix}
123+
\frac{\partial}{\partial x_1} (A_1 x_1) , \frac{\partial}{\partial x_2} (A_2 x_2) , \cdots , \frac{\partial}{\partial x_n} (A_n x_n)
124+
\end{bmatrix} \\
125+
=&\ \begin{bmatrix}
126+
A_1 , A_2 , \cdots , A_n
127+
\end{bmatrix} = A^T
128+
\end{split}
129+
$$
130+
131+
</Collapse>
132132

133133
- 对于所有的 :ctip[$\mathbf{x} \in R^n$]{id="$\mathbf{x} = [x_1, x_2, \cdots, x_n]^T$"} \
134134
和 :ctip[$A \in R^{n \times m}$]{id="$\mathbf{A} = \begin{bmatrix} \
135135
A_{11} & \cdots & A_{1m} \\ \vdots & \ddots & \vdots \\ A_{n1} & \cdots & A_{nm} \
136136
\end{bmatrix}$"}
137137

138-
<Collapse label="$$
138+
<Collapse label="$$
139139
\nabla_x (x^T A) = A
140140
$$">
141141

@@ -154,7 +154,7 @@ A_{11} & \cdots & A_{1m} \\ \vdots & \ddots & \vdots \\ A_{n1} & \cdots & A_{nm}
154154
\end{split}
155155
$$
156156

157-
</Collapse>
157+
</Collapse>
158158

159159
- **二次型**(二次型是二次函数在向量空间中的推广):
160160

@@ -163,7 +163,7 @@ A_{11} & \cdots & A_{1m} \\ \vdots & \ddots & \vdots \\ A_{n1} & \cdots & A_{nm}
163163
A_{11} & \cdots & A_{1n} \\ \vdots & \ddots & \vdots \\ A_{n1} & \cdots & A_{nn} \
164164
\end{bmatrix}$"}
165165

166-
<Collapse label="$$
166+
<Collapse label="$$
167167
\nabla_x x^T A x = (A + A^T) x
168168
$$">
169169

@@ -179,7 +179,7 @@ A_{11} & \cdots & A_{1n} \\ \vdots & \ddots & \vdots \\ A_{n1} & \cdots & A_{nn}
179179
\end{split}
180180
$$
181181

182-
</Collapse>
182+
</Collapse>
183183

184184
- **范数**
185185

@@ -195,7 +195,7 @@ A_{11} & \cdots & A_{1n} \\ \vdots & \ddots & \vdots \\ A_{n1} & \cdots & A_{nn}
195195
A_{11} & \cdots & A_{1n} \\ \vdots & \ddots & \vdots \\ A_{n1} & \cdots & A_{nn} \
196196
\end{bmatrix}$"}
197197

198-
<Collapse label="$$
198+
<Collapse label="$$
199199
\nabla_x \|x\|_2^2 = \nabla_x (x^T x) = 2x
200200
$$">
201201

@@ -207,7 +207,7 @@ A_{11} & \cdots & A_{1n} \\ \vdots & \ddots & \vdots \\ A_{n1} & \cdots & A_{nn}
207207
\end{split}
208208
$$
209209

210-
</Collapse>
210+
</Collapse>
211211

212212
:::nerd
213213
在深度学习中每层神经网络之间由 **_权重矩阵_(通常还会添加同维度的偏置向量)桥接不同纬度矩阵的计算**。随后再通过:term[激活函数]{./terms/dl#activation-function}将计算结果映射到非线性空间,是:term[神经元]{./terms/dl#neuron}的计算核心。

blog/2025-08/prompt-engineering.mdx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ draft: true
88

99
最近在做关于智能体系统的 AI 知识学习、智能体知识库构建和提示词工程。
1010
受 AI 平台 Prompt 产品交流影响和启发,也却身体会到了自己写的 Agent Prompt 会让 LLM 像个 dinner,所以打算系统性的学习一下 Prompt Engineering。
11-
本博客受 [Prompt Engineering Guide](https://www.promptingguide.ai/) 启发,并结合自己的理解进行整理。
11+
本章节受 [Prompt Engineering Guide](https://www.promptingguide.ai/) 启发,并结合自己的理解进行整理。
1212

1313
<!--truncate-->
1414

@@ -109,30 +109,19 @@ draft: true
109109
- 通过 Prompt 实现的思维树,在推理过程中更具有可解释性
110110

111111
```markmap
112-
## ToT 构建过程
113-
### 问题拆解
112+
## 思维分解
114113
- 确定问题范围
115114
- 定义筛选条件
116115
- 进行验证答案
116+
## 思维生成
117117
118-
### 定义节点
119-
- 节点存放通常是二阶矩阵,存储单条思维树枝干
120-
- 回溯时直接减去当前节点,并回溯到父节点
121118
122-
### 思维评估
119+
## 思维评估
123120
124121
1. 思维评估:每个节点都会衍生*多个*更接近答案的思维,需要对这些思维进行评估打分
125122
126-
### 思维剪枝
123+
## 思维选择
127124
128-
1. 思维剪枝:针对评估算法验证对应的思维是否满足继续推理的条件,如果满足则继续推理,否则将枝叶剪掉
129-
130-
### 思维回溯
131-
132-
1. 思维回溯:如果当前节点出现差错或者差错较多需要回溯到父层或者祖层,重新评估思维
133-
134-
### 思维合并
135-
136-
1. 思维合并:最终会得到多个思维,需要对这些思维进行合并,得到最终答案
125+
1. 思维选择:最终会得到多个思维,需要对这些思维进行选择,得到最终答案
137126
138127
```

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@
3636
"@docusaurus/theme-search-algolia": "^3.8.1",
3737
"@mdx-js/mdx": "^3.1.0",
3838
"@mdx-js/react": "^3.0.0",
39-
"@types/d3": "^7.4.3",
4039
"animate.css": "^4.1.1",
4140
"animejs": "^3.2.2",
4241
"antd": "^5.27.1",
4342
"antd-style": "^3.7.1",
4443
"canvas": "^3.1.0",
4544
"canvg": "^4.0.2",
4645
"clsx": "^2.0.0",
47-
"d3": "^7.9.0",
4846
"echarts": "^5.5.1",
4947
"file-saver": "^2.0.5",
5048
"heliannuuthus-docusaurus-authors": "file:./plugins/docusaurus-authors",
@@ -83,7 +81,7 @@
8381
"remark-math": "^6.0.0",
8482
"remark-parse": "^11.0.0",
8583
"remark-rehype": "^11.1.1",
86-
"unified": "^11.0.5",
84+
"unified": "^11.0.5"
8785
},
8886
"devDependencies": {
8987
"@docusaurus/module-type-aliases": "3.8.1",

plugins/docusaurus-terminology/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ export default async function DocusaurusTerminologyPlugin(
123123
Object.entries(terminologies).forEach(([key, terminology]) => {
124124
terminology.path = path.join(
125125
options.path || "terminologies",
126-
key.toLowerCase().replace(/ /g, "-")
126+
key?.toLowerCase().replace(/ /g, "-")
127127
);
128128
terminology.slug = path.join(
129129
options.routeBasePath || "terms",
130-
key.toLowerCase().replace(/ /g, "-")
130+
key?.toLowerCase().replace(/ /g, "-")
131131
);
132132
});
133133
return {

pnpm-lock.yaml

Lines changed: 8 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/collapse/CollapseHeading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const CollapseHeading: React.FC<CollapseHeadingProps> = ({
6969
key: "1",
7070
label: (
7171
<Heading
72-
id={title.toLowerCase().replace(/\s+/g, "-")}
72+
id={title?.toLowerCase().replace(/\s+/g, "-")}
7373
as={`h${level}` as HeadingType}
7474
>
7575
<span>{title}</span>

0 commit comments

Comments
 (0)