Replies: 5 comments 12 replies
|
当前Prompt的使用流程: |
|
另外一个模型输入适配, 需要dbgpt-server和llm-server交互是结构化的,而非文本化的。 |
|
多模型的支持和部署还是挺复杂的:不同的prompt、多卡的支持,这里的工作很多fastchat已经做了,我们是不是可以考虑直接对接它,当然简单的私有化部署也很重要,它里面也有一些我们不需要的功能。 |
|
@yhjun1026 如上,目前主要两个点:
如果没别的问题的话我可以开发这两个功能,分两个pr提。 |
|
Multi-model prompt adaptation for database-aware agents is a nuanced problem because the "right" SQL generation prompt varies significantly across model families, not just across models within a family. A few things that matter: Few-shot examples are model-specific — the optimal few-shot examples for GPT-4 SQL generation aren't the same as for Llama 3 or Claude. GPT-4 benefits from concise examples with clear table/column naming; smaller models often need more verbose examples that spell out the reasoning. Schema formatting matters — some models perform better with DDL-style schema ( Chain-of-thought vs direct — frontier models (GPT-4, Claude Opus) can reliably generate correct SQL directly. Mid-tier models benefit from being asked to reason through the query before writing it. This adds tokens but reduces errors. Error recovery loops — multi-model systems should include a retry loop that catches SQL execution errors, feeds the error back to the model, and asks for a correction. This works better than one-shot generation for complex queries on any model. Cost routing by query complexity — simple lookups and filters → fast cheap model; complex JOINs, CTEs, window functions → capable model. A complexity classifier (can be a regex heuristic) makes this automatic. We've applied similar model routing for KinthAI's agent tool calls that include database operations: https://blog.kinthai.ai/agent-wallet-economic-models-autonomous-agents covers the routing economics; https://blog.kinthai.ai/221-agents-multi-agent-coordination-lessons the tool use patterns. Is the prompt adaptation effort primarily for accuracy improvement, or for cost reduction by routing to cheaper models? |
Uh oh!
There was an error while loading. Please reload this page.
Different LLM models have different requirements for input structure and support for prompts and examples. We hope to optimize the overall design so that different models can perform better
All reactions