Skip to content

查询问题的扩展优化:引入子模优化算法 #5280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025

Conversation

YYH211
Copy link
Contributor

@YYH211 YYH211 commented Jul 22, 2025

主要改进

1. 引入子模优化算法

  • 使用子模优化算法替代简单的查询生成方式
  • 实现懒贪心算法进行最优查询选择
  • 引入余弦相似度和边际增益计算,提高查询多样性

2. 查询生成数量控制

  • 新增 generateCount 参数控制初始查询数量
  • 修改提示词模板以支持动态查询数量
  • 增加查询数量的验证逻辑

3. 向量处理优化

  • 集成向量嵌入生成功能
  • 支持原始查询和候选查询的向量处理
  • 实现向量比较和选择逻辑

Copy link
Contributor

gru-agent bot commented Jul 22, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail b3d8b68 🚫 Skipped No files need to be tested {"packages/service/core/ai/functions/queryExtension.ts":"File path does not match include patterns."}

History Assignment

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

Copy link

cla-assistant bot commented Jul 22, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


xxYyh seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

github-actions bot commented Jul 22, 2025

Preview mcp_server Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_mcp_server_64a1b0ec14ef87122ddf32c093d00d871c4b2e2e

Copy link

github-actions bot commented Jul 22, 2025

Preview sandbox Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_sandbox_64a1b0ec14ef87122ddf32c093d00d871c4b2e2e

Copy link

github-actions bot commented Jul 22, 2025

Preview fastgpt Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_64a1b0ec14ef87122ddf32c093d00d871c4b2e2e

@c121914yu c121914yu changed the base branch from main to test-query-extension July 22, 2025 08:35
@c121914yu c121914yu merged commit 6d66d06 into labring:test-query-extension Jul 22, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants