最佳实践
常见的几种 LLM Agent 架构
· ☕ 1 分钟
1. 链式提示系统(Prompt chaining) 提示链将任务分解为一系列步骤,其中每个 LLM 调用都会处理前一个步骤的输出。 2. 路由系统(Routing) 路由会对输入进行分类,并将其定向到专门的后续任务。 3. 并行化系统(Parallelization)

Kubernetes 基础环境要求
· ☕ 2 分钟
1. 基础包 Kubernetes 版本 ≥ 1.18 socat 必须安装 conntrack 必须安装 ebtables 可选,但推荐安装 ipset 可选,但推荐安装 ipvsadm 可选,但推荐安装 1 apt-get -y install socat conntrack ebtables ipset ipvsadm 2. 端口要求 2.1 基础节点服务 Service Protocol Action Start Port End Port Comment ssh TCP allow 22 22 节点远程管理 docker TCP allow 2375 2376 Docker 远程通信 etcd TCP allow 2379 2380 etcd 集群通信 2.2 Master/Control Plane 组件 Service Protocol Action Start Port End Port Comment apiserver

AI 应用开发技术栈
· ☕ 4 分钟
Embedding 模型 Embedding 模式将高维度的数据映射到低维度的空间,这样有利于数据的处理和分析。 文本模型 这里有一个排行榜,https://huggingface.co/spaces/mteb/leaderboard 在上面的排行榜中,会给出模型的评分,模型的参数量

大模型应用设计与实现指南
· ☕ 9 分钟
1. 直接使用大模型面临的问题 输出不稳定性 生成式 AI 的特点之一,输出结果的多样性。同样一个问题,问大模型多次,可能会得到不同的答案。 这种输出的不确定性,在对话、创作场景下,会给用户带来惊喜。但在确定性要求比较高的场景下,大模型进入不了采纳阶段。 数

容器下的 Go 应用程序优化
· ☕ 2 分钟
1. 内存对齐 结构体内字段,从大到小排列 减少内存占用 安装 fieldalignment 工具 1 go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest 分析并修复内存对齐 1 2 3 4 5 6 7 8 9 fieldalignment -fix ./... /Users/shaowenchen/Code/app/config/config.go:136:14: struct with 32 pointer bytes could be 24 /Users/shaowenchen/Code/app/config/config.go:150:11: struct of size 96 could be 88 /Users/shaowenchen/Code/app/config/config.go:166:14: struct of size 152 could be 144 /Users/shaowenchen/Code/app/config/config.go:194:12: struct with 80 pointer bytes could be 72 /Users/shaowenchen/Code/app/config/config.go:209:12: struct with 56 pointer bytes could be 40 /Users/shaowenchen/Code/app/dao/gormx/gorm.go:12:13: struct with 16 pointer bytes could be 8 /Users/shaowenchen/Code/app/dao/gormx/entity/cluster.go:5:14: struct with 128 pointer bytes could be 104 查看 fieldalignment 进行