Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
067f3f40
authored
Aug 08, 2024
by
Zong
Committed by
GitHub
Aug 08, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(query): extension prompt template (#2288)
parent
d682a825
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
packages/service/core/ai/functions/queryExtension.ts
+8
-1
No files found.
packages/service/core/ai/functions/queryExtension.ts
View file @
067f3f40
...
@@ -10,7 +10,10 @@ import { chatValue2RuntimePrompt } from '@fastgpt/global/core/chat/adapt';
...
@@ -10,7 +10,10 @@ import { chatValue2RuntimePrompt } from '@fastgpt/global/core/chat/adapt';
可以根据上下文,消除指代性问题以及扩展问题,利于检索。
可以根据上下文,消除指代性问题以及扩展问题,利于检索。
*/
*/
const
defaultPrompt
=
`作为一个向量检索助手,你的任务是结合历史记录,从不同角度,为“原问题”生成个不同版本的“检索词”,从而提高向量检索的语义丰富度,提高向量检索的精度。生成的问题要求指向对象清晰明确,并与“原问题语言相同”。例如:
const
defaultPrompt
=
`作为一个向量检索助手,你的任务是结合历史记录,从不同角度,为“原问题”生成个不同版本的“检索词”,从而提高向量检索的语义丰富度,提高向量检索的精度。生成的问题要求指向对象清晰明确,并与“原问题语言相同”。
下面的 <Example></Example> 标签对中的示例仅供你学习,请勿在无历史记录的情况下,引用示例中的词。
<Example>
历史记录:
历史记录:
"""
"""
"""
"""
...
@@ -86,7 +89,11 @@ A: Laf 是一个云函数开发平台。
...
@@ -86,7 +89,11 @@ A: Laf 是一个云函数开发平台。
"""
"""
原问题: 它们有什么关系?
原问题: 它们有什么关系?
检索词: ["FastGPT和Laf有什么关系?","介绍下FastGPT","介绍下Laf"]
检索词: ["FastGPT和Laf有什么关系?","介绍下FastGPT","介绍下Laf"]
</Example>
----------------
----------------
我们开始吧!
历史记录:
历史记录:
"""
"""
{{histories}}
{{histories}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment