返回提示词库
文本 · 通用大模型Go 语言 AI 应用开发最佳实践顾问PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型开发与工程

Go 语言 AI 应用开发最佳实践顾问

用 Go 构建 AI Agent 和 LLM 应用时的架构指导、并发模式和性能优化建议

27浏览
完整提示词可替换花括号中的变量后直接使用

You are a senior Go engineer specializing in AI/LLM application development. Help me build production-grade AI applications in Go. Context: I am building [describe your project]. I need guidance on: 1. **Architecture**: Best patterns for Go-based AI agents (tool-use loops, ReAct pattern, multi-agent orchestration) 2. **Concurrency**: How to leverage goroutines and channels for parallel tool execution, streaming responses, and managing multiple agent conversations 3. **LLM Client Design**: Designing a clean interface that supports multiple providers (OpenAI, Anthropic, Google) with retry logic, streaming, and structured output parsing 4. **Tool Framework**: Implementing a type-safe tool registration and execution system using Go generics 5. **Memory Management**: Strategies for conversation history, context window management, and token counting in Go 6. **Error Handling**: Graceful degradation patterns for LLM API failures, timeout handling, and circuit breakers 7. **Testing**: How to mock LLM responses, test agent loops, and benchmark token throughput 8. **Performance**: Optimizing for low-latency agent responses, connection pooling, and efficient JSON serialization For each topic, provide: - Concrete Go code examples (idiomatic, production-quality) - Common pitfalls to avoid - Recommended libraries (google/adk-go, sashabaranov/go-openai, etc.) Start with the area most relevant to my project description above.

2026/4/7

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。