update playground

This commit is contained in:
CaiHQ 2025-08-22 17:59:21 +08:00
parent 17020e8755
commit e9fcbd36d4
2 changed files with 11 additions and 16 deletions

View File

@ -21,24 +21,21 @@ const DEFAULT_RAG_QUESTION_PROMPT =
const DEFAUTL_RAG_SYSTEM_PROMPT = `You are a helpful AI assistant. Use the following pieces of context to answer the question at the end. If you don't know the answer, just say you don't know. DO NOT try to make up an answer. If the question is not related to the context, politely respond that you are tuned to only answer questions that are related to the context. {context} Question: {question} Helpful answer:` const DEFAUTL_RAG_SYSTEM_PROMPT = `You are a helpful AI assistant. Use the following pieces of context to answer the question at the end. If you don't know the answer, just say you don't know. DO NOT try to make up an answer. If the question is not related to the context, politely respond that you are tuned to only answer questions that are related to the context. {context} Question: {question} Helpful answer:`
const DEFAULT_WEBSEARCH_PROMPT = `你是一个中文AI助手。根据用户的问题,请筛选出<iod-search-results>中的相关信息,并结合<iod-search-results>中的数据、场景(项目)、人员团队等类型的相关信息, const DEFAULT_WEBSEARCH_PROMPT = `你是一个中文AI助手,当前日期和时间是: {current_date_time}。根据用户的问题,请筛选出<数联网搜索结果>中的相关信息,并结合<iod-search-results>中的数据、场景(项目)、人员团队等类型的相关信息,
<iod-search-results> {current_date_time}. <数联网搜索结果>
<iod-search-results> Internet of Data) <数联网搜索结果> Internet of Data)
\`<result doId="{doId}" name="{title}" authors="{authors}" dataType="{paper,dataset or algorithm}" year="{year}" url="{url}" id="{id}">{abstract}</result>\` \`<result doId="{doId}" name="{title}" authors="{authors}" dataType="{paper,dataset or algorithm}" year="{year}" url="{url}" id="{id}">{abstract}</result>\`
\`doId\`\`name\` : \`doId\`\`name\` ,如果没有url则空着 :
\`[IoD source [id] doId: {doId} "{name}"]({url})\`
Or in Chinese:
\`[数联网引用[id] doId: {doId} "{name}"]({url})\` \`[数联网引用[id] doId: {doId} "{name}"]({url})\`
For example, in English: :
\`[IoD source [1] doId: 10.48550/arXiv.1803.05591v2 "On the insufficiency of existing momentum schemes for Stochastic Optimization"](http://arxiv.org/pdf/1803.05591v2.pdf)\`
Or in Chinese:
\`[数联网引用[1] doId: 10.48550/arXiv.1803.05591v2 "On the insufficiency of existing momentum schemes for Stochastic Optimization"](http://arxiv.org/pdf/1803.05591v2.pdf)\` \`[数联网引用[1] doId: 10.48550/arXiv.1803.05591v2 "On the insufficiency of existing momentum schemes for Stochastic Optimization"](http://arxiv.org/pdf/1803.05591v2.pdf)\`
<iod-search-results> <数联网搜索结果>
{iod_search_results} {iod_search_results}
</iod-search-results> </数联网搜索结果>
4
` `
const DEFAULT_WEBSEARCH_PROMPT2 = `You are an AI assistant specialized in retrieving and analyzing academic papers from Neo4j graph database. const DEFAULT_WEBSEARCH_PROMPT2 = `You are an AI assistant specialized in retrieving and analyzing academic papers from Neo4j graph database.

View File

@ -49,12 +49,10 @@ export const iodConfigLocal = {
localRepository: "bdtest.local/myrepo1", localRepository: "bdtest.local/myrepo1",
doBrowser: "http://127.0.0.1:21030/SCIDE/SCManager" doBrowser: "http://127.0.0.1:21030/SCIDE/SCManager"
} }
function inGrepList(str: string) { function inGrepList(str: string){
return ( return "什么|问题|需要|合适|设计|考虑|合作|精度|传感器|最新|研究|药物|如何|解决|中的|难题|成本|寿命|提升".indexOf(
"什么|问题|需要|合适|设计|考虑|合作|精度|传感器|最新|研究|药物".indexOf(
str str
) != -1 ) != -1
)
} }
export const makeSearchParamsWithDataType = function ( export const makeSearchParamsWithDataType = function (